Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have two mp4 files captured from different android devices. the ffmpeg output of each file is listed below. Can i re-encode two.mp4 so that the encoding options are the same as one.mp4? I cant see what is different about the 2 files, but they must be because when i try to overlay a jpg using -vf , two.mp4 doesnt encode properly rather it seems to encoding a massive file, i left it going for 1 hour, no output to console. Can i use ffmpeg to make two.mp4 'the same' as 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
share|improve this question
    
Could it be that you're just looking for -acodec copy -vcodec copy? –  Karma Fusebox Feb 17 '13 at 23:50
    
i tried this, it still hangs while overlaying the image to the new file , any other suggestions? –  user200036 Feb 18 '13 at 0:03
    
@KarmaFusebox The overlay filter can not be used with -vcodec copy because re-encoding is required. –  LordNeckbeard Feb 18 '13 at 1:39
1  
Please include the ffmpeg command using overlay and the complete ffmpeg console output (or at least most of it if it is stalling). –  LordNeckbeard Feb 18 '13 at 1:41
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.