ffmpeg 和匹配的编码选项

ffmpeg 和匹配的编码选项

我有两个从不同的 Android 设备捕获的 mp4 文件。每个文件的 ffmpeg 输出如下所示。我可以重新编码 two.mp4 以便编码选项与 one.mp4 相同吗?我看不出这两个文件有什么不同,但它们肯定有不同,因为当我尝试使用 -vf 覆盖 jpg 时,two.mp4 无法正确编码,而似乎在编码一个大文件,我让它运行了 1 个小时,控制台没有输出。我可以使用 ffmpeg 使 two.mp4 与 one.mp4“相同”吗?

u0_a72@android:# ./ffmpeg -i /sdcard/one.mp4
ffmpeg version 0.9, Copyright (c) 2000-2011 the FFmpeg developers
  built on Jun 12 2012 20:43:50 with gcc 4.4.3
  configuration: --enable-cross-compile --arch=arm --cpu=cortex-a8 --target-os=linux --enable-runtime-cpudetect --prefix=/data/data/org.witness.sscvideoproto --enable-pic --disable-shared --enable-static --cross-prefix=/home/n8fr8/dev/android/ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi- --sysroot=/home/n8fr8/dev/android/ndk/platforms/android-3/arch-arm --enable-version3 --enable-gpl --enable-small --enable-memalign-hack --disable-yasm --disable-doc --enable-decoder=mjpeg --enable-decoder=rawvideo --enable-encoder=libx264 --enable-muxer=mp4 --enable-demuxer=image2 --enable-demuxer=mjpeg --enable-demuxer=mp4 --enable-demuxer=mov --enable-parser=mjpeg --enable-filter=buffer --enable-filter=buffersink --enable-filter=drawbox --enable-filter=overlay --enable-filter=redact --enable-protocol=file --enable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --disable-network --enable-libx264 --enable-zlib --extra-cflags=-I../x264 --extra-ldflags=-L../x264 --disabl  libavutil    51. 32. 0 / 51. 32. 0
  libavcodec   53. 42. 0 / 53. 42. 0
  libavformat  53. 24. 0 / 53. 24. 0
  libavfilter   2. 53. 0 /  2. 53. 0
  libswscale    2.  1. 0 /  2.  1. 0
  libpostproc  51.  2. 0 / 51.  2. 0
WARNING: generic atexit() called from legacy shared library

Seems stream 0 codec frame rate differs from container frame rate: 15.00 (15/1) -> 15.00 (15/1)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/sdcard/jen.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 (avc1 / 0x31637661), yuv420p, 720x576 [SAR 1:1 DAR 5:4], 1247 kb/s, 8.08 fps, 15 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    :
At least one output file must be specified



1|u0_a72@android:# ./ffmpeg -i /sdcard/two.mp4
ffmpeg version 0.9, Copyright (c) 2000-2011 the FFmpeg developers
  built on Jun 12 2012 20:43:50 with gcc 4.4.3
  configuration: --enable-cross-compile --arch=arm --cpu=cortex-a8 --target-os=linux --enable-runtime-cpudetect --prefix=/data/data/org.witness.sscvideoproto --enable-pic --disable-shared --enable-static --cross-prefix=/home/n8fr8/dev/android/ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi- --sysroot=/home/n8fr8/dev/android/ndk/platforms/android-3/arch-arm --enable-version3 --enable-gpl --enable-small --enable-memalign-hack --disable-yasm --disable-doc --enable-decoder=mjpeg --enable-decoder=rawvideo --enable-encoder=libx264 --enable-muxer=mp4 --enable-demuxer=image2 --enable-demuxer=mjpeg --enable-demuxer=mp4 --enable-demuxer=mov --enable-parser=mjpeg --enable-filter=buffer --enable-filter=buffersink --enable-filter=drawbox --enable-filter=overlay --enable-filter=redact --enable-protocol=file --enable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --disable-network --enable-libx264 --enable-zlib --extra-cflags=-I../x264 --extra-ldflags=-L../x264 --disabl  libavutil    51. 32. 0 / 51. 32. 0
  libavcodec   53. 42. 0 / 53. 42. 0
  libavformat  53. 24. 0 / 53. 24. 0
  libavfilter   2. 53. 0 /  2. 53. 0
  libswscale    2.  1. 0 /  2.  1. 0
  libpostproc  51.  2. 0 / 51.  2. 0
WARNING: generic atexit() called from legacy shared library
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x26faaa0] multiple edit list entries, a/v desync might occur, patch welcome

Seems stream 1 codec frame rate differs from container frame rate: 180000.00 (180000/1) -> 90000.00 (180000/2)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/sdcard/41.mp4':
  Metadata:
    major_brand     : 3gp4
    minor_version   : 0
    compatible_brands: isom3gp4
    creation_time   : 1947-02-14 16:37:21
  Duration: 00:00:04.22, start: 0.000000, bitrate: 2849 kb/s
    Stream #0:0(eng): Audio: aac (mp4a / 0x6134706D), 8000 Hz, mono, s16, 10 kb/s
    Metadata:
      creation_time   : 1947-02-14 16:37:21
      handler_name    : SoundHandle
    Stream #0:1(eng): Video: h264 (avc1 / 0x31637661), yuv420p, 720x480, 3122 kb/s, SAR 65536:65536 DAR 3:2, 28.03 fps, 90k tbr, 90k tbn, 180k tbc
    Metadata:
      creation_time   : 1947-02-14 16:37:21
      handler_name    : VideoHandle
At least one output file must be specified

相关内容