[FFmpeg-user] timecode_frame_start option has no effect

bouke bouke at editb.nl
Thu Aug 9 12:24:49 CEST 2012


----- Original Message ----- 
From: "Werner Robitza" <werner.robitza at gmail.com>
To: "FFmpeg user questions and RTFMs" <ffmpeg-user at ffmpeg.org>
Sent: Thursday, August 09, 2012 10:47 AM
Subject: [FFmpeg-user] timecode_frame_start option has no effect


> I'm trying to cut a video starting from an exact frame position, using the
> "timecode_frame_start" option.
> For example, I'll use this video:
> http://www.seaotter.com/marine/movies/hermit-long-01.mpg
>
> It seems the option has no effect at all, regardless of where I put it. 
> The
> resulting video always starts at the same frame position.

Werner,
This is not what the command does, it is intended to set the start TC value.
(but that probably does not even work on Mp4 output, it does on QT (and 
perhaps other formats).)
Use -ss instead (be warned it might not be frame accurate)

hth,
Bouke


> Does this have to do with "max_analyze_duration"?
>
> --------------
>
> With encoding to x264/AAC
>
>  % ffmpeg -i hermit-long-01.mpg -timecode_frame_start:v 200 -c:v libx264
> -c:a libfaac out-cut2.mp4
> ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers
>  built on Jul 30 2012 19:13:08 with clang 4.0 
> ((tags/Apple/clang-421.0.57))
>  configuration: --prefix=/usr/local/Cellar/ffmpeg/0.11.1 --enable-shared
> --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables
> --enable-libfreetype --cc=/usr/bin/clang --host-cflags='-Os -w -pipe
> -march=native -Qunused-arguments -mmacosx-version-min=10.8'
> --host-ldflags='-L/usr/local/Cellar/gettext/0.18.1.1/lib -L/usr/local/lib
> -L/opt/X11/lib' --enable-libx264 --enable-libfaac --enable-libmp3lame
> --enable-librtmp --enable-libtheora --enable-libvorbis --enable-libvpx
> --enable-libxvid --enable-libopencore-amrnb --enable-libopencore-amrwb
> --enable-libass --enable-libvo-aacenc --disable-ffplay
>  libavutil      51. 54.100 / 51. 54.100
>  libavcodec     54. 23.100 / 54. 23.100
>  libavformat    54.  6.100 / 54.  6.100
>  libavdevice    54.  0.100 / 54.  0.100
>  libavfilter     2. 77.100 /  2. 77.100
>  libswscale      2.  1.100 /  2.  1.100
>  libswresample   0. 15.100 /  0. 15.100
>  libpostproc    52.  0.100 / 52.  0.100
> [mpegvideo @ 0x7fcef901e200] max_analyze_duration 5000000 reached at 
> 5005000
> [mpegvideo @ 0x7fcef901e200] Estimating duration from bitrate, this may be
> inaccurate
> Input #0, mpegvideo, from 'hermit-long-01.mpg':
>  Duration: 00:00:21.47, bitrate: 2000 kb/s
>    Stream #0:0: Video: mpeg1video, yuv420p, 352x240 [SAR 200:219 DAR
> 880:657], 2000 kb/s, 29.97 fps, 29.97 tbr, 1200k tbn, 29.97 tbc
> File 'out-cut2.mp4' already exists. Overwrite ? [y/N] y
> w:352 h:240 pixfmt:yuv420p tb:1/1200000 sar:200/219 sws_param:flags=2
> [buffersink @ 0x7fcef8c183c0] No opaque field provided
> [libx264 @ 0x7fcef9170e00] using SAR=200/219
> [libx264 @ 0x7fcef9170e00] using cpu capabilities: MMX2 SSE2Fast SSSE3
> FastShuffle SSE4.2 AVX
> [libx264 @ 0x7fcef9170e00] profile High, level 1.3
> [libx264 @ 0x7fcef9170e00] 264 - core 124 - H.264/MPEG-4 AVC codec -
> Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=1
> ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 
> psy_rd=1.00:0.00
> mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 
> deadzone=21,11
> fast_pskip=1 chroma_qp_offset=-2 threads=12 sliced_threads=0 nr=0
> decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3
> b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2
> keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 
> rc=crf
> mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40
> aq=1:1.00
> Output #0, mp4, to 'out-cut2.mp4':
>  Metadata:
>    encoder         : Lavf54.6.100
>    Stream #0:0: Video: h264 (![0][0][0] / 0x0021), yuv420p, 352x240 [SAR
> 200:219 DAR 880:657], q=-1--1, 30k tbn, 29.97 tbc
> Stream mapping:
>  Stream #0:0 -> #0:0 (mpeg1video -> libx264)
> Press [q] to stop, [?] for help
> frame=  645 fps=360 q=0.0 Lsize=    1613kB time=00:00:21.45 bitrate=
> 616.0kbits/s
> video:1605kB audio:0kB global headers:0kB muxing overhead 0.511522%
> [libx264 @ 0x7fcef9170e00] frame I:3     Avg QP:25.32  size:  9475
> [libx264 @ 0x7fcef9170e00] frame P:338   Avg QP:27.28  size:  3748
> [libx264 @ 0x7fcef9170e00] frame B:304   Avg QP:30.95  size:  1144
> [libx264 @ 0x7fcef9170e00] consecutive B-frames:  5.7% 94.3%  0.0%  0.0%
> [libx264 @ 0x7fcef9170e00] mb I  I16..4:  0.4% 86.7% 12.9%
> [libx264 @ 0x7fcef9170e00] mb P  I16..4:  0.5%  8.8%  0.9%  P16..4: 39.5%
> 32.9% 15.0%  0.0%  0.0%    skip: 2.4%
> [libx264 @ 0x7fcef9170e00] mb B  I16..4:  0.0%  0.8%  0.0%  B16..8: 45.7%
> 12.1%  2.9%  direct: 7.2%  skip:31.2%  L0:31.9% L1:48.6% BI:19.5%
> [libx264 @ 0x7fcef9170e00] 8x8 transform intra:86.9% inter:73.0%
> [libx264 @ 0x7fcef9170e00] coded y,uvDC,uvAC intra: 89.0% 63.1% 22.1%
> inter: 48.0% 33.7% 3.2%
> [libx264 @ 0x7fcef9170e00] i16 v,h,dc,p: 48% 33%  7% 12%
> [libx264 @ 0x7fcef9170e00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 14% 18% 17%  6%
> 9%  8% 10%  8% 10%
> [libx264 @ 0x7fcef9170e00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 19% 12%  6%
> 10%  9%  9%  8%  7%
> [libx264 @ 0x7fcef9170e00] i8c dc,h,v,p: 62% 17% 14%  6%
> [libx264 @ 0x7fcef9170e00] Weighted P-Frames: Y:24.9% UV:8.0%
> [libx264 @ 0x7fcef9170e00] ref P L0: 54.5% 28.6% 11.2%  4.8%  0.9%
> [libx264 @ 0x7fcef9170e00] ref B L0: 95.0%  5.0%
> [libx264 @ 0x7fcef9170e00] kb/s:610.75
>
>
> With bitstream copy:
>
>  % ffmpeg -i hermit-long-01.mpg -timecode_frame_start:v 200 -c:v copy -c:a
> copy out-cut3.mpg
> ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers
>  built on Jul 30 2012 19:13:08 with clang 4.0 
> ((tags/Apple/clang-421.0.57))
>  configuration: --prefix=/usr/local/Cellar/ffmpeg/0.11.1 --enable-shared
> --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables
> --enable-libfreetype --cc=/usr/bin/clang --host-cflags='-Os -w -pipe
> -march=native -Qunused-arguments -mmacosx-version-min=10.8'
> --host-ldflags='-L/usr/local/Cellar/gettext/0.18.1.1/lib -L/usr/local/lib
> -L/opt/X11/lib' --enable-libx264 --enable-libfaac --enable-libmp3lame
> --enable-librtmp --enable-libtheora --enable-libvorbis --enable-libvpx
> --enable-libxvid --enable-libopencore-amrnb --enable-libopencore-amrwb
> --enable-libass --enable-libvo-aacenc --disable-ffplay
>  libavutil      51. 54.100 / 51. 54.100
>  libavcodec     54. 23.100 / 54. 23.100
>  libavformat    54.  6.100 / 54.  6.100
>  libavdevice    54.  0.100 / 54.  0.100
>  libavfilter     2. 77.100 /  2. 77.100
>  libswscale      2.  1.100 /  2.  1.100
>  libswresample   0. 15.100 /  0. 15.100
>  libpostproc    52.  0.100 / 52.  0.100
> [mpegvideo @ 0x7fba7881e200] max_analyze_duration 5000000 reached at 
> 5005000
> [mpegvideo @ 0x7fba7881e200] Estimating duration from bitrate, this may be
> inaccurate
> Input #0, mpegvideo, from 'hermit-long-01.mpg':
>  Duration: 00:00:21.47, bitrate: 2000 kb/s
>    Stream #0:0: Video: mpeg1video, yuv420p, 352x240 [SAR 200:219 DAR
> 880:657], 2000 kb/s, 29.97 fps, 29.97 tbr, 1200k tbn, 29.97 tbc
> Output #0, mpeg, to 'out-cut3.mpg':
>  Metadata:
>    encoder         : Lavf54.6.100
>    Stream #0:0: Video: mpeg1video, yuv420p, 352x240 [SAR 200:219 DAR
> 880:657], q=2-31, 2000 kb/s, 29.97 fps, 90k tbn, 29.97 tbc
> Stream mapping:
>  Stream #0:0 -> #0:0 (copy)
> Press [q] to stop, [?] for help
> frame=  645 fps=0.0 q=-1.0 Lsize=    5270kB time=00:00:21.52
> bitrate=2006.0kbits/s
> video:5242kB audio:0kB global headers:0kB muxing overhead 0.525027%
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user 




More information about the ffmpeg-user mailing list