【问题标题】:FFmpeg settings to convert MTS into MPG for YouTube将 MTS 转换为 YouTube 的 MPG 的 FFmpeg 设置
【发布时间】:2012-02-18 13:58:57
【问题描述】:

我想讨论 FFmpeg 转换具有以下配置文件的 MTS 视频文件以上传到 YouTube 的最佳参数。 YouTube published their suggested resolutions and bitrates settings

// Input video profile
Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 50 fps, 50 tbr, 90k tbn, 50 tbc
Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, s16, 256 kb/s

由于YouTube has length restrictions to the videos我也想把原文件剪成碎片。

这是我当前转换视频的配置。我正在运行 Ubuntu 10.10。 FFmpeg 版本 git-2011-12-31-81980bf.

ffmpeg -ss 00:15:00 -i input.mts -t 00:30:00 -vcodec libx264 -deinterlace -s hd720 -ab 128k -threads 0 output.mp4

我也想重新编码视频,因为我不想上传原始录制的大文件。

【问题讨论】:

    标签: video youtube ffmpeg h.264 libx264


    【解决方案1】:

    您可能不需要重新编码。 Youtube 可能会接受生成的文件。您可以使用 FFmpeg 分割视频而无需重新编码:

    ffmpeg -ss 00:15:00 -i input.mts -t 00:30:00 -c copy output.mkv

    如果偏移不准确或看起来不正确,请将 -ss 作为输出选项(在 -i input.mts 之后)移动。它作为输出选项更准确,因为它将解码所有内容直到给定时间,但比-ss 作为尝试立即寻找给定时间的输入选项慢得多。旧版 FFmpeg 的用户可能必须使用 -vcodec copy -acodec copy 而不是 -c copy

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2023-03-26
    • 2014-08-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多