ffmpeg error when using non root user - ffmpeg
I have installed ffmpeg and it works perfect if you are root or using sudo but it errors out when trying to use it as a non-root user. I have performed the same install on a test VPS and it installs without issue so it appears to be isolated to this cPanel server. I haven't been able to identify why.
Non-Root:
> ffmpeg -v debug -i 1.mov 1.avi ffmpeg version N-65949-g0ddb051
> Copyright (c) 2000-2014 the FFmpeg developers built on Aug 28 2014
> 11:39:47 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-4)
> configuration: --enable-gpl --enable-libmp3lame --enable-libvorbis
> --enable-libvpx --enable-libx264 libavutil 54. 7.100 / 54. 7.100 libavcodec 56. 0.101 / 56. 0.101 libavformat 56. 3.100 / 56. 3.100 libavdevice 56. 0.100 / 56. 0.100 libavfilter 5. 0.103 / 5. 0.103 libswscale 3. 0.100 /
> 3. 0.100 libswresample 1. 1.100 / 1. 1.100 libpostproc 53. 0.100 / 53. 0.100 Splitting the commandline. Reading option '-v' ... matched as option 'v' (set logging level) with argument 'debug'.
> Reading option '-i' ... matched as input file with argument '1.mov'.
> Reading option '1.avi' ... matched as output file. Finished splitting
> the commandline. Parsing a group of options: global . Applying option
> v (set logging level) with argument debug. Successfully parsed a group
> of options. Parsing a group of options: input file 1.mov. Successfully
> parsed a group of options. Opening an input file: 1.mov.
> [mov,mp4,m4a,3gp,3g2,mj2 # 0x348fc20] Format mov,mp4,m4a,3gp,3g2,mj2
> probed with size=2048 and score=100 [mov,mp4,m4a,3gp,3g2,mj2 #
> 0x348fc20] ISO: File Type Major Brand: qt [mov,mp4,m4a,3gp,3g2,mj2 #
> 0x348fc20] Before avformat_find_stream_info() pos: 698348 bytes
> read:39602 seeks:1 [mov,mp4,m4a,3gp,3g2,mj2 # 0x348fc20] All info
> found [mov,mp4,m4a,3gp,3g2,mj2 # 0x348fc20] After
> avformat_find_stream_info() pos: 169190 bytes read:2333362 seeks:67
> frames:148 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1.mov':
> Metadata:
> major_brand : qt
> minor_version : 0
> compatible_brands: qt
> creation_time : 2014-06-05 04:40:27
> model : iPhone 5
> model-eng : iPhone 5
> encoder : 7.1.1
> encoder-eng : 7.1.1
> date : 2014-06-04T21:40:27-0700
> date-eng : 2014-06-04T21:40:27-0700
> make : Apple
> make-eng : Apple Duration: 00:00:07.15, start: 0.000023, bitrate: 781 kb/s
> Stream #0:0(und), 41, 1/600: Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p(tv, smpte170m), 480x360, 1/1200, 710 kb/s, 29.09
> fps, 600 tbr, 600 tbn, 1200 tbc (default)
> Metadata:
> rotate : 90
> creation_time : 2014-06-05 04:40:27
> handler_name : Core Media Data Handler
> encoder : H.264
> Side data:
> displaymatrix: rotation of -90.00 degrees
> Stream #0:1(und), 107, 1/44100: Audio: aac (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 63 kb/s (default)
> Metadata:
> creation_time : 2014-06-05 04:40:27
> handler_name : Core Media Data Handler Successfully opened the file. Parsing a group of options: output file 1.avi. Successfully
> parsed a group of options. Opening an output file: 1.avi. Successfully
> opened the file. detected 24 logical cores [graph 0 input from stream
> 0:0 # 0x34aa3a0] Setting 'video_size' to value '480x360' [graph 0
> input from stream 0:0 # 0x34aa3a0] Setting 'pix_fmt' to value '0'
> [graph 0 input from stream 0:0 # 0x34aa3a0] Setting 'time_base' to
> value '1/600' [graph 0 input from stream 0:0 # 0x34aa3a0] Setting
> 'pixel_aspect' to value '0/1' [graph 0 input from stream 0:0 #
> 0x34aa3a0] Setting 'sws_param' to value 'flags=2' [graph 0 input from
> stream 0:0 # 0x34aa3a0] Setting 'frame_rate' to value '320/11' [graph
> 0 input from stream 0:0 # 0x34aa3a0] w:480 h:360 pixfmt:yuv420p
> tb:1/600 fr:320/11 sar:0/1 sws_param:flags=2 [format # 0x3496b00]
> compat: called with args=[yuv420p] [format # 0x3496b00] Setting
> 'pix_fmts' to value 'yuv420p' [AVFilterGraph # 0x348f320]
> query_formats: 4 queried, 3 merged, 0 already done, 0 delayed
> [AVFilterGraph # 0x34bbe60] Error initializing threading.
> [AVFilterGraph # 0x34bbe60] Error creating filter 'anull' Error
> opening filters! [AVIOContext # 0x34967c0] Statistics: 0 seeks, 0
> writeouts [AVIOContext # 0x348f1e0] Statistics: 2333362 bytes read, 67
> seeks
[AVFilterGraph # 0x34bbe60] Error initializing threading.
[AVFilterGraph # 0x34bbe60] Error creating filter 'anull' Error
opening filters!
As ROOT:
ffmpeg -v verbose -i 1.mov 1.avi
ffmpeg version N-65949-g0ddb051 Copyright (c) 2000-2014 the FFmpeg developers
built on Aug 28 2014 11:39:47 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-4)
configuration: --enable-gpl --enable-libmp3lame --enable-libvorbis --enable-libvpx --enable-libx264
libavutil 54. 7.100 / 54. 7.100
libavcodec 56. 0.101 / 56. 0.101
libavformat 56. 3.100 / 56. 3.100
libavdevice 56. 0.100 / 56. 0.100
libavfilter 5. 0.103 / 5. 0.103
libswscale 3. 0.100 / 3. 0.100
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 0.100 / 53. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1.mov':
Metadata:
major_brand : qt
minor_version : 0
compatible_brands: qt
creation_time : 2014-06-05 04:40:27
model : iPhone 5
model-eng : iPhone 5
encoder : 7.1.1
encoder-eng : 7.1.1
date : 2014-06-04T21:40:27-0700
date-eng : 2014-06-04T21:40:27-0700
make : Apple
make-eng : Apple
Duration: 00:00:07.15, start: 0.000023, bitrate: 781 kb/s
Stream #0:0(und): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p(tv, smpte170m), 480x360, 710 kb/s, 29.09 fps, 600 tbr, 600 tbn, 1200 tbc (default)
Metadata:
rotate : 90
creation_time : 2014-06-05 04:40:27
handler_name : Core Media Data Handler
encoder : H.264
Side data:
displaymatrix: rotation of -90.00 degrees
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 63 kb/s (default)
Metadata:
creation_time : 2014-06-05 04:40:27
handler_name : Core Media Data Handler
[graph 0 input from stream 0:0 # 0x27ed3a0] w:480 h:360 pixfmt:yuv420p tb:1/600 fr:320/11 sar:0/1 sws_param:flags=2
[graph 1 input from stream 0:1 # 0x2800700] tb:1/44100 samplefmt:fltp samplerate:44100 chlayout:0x4
Output #0, avi, to '1.avi':
Metadata:
major_brand : qt
minor_version : 0
compatible_brands: qt
make-eng : Apple
model : iPhone 5
model-eng : iPhone 5
make : Apple
ISFT : Lavf56.3.100
ICRD : 2014-06-04T21:40:27-0700
date-eng : 2014-06-04T21:40:27-0700
Stream #0:0(und): Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 480x360, q=2-31, 200 kb/s, 29.09 fps, 29.09 tbn, 29.09 tbc (default)
Metadata:
rotate : 90
creation_time : 2014-06-05 04:40:27
handler_name : Core Media Data Handler
encoder : Lavc56.0.101 mpeg4
Stream #0:1(und): Audio: mp3 (libmp3lame) (U[0][0][0] / 0x0055), 44100 Hz, mono, fltp (default)
Metadata:
creation_time : 2014-06-05 04:40:27
handler_name : Core Media Data Handler
encoder : Lavc56.0.101 libmp3lame
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> mpeg4 (native))
Stream #0:1 -> #0:1 (aac (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
*** dropping frame 79 from stream 0 at ts 80
*** dropping frame 113 from stream 0 at ts 114
*** dropping frame 145 from stream 0 at ts 146
*** dropping frame 177 from stream 0 at ts 178
No more output streams to write to, finishing.
frame= 204 fps=0.0 q=27.2 Lsize= 348kB time=00:00:07.15 bitrate= 398.4kbits/s dup=0 drop=4
video:271kB audio:56kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 6.560985%
Input file #0 (1.mov):
Input stream #0:0 (video): 208 packets read (634624 bytes); 208 frames decoded;
Input stream #0:1 (audio): 308 packets read (56854 bytes); 308 frames decoded (315392 samples);
Total: 516 packets (691478 bytes) demuxed
Output file #0 (1.avi):
Output stream #0:0 (video): 204 frames encoded; 204 packets muxed (276993 bytes);
Output stream #0:1 (audio): 274 frames encoded (315392 samples); 275 packets muxed (57469 bytes);
Total: 479 packets (334462 bytes) muxed
strace and strace -e outputs:
strace non root:
579 clone(child_stack=0x7fd3bfd07ff0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS| CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7fd3bfd089d0, tls=0x7fd3bfd08700, child_tidptr=0x7fd3bfd089d0) = 3 2637
580 mmap(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7fd3bed07000
581 mprotect(0x7fd3bed07000, 4096, PROT_NONE) = 0
582 clone(child_stack=0x7fd3bf506ff0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS| CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7fd3bf5079d0, tls=0x7fd3bf507700, child_tidptr=0x7fd3bf5079d0) = - 1 EAGAIN (Resource temporarily unavailable)
583 futex(0x253b420, FUTEX_WAKE_PRIVATE, 1) = 1
584 futex(0x253b3f4, FUTEX_CMP_REQUEUE_PRIVATE, 1, 2147483647, 0x253b420, 4) = 2
585 futex(0x253b420, FUTEX_WAKE_PRIVATE, 1) = 1
586 futex(0x7fd3c2d0e9d0, FUTEX_WAIT, 32631, NULL) = 0
587 munmap(0x7fd3bed07000, 8392704) = 0
588 munmap(0x7fd3c250e000, 8392704) = 0
589 munmap(0x7fd3c1d0d000, 8392704) = 0
590 munmap(0x7fd3c150c000, 8392704) = 0
591 write(2, "\33[1;32m[AVFilterGraph # 0x253b0a"..., 39[AVFilterGraph # 0x253b0a0] ) = 39
592 write(2, "\33[1;31mError initializing thread"..., 41Error initializing threading.
593 ) = 41
594 write(2, "\33[1;32m[AVFilterGraph # 0x253b0a"..., 39[AVFilterGraph # 0x253b0a0] ) = 39
595 write(2, "\33[1;31mError creating filter 'an"..., 41Error creating filter 'anull'
596 ) = 41
597 write(2, "\33[4;31mError opening filters!\n\33["..., 34Error opening filters!
598 ) = 34
strace -e non root:
strace -e open ffmpeg -i 1.mov 5.avi
open("/etc/ld.so.cache", O_RDONLY) = 3
open("/lib64/libasound.so.2", O_RDONLY) = 3
open("/usr/lib64/libSDL-1.2.so.0", O_RDONLY) = 3
open("/lib64/libpthread.so.0", O_RDONLY) = 3
open("/usr/lib64/libx264.so.142", O_RDONLY) = 3
open("/usr/lib64/libvpx.so.0", O_RDONLY) = 3
open("/usr/local/lib/libvorbisenc.so.2", O_RDONLY) = 3
open("/usr/local/lib/libvorbis.so.0", O_RDONLY) = 3
open("/usr/local/lib/libmp3lame.so.0", O_RDONLY) = 3
open("/lib64/libm.so.6", O_RDONLY) = 3
open("/lib64/libbz2.so.1", O_RDONLY) = 3
open("/usr/local/lib/libz.so.1", O_RDONLY) = 3
open("/lib64/librt.so.1", O_RDONLY) = 3
open("/lib64/libc.so.6", O_RDONLY) = 3
open("/lib64/libdl.so.2", O_RDONLY) = 3
open("/usr/local/lib/libogg.so.0", O_RDONLY) = 3
ffmpeg version N-65949-g0ddb051 Copyright (c) 2000-2014 the FFmpeg developers
built on Aug 28 2014 11:39:47 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-4)
configuration: --enable-gpl --enable-libmp3lame --enable-libvorbis --enable-libvpx --enable-libx264
libavutil 54. 7.100 / 54. 7.100
libavcodec 56. 0.101 / 56. 0.101
libavformat 56. 3.100 / 56. 3.100
libavdevice 56. 0.100 / 56. 0.100
libavfilter 5. 0.103 / 5. 0.103
libswscale 3. 0.100 / 3. 0.100
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 0.100 / 53. 0.100
open("1.mov", O_RDONLY|O_CLOEXEC) = 3
open("/etc/localtime", O_RDONLY) = 4
open("/proc/meminfo", O_RDONLY|O_CLOEXEC) = 4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1.mov':
Metadata:
major_brand : qt
minor_version : 0
compatible_brands: qt
creation_time : 2014-06-05 04:40:27
model : iPhone 5
model-eng : iPhone 5
encoder : 7.1.1
encoder-eng : 7.1.1
date : 2014-06-04T21:40:27-0700
date-eng : 2014-06-04T21:40:27-0700
make : Apple
make-eng : Apple
Duration: 00:00:07.15, start: 0.000023, bitrate: 781 kb/s
Stream #0:0(und): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p(tv, smpte170m), 480x360, 710 kb/s, 29.09 fps, 600 tbr, 600 tbn, 1200 tbc (default)
Metadata:
rotate : 90
creation_time : 2014-06-05 04:40:27
handler_name : Core Media Data Handler
encoder : H.264
Side data:
displaymatrix: rotation of -90.00 degrees
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 63 kb/s (default)
Metadata:
creation_time : 2014-06-05 04:40:27
handler_name : Core Media Data Handler
open("5.avi", O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0666) = 4
[AVFilterGraph # 0x26ff4a0] Error initializing threading.
[AVFilterGraph # 0x26ff4a0] Error creating filter 'anull'
Error opening filters!
strace root:
579 clone(child_stack=0x7f4eb7c34ff0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS| CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f4eb7c359d0, tls=0x7f4eb7c35700, child_tidptr=0x7f4eb7c359d0) = 3 383
580 mmap(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f4eb6c34000
581 mprotect(0x7f4eb6c34000, 4096, PROT_NONE) = 0
582 clone(child_stack=0x7f4eb7433ff0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS| CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f4eb74349d0, tls=0x7f4eb7434700, child_tidptr=0x7f4eb74349d0) = 3 384
583 mmap(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f4eb6433000
584 mprotect(0x7f4eb6433000, 4096, PROT_NONE) = 0
585 clone(child_stack=0x7f4eb6c32ff0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS| CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f4eb6c339d0, tls=0x7f4eb6c33700, child_tidptr=0x7f4eb6c339d0) = 3 385
586 mmap(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f4eb5c32000
587 mprotect(0x7f4eb5c32000, 4096, PROT_NONE) = 0
588 clone(child_stack=0x7f4eb6431ff0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS| CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f4eb64329d0, tls=0x7f4eb6432700, child_tidptr=0x7f4eb64329d0) = 3 386
589 mmap(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f4eb5431000
590 mprotect(0x7f4eb5431000, 4096, PROT_NONE) = 0
591 clone(child_stack=0x7f4eb5c30ff0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS| CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f4eb5c319d0, tls=0x7f4eb5c31700, child_tidptr=0x7f4eb5c319d0) = 3 387
592 mmap(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f4eb4c30000
593 mprotect(0x7f4eb4c30000, 4096, PROT_NONE) = 0
594 clone(child_stack=0x7f4eb542fff0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS| CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f4eb54309d0, tls=0x7f4eb5430700, child_tidptr=0x7f4eb54309d0) = 3 388
595 mmap(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f4eb442f000
596 mprotect(0x7f4eb442f000, 4096, PROT_NONE) = 0
597 clone(child_stack=0x7f4eb4c2eff0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS| CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f4eb4c2f9d0, tls=0x7f4eb4c2f700, child_tidptr=0x7f4eb4c2f9d0) = 3 389
598 mmap(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f4eb3c2e000
strace -e root:
strace -e open ffmpeg -i 1.mov 5.avi
open("/etc/ld.so.cache", O_RDONLY) = 3
open("/lib64/libasound.so.2", O_RDONLY) = 3
open("/usr/lib64/libSDL-1.2.so.0", O_RDONLY) = 3
open("/lib64/libpthread.so.0", O_RDONLY) = 3
open("/usr/lib64/libx264.so.142", O_RDONLY) = 3
open("/usr/lib64/libvpx.so.0", O_RDONLY) = 3
open("/usr/local/lib/libvorbisenc.so.2", O_RDONLY) = 3
open("/usr/local/lib/libvorbis.so.0", O_RDONLY) = 3
open("/usr/local/lib/libmp3lame.so.0", O_RDONLY) = 3
open("/lib64/libm.so.6", O_RDONLY) = 3
open("/lib64/libbz2.so.1", O_RDONLY) = 3
open("/usr/local/lib/libz.so.1", O_RDONLY) = 3
open("/lib64/librt.so.1", O_RDONLY) = 3
open("/lib64/libc.so.6", O_RDONLY) = 3
open("/lib64/libdl.so.2", O_RDONLY) = 3
open("/usr/local/lib/libogg.so.0", O_RDONLY) = 3
ffmpeg version N-65957-gc6a3b00 Copyright (c) 2000-2014 the FFmpeg developers
built on Aug 28 2014 13:37:32 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-4)
configuration: --enable-gpl --enable-libmp3lame --enable-libvorbis --enable-libvpx --enable-libx264 --prefix=/usr --libdir=/usr/lib64 --enable-gpl --enable-libmp3lame --enable-libvorbis --enable-libvpx --enable-libx264
libavutil 54. 7.100 / 54. 7.100
libavcodec 56. 0.101 / 56. 0.101
libavformat 56. 3.100 / 56. 3.100
libavdevice 56. 0.100 / 56. 0.100
libavfilter 5. 0.103 / 5. 0.103
libswscale 3. 0.100 / 3. 0.100
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 0.100 / 53. 0.100
open("1.mov", O_RDONLY|O_CLOEXEC) = 3
open("/etc/localtime", O_RDONLY) = 4
open("/proc/meminfo", O_RDONLY|O_CLOEXEC) = 4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1.mov':
Metadata:
major_brand : qt
minor_version : 0
compatible_brands: qt
creation_time : 2014-06-05 04:40:27
model : iPhone 5
model-eng : iPhone 5
encoder : 7.1.1
encoder-eng : 7.1.1
date : 2014-06-04T21:40:27-0700
date-eng : 2014-06-04T21:40:27-0700
make : Apple
make-eng : Apple
Duration: 00:00:07.15, start: 0.000023, bitrate: 781 kb/s
Stream #0:0(und): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p(tv, smpte170m), 480x360, 710 kb/s, 29.09 fps, 600 tbr, 600 tbn, 1200 tbc (default)
Metadata:
rotate : 90
creation_time : 2014-06-05 04:40:27
handler_name : Core Media Data Handler
encoder : H.264
Side data:
displaymatrix: rotation of -90.00 degrees
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 63 kb/s (default)
Metadata:
creation_time : 2014-06-05 04:40:27
handler_name : Core Media Data Handler
File '5.avi' already exists. Overwrite ? [y/N] y
open("5.avi", O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0666) = 4
Output #0, avi, to '5.avi':
Metadata:
major_brand : qt
minor_version : 0
compatible_brands: qt
make-eng : Apple
model : iPhone 5
model-eng : iPhone 5
make : Apple
ISFT : Lavf56.3.100
ICRD : 2014-06-04T21:40:27-0700
date-eng : 2014-06-04T21:40:27-0700
Stream #0:0(und): Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 480x360, q=2-31, 200 kb/s, 29.09 fps, 29.09 tbn, 29.09 tbc (default)
Metadata:
rotate : 90
creation_time : 2014-06-05 04:40:27
handler_name : Core Media Data Handler
encoder : Lavc56.0.101 mpeg4
Stream #0:1(und): Audio: mp3 (libmp3lame) (U[0][0][0] / 0x0055), 44100 Hz, mono, fltp (default)
Metadata:
creation_time : 2014-06-05 04:40:27
handler_name : Core Media Data Handler
encoder : Lavc56.0.101 libmp3lame
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> mpeg4 (native))
Stream #0:1 -> #0:1 (aac (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
frame= 204 fps=0.0 q=27.2 Lsize= 348kB time=00:00:07.15 bitrate= 398.4kbits/s dup=0 drop=4
video:271kB audio:56kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 6.560985%
The strace output shows that the non-root run fails its second call to clone with EAGAIN. According to the manual pages clone(2) and fork(2), this means the system has reached a limit on the number of threads the user may create.
The likely culprit is the per-process resource limit. Run ulimit -u to see what the current process's limit is, then try raising it and trying again.
Related
ffmpeg nvidia hwaccel yuv444p raw frame output
I use ffmpeg to do frame decimation, millions of video I have to use nvidia gpu card (tesla P4) to optimize performance my ffmpeg command is ffmpeg -hwaccel cuvid -c:v h264_cuvid -i ./a.mp4 -c:v nvenc -vf "scale_npp=format=yuv444p" -r 1 ./\%08d.raw but the output data format is weird, I don't know what the format is and how to decode it I want to know how to decode these data or how to output ream rawdata, can anybody help me? Log: built with gcc 8.2.0 (GCC) configuration: --cc=/opt/compiler/gcc-8.2/bin/gcc --disable-x86asm --enable-cuda --enable-cuvid --enable-nvenc --enable-nvdec --enable-nonfree --enable-libnpp --enable-libx264 --enable-gpl --enable-debug=3 --disable-optimizations --disable-stripping --extra-cflags='-I/home/work/cuda-10.0/include -g3' --extra-ldflags=-L/home/work/cuda-10.0/lib64 --prefix=/home/work/ffmpeg libavutil 56. 36.101 / 56. 36.101 libavcodec 58. 65.100 / 58. 65.10 libavformat 58. 35.101 / 58. 35.101 libavdevice 58. 9.101 / 58. 9.101 libavfilter 7. 69.101 / 7. 69.101 libswscale 5. 6.100 / 5. 6.100 libswresample 3. 6.100 / 3. 6.100 libpostproc 55. 6.100 / 55. 6.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from './a.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf57.71.100 Duration: 00:50:41.28, start: 0.000000, bitrate: 862 kb/s Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 640x360 >[SAR 1:1 DAR 16:9], 825 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc (default) Metadata: handler_name : VideoHandler Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 29 kb/s (default) Metadata: handler_name : SoundHandler Stream mapping: Stream #0:0 -> #0:0 (h264 (h264_cuvid) -> h264 (nvenc)) Stream #0:1 -> #1:0 (aac (native) -> pcm_s16le (native)) Press [q] to stop, [?] for help Output #1, wav, to './audio.wav': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 ISFT : Lavf58.35.101 Stream #1:0(eng): Audio: pcm_s16le ([1][0][0][0] / 0x0001), 16000 Hz, mono, s16, 256 kb/s (default) Metadata: handler_name : SoundHandler encoder : Lavc58.65.100 pcm_s16le [nvenc # 0x44bbc40] This encoder is deprecated, use 'h264_nvenc' instead Output #0, image2, to './%08d.raw': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf58.35.101 Stream #0:0(eng): Video: h264 (nvenc) (High 4:4:4 Predictive), cuda, 640x360 [SAR 1:1 DAR 16:9], q=-1--1, 2000 kb/s, 1 fps, 1 tbn, 1 tbc (default) Metadata: handler_name : VideoHandler encoder : Lavc58.65.100 nvenc Side data: cpb: bitrate max/min/avg: 0/0/2000000 buffer size: 4000000 vbv_delay: N/A frame= 3043 fps= 52 q=4.0 Lsize=N/A time=00:50:43.00 bitrate=N/A dup=0 drop=72984 speed=52.3x video:245435kB audio:6250kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
ffmpeg overlay video with transparent background
I have 2 videos: background (mp4) and overlay (mov), overlay has transparent background. I am trying to put video with transparent background as overlay on top of background video. But unfortunately overlay completely cover background video with black background instead of transparency. I am using following command: Here is the full output for the command: ffmpeg -y -i rec_20151027_123445.mp4 -vf "[in]format=rgba[ina];movie=overlay_1920x1080_1.mov[o];[ina][o]overlay=0:0" -vcodec qtrle converted.mov ffmpeg version 2.6 Copyright (c) 2000-2015 the FFmpeg developers built with Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn) configuration: --prefix=/usr/local/Cellar/ffmpeg/2.6_1 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-vda libavutil 54. 20.100 / 54. 20.100 libavcodec 56. 26.100 / 56. 26.100 libavformat 56. 25.101 / 56. 25.101 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 11.102 / 5. 11.102 libavresample 2. 1. 0 / 2. 1. 0 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 1.100 / 1. 1.100 libpostproc 53. 3.100 / 53. 3.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'rec_20151027_123445.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 creation_time : 2015-10-27 10:34:57 location : +50.0474+036.2031/ location-eng : +50.0474+036.2031/ Duration: 00:00:06.04, start: 0.000000, bitrate: 16863 kb/s Stream #0:0(eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p, 1920x1080, 16837 kb/s, SAR 1:1 DAR 16:9, 29.62 fps, 29.75 tbr, 90k tbn, 180k tbc (default) Metadata: creation_time : 2015-10-27 10:34:57 handler_name : VideoHandle Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 95 kb/s (default) Metadata: creation_time : 2015-10-27 10:34:57 handler_name : SoundHandle [swscaler # 0x7fa3db0ada00] No accelerated colorspace conversion found from yuva420p to argb. Output #0, mov, to 'converted.mov': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 location-eng : +50.0474+036.2031/ location : +50.0474+036.2031/ encoder : Lavf56.25.101 Stream #0:0(eng): Video: qtrle (rle / 0x20656C72), argb, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 29.75 fps, 15232 tbn, 29.75 tbc (default) Metadata: creation_time : 2015-10-27 10:34:57 handler_name : VideoHandle encoder : Lavc56.26.100 qtrle Stream #0:1(eng): Audio: aac (libvo_aacenc) (mp4a / 0x6134706D), 48000 Hz, mono, s16, 128 kb/s (default) Metadata: creation_time : 2015-10-27 10:34:57 handler_name : SoundHandle encoder : Lavc56.26.100 libvo_aacenc Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> qtrle (native)) Stream #0:1 -> #0:1 (aac (native) -> aac (libvo_aacenc)) Press [q] to stop, [?] for help frame= 179 fps= 19 q=0.0 Lsize= 126621kB time=00:00:06.05 bitrate=171213.2kbits/s dup=1 drop=1 video:126519kB audio:95kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.005055%
ffmpeg - video processing - create transition with blank video
ffmpeg newbie here struggling to do something that apparently should be easy. I want to concatenate three videos, being one of them just a blank video two seconds transition. First I generate the blank video with: ffmpeg -f lavfi -i color=c=black:s=320x240:d=0.5 silent.mp4 After I try to concat it with two other videos I have: ffmpeg -i video-a.mp4 -i 2-seconds-silent-video.mp4 -i video-b.mp4 -y -filter_complex concat=n=3:v=1:a=1 result.mp4 What I'm getting: ffmpeg version 2.7.2 Copyright (c) 2000-2015 the FFmpeg developers built with Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn) configuration: --prefix=/usr/local/Cellar/ffmpeg/2.7.2_1 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-libvpx --enable-libfdk-aac --enable-libx265 --enable-nonfree --enable-vda libavutil 54. 27.100 / 54. 27.100 libavcodec 56. 41.100 / 56. 41.100 libavformat 56. 36.100 / 56. 36.100 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 16.101 / 5. 16.101 libavresample 2. 1. 0 / 2. 1. 0 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 2.100 / 1. 2.100 libpostproc 53. 3.100 / 53. 3.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video-a.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf56.40.101 Duration: 00:00:03.03, start: 0.033333, bitrate: 822 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 691 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default) Metadata: handler_name : VideoHandler Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default) Metadata: handler_name : SoundHandler Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '2-seconds-silent-video.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf56.40.101 Duration: 00:00:02.00, start: 0.000000, bitrate: 17 kb/s Stream #1:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 11 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default) Metadata: handler_name : VideoHandler Input #2, mov,mp4,m4a,3gp,3g2,mj2, from 'video-b.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf56.40.101 Duration: 00:00:03.03, start: 0.033333, bitrate: 745 kb/s Stream #2:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 613 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default) Metadata: handler_name : VideoHandler Stream #2:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 129 kb/s (default) Metadata: handler_name : SoundHandler Cannot find a matching stream for unlabeled input pad 5 on filter Parsed_concat_0 What I also tried without success: ffmpeg -y -i "concat:video-a.mp4|2-seconds-silent-video.mp4|video-b.mp4" -c copy result.mp4 Result: ffmpeg version 2.7.2 Copyright (c) 2000-2015 the FFmpeg developers built with Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn) configuration: --prefix=/usr/local/Cellar/ffmpeg/2.7.2_1 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-libvpx --enable-libfdk-aac --enable-libx265 --enable-nonfree --enable-vda libavutil 54. 27.100 / 54. 27.100 libavcodec 56. 41.100 / 56. 41.100 libavformat 56. 36.100 / 56. 36.100 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 16.101 / 5. 16.101 libavresample 2. 1. 0 / 2. 1. 0 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 2.100 / 1. 2.100 libpostproc 53. 3.100 / 53. 3.100 [mov,mp4,m4a,3gp,3g2,mj2 # 0x7fd12a812800] Found duplicated MOOV Atom. Skipped it Last message repeated 1 times Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'concat:video-a.mp4|2-seconds-silent-video.mp4|video-b.mp4': Metadata: encoder : Lavf56.40.101 minor_version : 512 major_brand : isom compatible_brands: isomiso2avc1mp41 Duration: 00:00:03.03, start: 0.033333, bitrate: 1579 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 691 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default) Metadata: handler_name : VideoHandler Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default) Metadata: handler_name : SoundHandler [mp4 # 0x7fd12a033a00] Codec for stream 0 does not use global headers but container format requires global headers [mp4 # 0x7fd12a033a00] Codec for stream 1 does not use global headers but container format requires global headers Output #0, mp4, to 'result.mp4': Metadata: compatible_brands: isomiso2avc1mp41 minor_version : 512 major_brand : isom encoder : Lavf56.36.100 Stream #0:0(und): Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 691 kb/s, 25 fps, 25 tbr, 12800 tbn, 12800 tbc (default) Metadata: handler_name : VideoHandler Stream #0:1(und): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo, 128 kb/s (default) Metadata: handler_name : SoundHandler Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help frame= 75 fps=0.0 q=-1.0 Lsize= 305kB time=00:00:03.05 bitrate= 818.1kbits/s video:253kB audio:48kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.179313%
There's no audio stream when I generate my blank video. The solution is add a silent audio stream to the video: ffmpeg -y -f lavfi -i anullsrc -i 2-seconds-silent-video.mp4 -shortest -c:v copy -c:a aac -strict experimental silent-video.mp4 answered here by #miindlek, thank you. where I found the line above: adding silent audio in ffmpeg
TCP 5454 and 554 connection refused ffmpeg
i am convert my rtmp streaming to rtsp streaming using ffmpeg. the following code is doing the convert ffmpeg -i rtmp://xxxxx.com/live/live1 -f rtsp rtsp://xxxxx.com:5454/test1-rtsp.mpg After running above command it's return the following console. and i am getting connection refused for rtsp 5454 and aslo 554. how can i solve this ? ffmpeg version N-60489-g03911c4 Copyright (c) 2000-2014 the FFmpeg developers built on Feb 10 2014 05:44:38 with gcc 4.6 (Debian 4.6.3-1) configuration: --prefix=/root/ffmpeg-static/64bit --extra-cflags='-I/root/ffmpeg-static/64bit/include -static' --extra-ldflags='-L/root/ffmpeg-static/64bit/lib -static' --extra-libs='-lxml2 -lexpat -lfreetype' --enable-static --disable-shared --disable-ffserver --disable-doc --enable-bzlib --enable-zlib --enable-postproc --enable-runtime-cpudetect --enable-libx264 --enable-gpl --enable-libtheora --enable-libvorbis --enable-libmp3lame --enable-gray --enable-libass --enable-libfreetype --enable-libopenjpeg --enable-libspeex --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-version3 --enable-libvpx libavutil 52. 63.101 / 52. 63.101 libavcodec 55. 50.100 / 55. 50.100 libavformat 55. 31.100 / 55. 31.100 libavdevice 55. 8.100 / 55. 8.100 libavfilter 4. 1.102 / 4. 1.102 libswscale 2. 5.101 / 2. 5.101 libswresample 0. 17.104 / 0. 17.104 libpostproc 52. 3.100 / 52. 3.100 [flv # 0x40d1440] Stream discovered after head already parsed Input #0, flv, from 'rtmp://xxxxx.com/jiljillive/live1': Metadata: videokeyframe_frequency: 5 avclevel : 31 videodevice : Broadcast SC Video Filter keywords : audiochannels : 2 presetname : Custom copyright : audioinputvolume: 100 creationdate : Tue Feb 11 08:47:50 2014 : author : audiodevice : Microphone (SplitCam Virtual Au avcprofile : 66 title : description : rating : Duration: N/A, start: 0.000000, bitrate: 438 kb/s Stream #0:0: Video: h264 (Baseline), yuv420p(tv), 320x240 [SAR 1:1 DAR 4:3], 307 kb/s, 25 fps, 25 tbr, 1k tbn, 50 tbc Stream #0:1: Audio: mp3, 44100 Hz, stereo, s16p, 131 kb/s Stream #0:2: Data: none [tcp # 0x40f9c60] Connection to tcp://emedias.com:5454?timeout=0 failed: Connection refused Output #0, rtsp, to 'rtsp://xxxxxx.com:5454/test1-rtsp.mpg': Metadata: videokeyframe_frequency: 5 avclevel : 31 videodevice : Broadcast SC Video Filter keywords : audiochannels : 2 presetname : Custom copyright : audioinputvolume: 100 creationdate : Tue Feb 11 08:47:50 2014 : author : audiodevice : Microphone (SplitCam Virtual Au avcprofile : 66 title : description : rating : encoder : Lavf55.31.100 Stream #0:0: Video: mpeg4, yuv420p, 320x240 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 90k tbn, 25 tbc Stream #0:1: Audio: aac (libvo_aacenc), 44100 Hz, stereo, s16, 128 kb/s Stream mapping: Stream #0:0 -> #0:0 (h264 -> mpeg4) Stream #0:1 -> #0:1 (mp3 -> libvo_aacenc) Could not write header for output file #0 (incorrect codec parameters ?): Input/output error
ffmpeg trying to remove the first few seconds of video
I'm trying to remove a few seconds off the front of a video stream (audio already excluded), and I'm getting strange results: I would think that for every second I increase -ss by, the resulting file would be a second shorter... that doesn't seem to be the case. original ==> 01:04:52.84 -ss 19 ==> 01:04:42.84 (diff = 10) [command history shown below] -ss 20 ==> 01:04:32.84 (diff = 20) [command history shown below] -ss 21 ==> 01:04:32.84 (diff = 20) -ss 25 ==> 01:04:32.84 (diff = 20) -ss 0:0:25.0 ==> 01:04:32.84 (diff = 20) -ss 0:0:25.5 ==> 01:04:32.84 (diff = 20) [command history shown below] Command: ffmpeg -ss # -i temp.mp4 -y -vcodec copy temp_croppedFromStart.mp4 Here's the command history for 19 & 20 # ffmpeg -ss 19 -i temp.mp4 -y -vcodec copy temp_croppedFromStart.mp4; ffmpeg -i temp.mp4 2>&1 | grep Duration; ffmpeg -i temp_croppedFromStart.mp4 2>&1 | grep Duration ffmpeg version N-31809-g9acffed, Copyright (c) 2000-2011 the FFmpeg developers built on Aug 10 2011 21:25:11 with gcc 4.4.5 configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab libavutil 51. 11. 1 / 51. 11. 1 libavcodec 53. 10. 0 / 53. 10. 0 libavformat 53. 6. 0 / 53. 6. 0 libavdevice 53. 2. 0 / 53. 2. 0 libavfilter 2. 28. 1 / 2. 28. 1 libswscale 2. 0. 0 / 2. 0. 0 libpostproc 51. 2. 0 / 51. 2. 0 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'temp.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 creation_time : 1970-01-01 00:00:00 encoder : Lavf53.6.0 Duration: 01:04:52.84, start: 0.000000, bitrate: 553 kb/s Stream #0.0(und): Video: h264 (Constrained Baseline), yuv420p, 960x640, 552 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc Metadata: creation_time : 1970-01-01 00:00:00 Output #0, mp4, to 'temp_croppedFromStart.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 creation_time : 1970-01-01 00:00:00 encoder : Lavf53.6.0 Stream #0.0(und): Video: libx264, yuv420p, 960x640, q=2-31, 552 kb/s, 25 tbn, 25 tbc Metadata: creation_time : 1970-01-01 00:00:00 Stream mapping: Stream #0.0 -> #0.0 Press [q] to stop, [?] for help frame=97071 fps=42523 q=-1.0 Lsize= 262684kB time=01:04:33.84 bitrate= 555.5kbits/s video:261923kB audio:0kB global headers:0kB muxing overhead 0.290418% Duration: 01:04:52.84, start: 0.000000, bitrate: 553 kb/s Duration: 01:04:42.84, start: 0.000000, bitrate: 554 kb/s # ffmpeg -ss 20 -i temp.mp4 -y -vcodec copy temp_croppedFromStart.mp4; ffmpeg -i temp.mp4 2>&1 | grep Duration; ffmpeg -i temp_croppedFromStart.mp4 2>&1 | grep Duration ffmpeg version N-31809-g9acffed, Copyright (c) 2000-2011 the FFmpeg developers built on Aug 10 2011 21:25:11 with gcc 4.4.5 configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab libavutil 51. 11. 1 / 51. 11. 1 libavcodec 53. 10. 0 / 53. 10. 0 libavformat 53. 6. 0 / 53. 6. 0 libavdevice 53. 2. 0 / 53. 2. 0 libavfilter 2. 28. 1 / 2. 28. 1 libswscale 2. 0. 0 / 2. 0. 0 libpostproc 51. 2. 0 / 51. 2. 0 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'temp.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 creation_time : 1970-01-01 00:00:00 encoder : Lavf53.6.0 Duration: 01:04:52.84, start: 0.000000, bitrate: 553 kb/s Stream #0.0(und): Video: h264 (Constrained Baseline), yuv420p, 960x640, 552 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc Metadata: creation_time : 1970-01-01 00:00:00 Output #0, mp4, to 'temp_croppedFromStart.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 creation_time : 1970-01-01 00:00:00 encoder : Lavf53.6.0 Stream #0.0(und): Video: libx264, yuv420p, 960x640, q=2-31, 552 kb/s, 25 tbn, 25 tbc Metadata: creation_time : 1970-01-01 00:00:00 Stream mapping: Stream #0.0 -> #0.0 Press [q] to stop, [?] for help frame=96821 fps=47168 q=-1.0 Lsize= 262003kB time=01:04:32.84 bitrate= 554.2kbits/s video:261244kB audio:0kB global headers:0kB muxing overhead 0.290410% Duration: 01:04:52.84, start: 0.000000, bitrate: 553 kb/s Duration: 01:04:32.84, start: 0.000000, bitrate: 554 kb/s # ffmpeg -ss 0:0:25.5 -i temp.mp4 -y -vcodec copy temp_croppedFromStart.mp4; ffmpeg -i temp.mp4 2>&1 | grep Duration; ffmpeg -i temp_croppedFromStart.mp4 2>&1 | grep Duration ffmpeg version N-31809-g9acffed, Copyright (c) 2000-2011 the FFmpeg developers built on Aug 10 2011 21:25:11 with gcc 4.4.5 configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab libavutil 51. 11. 1 / 51. 11. 1 libavcodec 53. 10. 0 / 53. 10. 0 libavformat 53. 6. 0 / 53. 6. 0 libavdevice 53. 2. 0 / 53. 2. 0 libavfilter 2. 28. 1 / 2. 28. 1 libswscale 2. 0. 0 / 2. 0. 0 libpostproc 51. 2. 0 / 51. 2. 0 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'temp.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 creation_time : 1970-01-01 00:00:00 encoder : Lavf53.6.0 Duration: 01:04:52.84, start: 0.000000, bitrate: 553 kb/s Stream #0.0(und): Video: h264 (Constrained Baseline), yuv420p, 960x640, 552 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc Metadata: creation_time : 1970-01-01 00:00:00 Output #0, mp4, to 'temp_croppedFromStart.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 creation_time : 1970-01-01 00:00:00 encoder : Lavf53.6.0 Stream #0.0(und): Video: libx264, yuv420p, 960x640, q=2-31, 552 kb/s, 25 tbn, 25 tbc Metadata: creation_time : 1970-01-01 00:00:00 Stream mapping: Stream #0.0 -> #0.0 Press [q] to stop, [?] for help frame=96821 fps=45920 q=-1.0 Lsize= 262003kB time=01:04:27.32 bitrate= 555.0kbits/s video:261244kB audio:0kB global headers:0kB muxing overhead 0.290424% Duration: 01:04:52.84, start: 0.000000, bitrate: 553 kb/s Duration: 01:04:32.84, start: 0.000000, bitrate: 554 kb/s
Without re-encoding, you can only cut at an I-frame. Your I-frames look to be 10 seconds apart, which is rather long, but not unheard of. You can read more about what an I-frame is here: http://en.wikipedia.org/wiki/Video_compression_picture_types