我正在使用以下命令覆盖 jpg:
ffmpeg -i in.mp4 -vf "movie=bb.png [movie]; [in] [movie] overlay=0:0 [out]" -vcodec libx264 -acodec copy out.mp4
这适用于第一个文件(如下所列),但它不适用于第二个文件。当我尝试使用第二个文件时没有错误,而是创建了一个无法打开的异常大文件:
文件 1:
[me@me ~]$ ffmpeg -i 2013-02-08.mp4
ffmpeg version 1.0.git Copyright (c) 2000-2012 the FFmpeg developers
built on Jan 11 2013 00:12:08 with gcc 4.7.2 (GCC) 20120921 (Red Hat 4.7.2-2)
configuration:
libavutil 52. 8.100 / 52. 8.100
libavcodec 54. 74.100 / 54. 74.100
libavformat 54. 37.100 / 54. 37.100
libavdevice 54. 3.100 / 54. 3.100
libavfilter 3. 23.101 / 3. 23.101
libswscale 2. 1.102 / 2. 1.102
libswresample 0. 17.101 / 0. 17.101
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '2013-02-08.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
creation_time : 2013-02-08 20:31:49
encoder : Lavf53.24.0
Duration: 00:00:03.20, start: 0.000000, bitrate: 1030 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 720x576 [SAR 1:1 DAR 5:4], 1247 kb/s, 8.08 fps, 7.50 tbr, 15 tbn, 15 tbc
Metadata:
creation_time : 2013-02-08 20:31:49
handler_name : VideoHandler
Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 8000 Hz, mono, s16, 12 kb/s
Metadata:
creation_time : 2013-02-08 20:31:49
handler_name : SoundHandler
At least one output file must be specified
文件 2
[me@me ~]$ ffmpeg -i aq.mp4
ffmpeg version 1.0.git Copyright (c) 2000-2012 the FFmpeg developers
built on Jan 11 2013 00:12:08 with gcc 4.7.2 (GCC) 20120921 (Red Hat 4.7.2-2)
configuration:
libavutil 52. 8.100 / 52. 8.100
libavcodec 54. 74.100 / 54. 74.100
libavformat 54. 37.100 / 54. 37.100
libavdevice 54. 3.100 / 54. 3.100
libavfilter 3. 23.101 / 3. 23.101
libswscale 2. 1.102 / 2. 1.102
libswresample 0. 17.101 / 0. 17.101
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'aq.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
creation_time : 2013-02-19 20:33:16
encoder : Lavf53.24.0
Duration: 00:00:03.20, start: 0.000000, bitrate: 1394 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 720x576 [SAR 1:1 DAR 5:4], 1451 kb/s, 30 fps, 30 tbr, 30 tbn, 60 tbc
Metadata:
creation_time : 2013-02-19 20:33:16
handler_name : VideoHandler
Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 8000 Hz, mono, s16, 12 kb/s
Metadata:
creation_time : 2013-02-19 20:33:16
handler_name : SoundHandler
At least one output file must be specified
万一很重要,我将使用 Android 设备捕获这些视频。第一个 mp4 文件是由 Nexus 7 创建的,第二个(不会覆盖图像的文件)是使用 HTC Desire 创建的。