[FFmpeg-user] 24h timecode max

Christian Johannesen chrisjohannesen at gmail.com
Wed Jan 30 01:01:23 EET 2019


I'm using the -timecode option to set the output starting timecode, but I
was hoping to enforce a 24 hour max, so that if I set a value of
23:59:59:00, it will round back to 00:00:00:00 after a second of timecode.
I can see that in my output mov file, the timecode continues to 24:00:00:00
and past that.

I saw in timecode.c there is AV_TIMECODE_FLAG_24HOURSMAX, but i'm not sure
how I could utilize it. It only seems that the Drawtext filter has an
option for to limit the value.

Let me know if there is anything I can do to achieve this result.

Thanks,
Chris

>ffmpeg -f lavfi -i testsrc -t 2 -timecode 23:59:59:00 24hourtimecode.mov
ffmpeg version N-93044-g2e2b44baba Copyright (c) 2000-2019 the FFmpeg
developers
  built with gcc 8.2.1 (GCC) 20181201
  configuration: --enable-gpl --enable-version3 --enable-sdl2
--enable-fontconfig --enable-gnutls --enable-iconv --enable-libass
--enable-libdav1d --enable-libbluray --enable-libfreetype
--enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy
--enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx
--enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265
--enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp
--enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc
--enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom
--enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid
--enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2
--enable-avisynth --enable-libopenmpt
  libavutil      56. 26.100 / 56. 26.100
  libavcodec     58. 46.100 / 58. 46.100
  libavformat    58. 26.100 / 58. 26.100
  libavdevice    58.  6.101 / 58.  6.101
  libavfilter     7. 48.100 /  7. 48.100
  libswscale      5.  4.100 /  5.  4.100
  libswresample   3.  4.100 /  3.  4.100
  libpostproc    55.  4.100 / 55.  4.100
Input #0, lavfi, from 'testsrc':
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 320x240
[SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 000000e314573540] using SAR=1/1
[libx264 @ 000000e314573540] using cpu capabilities: MMX2 SSE2Fast SSSE3
SSE4.2 AVX
[libx264 @ 000000e314573540] profile High 4:4:4 Predictive, level 1.3,
4:4:4, 8-bit
[libx264 @ 000000e314573540] 264 - core 157 r2935 545de2f - H.264/MPEG-4
AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html -
options: cabac=1 ref=3 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1
psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=0
cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=4 threads=7
lookahead_threads=1 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, mov, to '24hourtimecode.mov':
  Metadata:
    timecode        : 23:59:59:00
    encoder         : Lavf58.26.100
    Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv444p,
320x240 [SAR 1:1 DAR 4:3], q=-1--1, 0.04 fps, 12800 tbn, 25 tbc
    Metadata:
      encoder         : Lavc58.46.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
frame=   50 fps=0.0 q=-1.0 Lsize=      13kB time=00:00:01.88 bitrate=
57.2kbits/s speed=7.51x
video:11kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 17.537411%
[libx264 @ 000000e314573540] frame I:1     Avg QP:16.09  size:  2937
[libx264 @ 000000e314573540] frame P:14    Avg QP:14.29  size:   426
[libx264 @ 000000e314573540] frame B:35    Avg QP:14.08  size:    52
[libx264 @ 000000e314573540] consecutive B-frames:  4.0%  0.0% 24.0% 72.0%
[libx264 @ 000000e314573540] mb I  I16..4: 72.0%  0.0% 28.0%
[libx264 @ 000000e314573540] mb P  I16..4:  3.1%  0.0%  0.8%  P16..4:
8.2%  3.8%  2.2%  0.0%  0.0%    skip:82.0%
[libx264 @ 000000e314573540] mb B  I16..4:  0.4%  0.0%  0.0%  B16..8:
3.1%  0.1%  0.0%  direct: 0.2%  skip:96.2%  L0:45.3% L1:49.3% BI: 5.4%
[libx264 @ 000000e314573540] coded y,u,v intra: 11.1% 11.3% 10.4% inter:
0.7% 0.8% 0.6%
[libx264 @ 000000e314573540] i16 v,h,dc,p: 67% 20%  3% 10%
[libx264 @ 000000e314573540] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 39% 39% 16%
2%  1%  1%  0%  1%  0%
[libx264 @ 000000e314573540] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 000000e314573540] ref P L0: 70.9%  5.5% 19.2%  4.3%
[libx264 @ 000000e314573540] ref B L0: 69.6% 27.5%  2.9%
[libx264 @ 000000e314573540] ref B L1: 96.3%  3.7%
[libx264 @ 000000e314573540] kb/s:42.96


More information about the ffmpeg-user mailing list