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 FFMPEG installed on my CentoS 6 x64 system:

FFmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers
  built on Jan 29 2012 17:52:15 with gcc 4.4.5 20110214 (Red Hat 4.4.5-6)
  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --enable-avfilter --enable-avfilter-lavf --enable-libdc1394 --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab
  libavutil     50.15. 1 / 50.15. 1
  libavcodec    52.72. 2 / 52.72. 2
  libavformat   52.64. 2 / 52.64. 2
  libavdevice   52. 2. 0 / 52. 2. 0
  libavfilter    1.19. 0 /  1.19. 0
  libswscale     0.11. 0 /  0.11. 0
  libpostproc   51. 2. 0 / 51. 2. 0

I am trying to concatenate videos uploaded from mobile phones - they can be any mix of Android and iPhone uploads. This process seems to work fine for iPhone videos, but for Android (3GP4) videos, it keeps copying the same frames and progresses extremely slowly:

[root@ks383641 html]# ./interleave.sh /mnt/content/09zmWtIt8EvimTIy.mp4 /mnt/content/09zmWtIt8EvimTIy.mp4 out.mp4
MultiMedia Concat Script v1.3 (mmcat) - A script to concatenate multiple multimedia files.
Based on FFmpeg - www.ffmpeg.org
Don't forget to edit this script and change EXTRA_OPTIONS

FFmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers
  built on Jan 29 2012 17:52:15 with gcc 4.4.5 20110214 (Red Hat 4.4.5-6)
  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --enable-avfilter --enable-avfilter-lavf --enable-libdc1394 --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab
  libavutil     50.15. 1 / 50.15. 1
  libavcodec    52.72. 2 / 52.72. 2
  libavformat   52.64. 2 / 52.64. 2
  libavdevice   52. 2. 0 / 52. 2. 0
  libavfilter    1.19. 0 /  1.19. 0
  libswscale     0.11. 0 /  0.11. 0
  libpostproc   51. 2. 0 / 51. 2. 0
[u16le @ 0xff3690]Estimating duration from bitrate, this may be inaccurate
Input #0, u16le, from '/tmp/mcs_a_all':
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0.0: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s
[yuv4mpegpipe @ 0xffce20]Estimating duration from bitrate, this may be inaccurate
Input #1, yuv4mpegpipe, from '/tmp/mcs_v_all':
  Duration: N/A, bitrate: N/A
    Stream #1.0: Video: rawvideo, yuv420p, 1920x1080, 90k tbr, 90k tbn, 90k tbc
File 'out.mp4' already exists. Overwrite ? [y/N] y
[libx264 @ 0x1007a90]MB rate (734400000) > level limit (983040)
[libx264 @ 0x1007a90]using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
[libx264 @ 0x1007a90]profile Constrained Baseline, level 5.1
[libx264 @ 0x1007a90]264 - core 107 - H.264/MPEG-4 AVC codec - Copyleft 2003-2010 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0x1:0 me=dia subme=0 psy=1 psy_rd=0.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=4 sliced_threads=0 nr=0 decimate=1 interlaced=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=10 qpmax=51 qpstep=4 ip_ratio=1.41 aq=0
Output #0, mp4, to 'out.mp4':
  Metadata:
    encoder         : Lavf52.64.2
    Stream #0.0: Video: libx264, yuv420p, 1920x1080, q=10-51, 200 kb/s, 90k tbn, 90k tbc
    Stream #0.1: Audio: libfaac, 44100 Hz, 2 channels, s16, 128 kb/s
Stream mapping:
  Stream #1.0 -> #0.0
  Stream #0.0 -> #0.1
Press [q] to stop encoding
frame= 1662 fps=239 q=-1.0 Lsize=     378kB time=0.02 bitrate=167700.6kbits/s dup=0 drop=17    
video:364kB audio:0kB global headers:0kB muxing overhead 3.895104%
[libx264 @ 0x1007a90]frame I:7     Avg QP:18.29  size: 45202
[libx264 @ 0x1007a90]frame P:1655  Avg QP:21.00  size:    34
[libx264 @ 0x1007a90]mb I  I16..4: 77.0%  0.0% 23.0%
[libx264 @ 0x1007a90]mb P  I16..4:  0.0%  0.0%  0.0%  P16..4:  0.0%  0.0%  0.0%  0.0%  0.0%    skip:99.9%
[libx264 @ 0x1007a90]coded y,uvDC,uvAC intra: 20.0% 35.7% 8.8% inter: 0.0% 0.0% 0.0%
[libx264 @ 0x1007a90]i16 v,h,dc,p: 72% 17%  6%  5%
[libx264 @ 0x1007a90]i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 30% 25%  2%  4%  2%  5%  2%  6%
[libx264 @ 0x1007a90]i8c dc,h,v,p: 56% 22% 16%  6%
[libx264 @ 0x1007a90]kb/s:161117.11
Received signal 2: terminating.
^C

I am using the following script. Is there a special way to concatenate Android videos? If so, how can I do this?

share|improve this question
    
So.. what exactly is your problem here? –  KronoS May 21 '13 at 14:52
1  
@KronoS "it keeps copying the same frames and progresses extremely slowly" :) –  slhck May 21 '13 at 15:28
    
I haven't the slightest idea why this was closed. –  Tanner May 23 '13 at 18:06
    
@Tanner because it was very difficult to see what exactly the problem was that he was facing. Also, there really wasn't a question found within this post. It was "I have a problem...." and that's it. I've updated the post to be more of a question now, so hopefully this might help. –  KronoS May 23 '13 at 18:34

2 Answers 2

up vote 2 down vote accepted

You are using a very old version of FFmpeg, which can probably not handle that file format the right way. Update FFmpeg to a recent version which can be found at the FFmpeg download page

share|improve this answer
    
This fixed it. For anyone reading, do not use the default (0.6.5) version in the RPMforge YUM repo, get the RPMfusion repo instead :) –  James Hadley May 21 '13 at 16:18

First, get a more up-to-date version of ffmpeg. Then, instead of using that script, use the concat demuxer as described in the ffmpeg wiki page you linked to; if that doesn't work, try the concat filter (from the same page).

Concat Demuxer

First, create a file called something like inputs.txt, containing lines like:

file '/path/to/file1'
file '/path/to/file2'
file '/path/to/file3'

Then use the demuxer like so:

ffmpeg -f concat -i inputs.txt -c copy output.mp4
## or something like:
ffmpeg -f concat -i inputs.txt -c:v libx264 -preset veryfast -crf 22 -c:a copy output.mp4
share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.