Commons:Video2commons/zh

Shortcut: COM:V2C

video2commons的屏幕截图

video2commons工具可从url将视频上传到维基共享资源。它能自动地将上传的视频转换为符合共享资源要求的格式。 它还預設包含移除音频流、视频流、字幕流等功能。 本工具支持OAuth登录。

如何使用

  1. 访问 https://video2commons.toolforge.org 并登录
  2. 点击“新建任务...”
  3. 选择要转换的视频
    • 若您不需要音频、视频或字幕,请取消选择相应的导入选项。
  4. 在模板中填写文件描述并添加分类
  5. 點選「確認」按鈕。转换将在云端开始:
    • 第一步将显示加载栏
    • 第二步将显示一个进度条,显示剩余的百分比
  6. 转换后的视频会自动上传到共享资源

您不能使用该工具覆盖已有的文件。

当任务正在运行时,您可以关闭您的浏览器,因为转换是在服务器上,而不是在您的电脑上进行。

您还可以添加更多任务。它们将被添加到队列中并在完成后发布。

限时开放

在请求大量文件前,请谨记以下事项,以确保服务对其他用户保持可用:

  • 这是一个小型社区服务,而非由维基媒体基金会管理的大型基础设施;
  • 它目前可同时处理20个编码任务;
  • 大型视频的编码过程可能需要数小时。 超时设置为48小时。 如果您不确定处理时间需要多久,请先发送少量文件进行预估,再发送数十或数百个文件。
  • 您可以在Grafana上监控。 关于“聚合负载”的图表显示了当前CPU使用率,范围从0到约100-120。 若发现工作负载持续数小时超过100,请勿发送大量文件,这表明服务已处于满负荷状态。

可能的错误

An exception occurred: TaskError: File already exists. Please choose another name.
原因:这表示已经存在一个视频文件,它与你试图上传的视频有着完全相同的标题。它们可能是同一个视频。如果确认不是同一个视频的话,请另选一个不重复的标题。
An exception occurred: TaskError: /mnt/nfs/labstore-secondary-project/gentoo-prefix/usr/bin/ffmpeg -y -i /srv/v2c/output/b4a696bee515adb1/dl.mp4 -max_muxing_queue_size 4096 -threads 16 -row-mt 1 -crf 20 -qmin 1 -qmax 51 -b:v 0 -vcodec libvpx-vp9 -tile-columns 4 -auto-alt-ref 1 -lag-in-frames 25 -speed 4 -f webm -ss 0 -an -pass 1 -passlogfile /srv/v2c/output/b4a696bee515adb1/dl.mp4.vp9.webm.log /dev/null Exitcode: 1
原因:首次转码为WebM格式失败
An exception occurred: TaskError: pywikibot.Error: APIError: stashfailed: Internal error: Server failed to publish temporary file. (Help: see https://commons.wikimedia.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes.)
原因:视频已完成转码、上传和组装,但发布未成功。
An exception occurred: DownloadError: ERROR: KTvdqve_naM: "token" parameter not in video info for unknown reason; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
原因:使用youtube-dl从互联网下载视频失败
Failed to determine the path of the downloaded video. Is the video too large?
原因:?
An exception occurred: WorkerLostError: Worker exited prematurely: signal 9 (SIGKILL).
原因:由于运行该软件的计算机资源有限,视频转码操作已被中止。
An exception occurred: TaskError: b"b'pywikibot.Error: APIError: stashfailed: Could not acquire lock. Somebody else is doing something to this file...
Meaning: Commons website problem. Not v2c problem. Solution: Click "Restart".
An exception occurred: TaskError: pywikibot.Error: TimeoutError: Maximum retries attempted without success.
原因:上传、组合或发布耗时过长,已中止操作。
An exception occurred: FileNotFoundError: b"[Errno 2] No such file or directory: '/data/project/video2commons/video2commons/frontend/static/uploads/73c147e0-19ea-11ed-9b40-82d0630f66a4'"
原因:?
An exception occurred: TypeError: b"'NoneType' object is not iterable"
原因:?
An exception occurred: TypeError: b"'The file format could not be recognised."
原因:?
An exception occurred: DownloadError: b"'ERROR: [youtube] XXXXXXXXXXX: Sign in to confirm you\xe2\x80\x99re not a bot. This helps protect our community. Learn more."
原因:?
Audio is asked to be kept but the file has no audio tracks.
解决方案: 请勿选择“保留音频”。
An exception occurred: DownloadError: b'ERROR: [youtube] NNwM_OMLa10: Video unavailable. This content isn\xe2\x80\x99t available.'

相容網站

该工具使用yt-dlp解析网站视频文件并获取相关信息。可通过向该工具添加'extractor'文件来支持新网站。部分网站无需专用提取器文件即可正常工作。

请注意,部分网站(如YouTube)禁止使用自动下载工具,因此本工具可能会频繁受到速率限制或被封禁。

链接

Category:Video2commons#%20 Category:Commons tools/Translations Category:Wikimedia projects and audio/Translations
Category:Commons tools/Translations Category:Video2commons Category:Wikimedia projects and audio/Translations