[FFmpeg-user] Extracting starting timecode info using ffmpeg/ffprobe
Kieran O Leary
kieran.o.leary at gmail.com
Thu Sep 3 10:26:28 CEST 2015
On Wed, Sep 2, 2015 at 10:03 AM, Francois Visagie
<francois.visagie at gmail.com> wrote:
>
> What is the exact command-line that works better for you now, along with some sample output?
Here's the script, by the way, can you send me yours?
https://github.com/kieranjol/ifi-ffv1
Here's what the console looks like when it's executing that part of my script.
+ framerate=($(ffprobe -v error -select_streams v:0 -show_entries
stream=avg_frame_rate -of default=noprint_wrappers=1:nokey=1 "$1"))
++ ffprobe -v error -select_streams v:0 -show_entries
stream=avg_frame_rate -of default=noprint_wrappers=1:nokey=1
'augtest/v210 space.mov'
+ IFS=:
+ read -a timecode
++ ffprobe -v error -show_entries stream_tags=timecode -of
default=noprint_wrappers=1:nokey=1 '/augtest/v210 space.mov'
+ printf -v timecode ''\''%s\:%s\:%s\:%s'\''' 01 00 00 00
+ echo ''\''01\:00\:00\:00'\'''
'01\:00\:00\:00'
+ drawtext_options=(fontsize=45 fontfile="/Library/Fonts/Arial
Black.ttf" fontcolor=white timecode="$timecode" rate="$framerate"
boxcolor=0x000000AA box=1 x=360-text_w/2 y=480)
++ IFS=:
++ echo 'fontsize=45:fontfile=/Library/Fonts/Arial
Black.ttf:fontcolor=white:timecode='\''01\:00\:00\:00'\'':rate=2997/100:boxcolor=0x000000AA:box=1:x=360-text_w/2:y=480'
+ drawtext_options='fontsize=45:fontfile=/Library/Fonts/Arial
Black.ttf:fontcolor=white:timecode='\''01\:00\:00\:00'\'':rate=2997/100:boxcolor=0x000000AA:box=1:x=360-text_w/2:y=480'
+ ffmpeg -i '//augtest/v210 space.mov' -c:v libx264 -crf 23 -pix_fmt
yuv420p -vf 'drawtext=fontsize=45:fontfile=/Library/Fonts/Arial
Black.ttf:fontcolor=white:timecode='\''01\:00\:00\:00'\'':rate=2997/100:boxcolor=0x000000AA:box=1:x=360-text_w/2:y=480'
'/augtest/v210 space/proxy/v210 space_BITC.mov'
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-libfreetype --enable-libfaac --enable-libass --enable-ffplay
--enable-libopenjpeg --disable-decoder=jpeg2000
--extra-cflags='-I/usr/local/Cellar/openjpeg/1.5.2_1/include/openjpeg-1.5
' --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 '/augtest/v210 space.mov':
Metadata:
major_brand : qt
minor_version : 512
compatible_brands: qt
encoder : Lavf56.36.100
Duration: 00:00:01.02, start: 0.021333, bitrate: 219045 kb/s
Stream #0:0(eng): Video: v210 (v210 / 0x30313276), yuv422p10le,
720x486, 223724 kb/s, SAR 10:11 DAR 400:297, 29.97 fps, 29.97 tbr,
11988 tbn, 11988 tbc (default)
Metadata:
handler_name : DataHandler
encoder : Lavc56.41.100 v210
timecode : 01:00:00:00
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
stereo, fltp, 110 kb/s (default)
Metadata:
handler_name : DataHandler
Stream #0:2(eng): Data: none (tmcd / 0x64636D74), 0 kb/s
Metadata:
handler_name : DataHandler
timecode : 01:00:00:00
[libx264 @ 0x7fa2f382f000] using SAR=10/11
[libx264 @ 0x7fa2f382f000] using cpu capabilities: MMX2 SSE2Fast SSSE3
SSE4.2 AVX
[libx264 @ 0x7fa2f382f000] profile High, level 3.1
[libx264 @ 0x7fa2f382f000] 264 - core 146 r2555 0c21480 - H.264/MPEG-4
AVC codec - Copyleft 2003-2015 - 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=6 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 '/augtest/v210 space/proxy/v210 space_BITC.mov':
Metadata:
major_brand : qt
minor_version : 512
compatible_brands: qt
encoder : Lavf56.36.100
Stream #0:0(eng): Video: h264 (libx264) (avc1 / 0x31637661),
yuv420p, 720x486 [SAR 10:11 DAR 400:297], q=-1--1, 29.97 fps, 11988
tbn, 29.97 tbc (default)
Metadata:
handler_name : DataHandler
timecode : 01:00:00:00
encoder : Lavc56.41.100 libx264
Stream #0:1(eng): Audio: aac (libfaac) (mp4a / 0x6134706D), 48000
Hz, stereo, s16, 128 kb/s (default)
Metadata:
handler_name : DataHandler
encoder : Lavc56.41.100 libfaac
Stream mapping:
Stream #0:0 -> #0:0 (v210 (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (aac (native) -> aac (libfaac))
Press [q] to stop, [?] for help
frame= 31 fps=0.0 q=-1.0 Lsize= 517kB time=00:00:01.02
bitrate=4134.2kbits/s dup=1 drop=0
video:500kB audio:14kB subtitle:0kB other streams:0kB global
headers:0kB muxing overhead: 0.562701%
[libx264 @ 0x7fa2f382f000] frame I:2 Avg QP:30.83 size: 50676
[libx264 @ 0x7fa2f382f000] frame P:29 Avg QP:27.50 size: 14149
[libx264 @ 0x7fa2f382f000] mb I I16..4: 16.4% 47.1% 36.5%
[libx264 @ 0x7fa2f382f000] mb P I16..4: 16.8% 23.6% 6.6% P16..4:
28.8% 6.3% 4.0% 0.0% 0.0% skip:13.9%
[libx264 @ 0x7fa2f382f000] 8x8 transform intra:49.9% inter:82.5%
[libx264 @ 0x7fa2f382f000] coded y,uvDC,uvAC intra: 52.3% 72.6% 42.9%
inter: 20.4% 60.6% 12.3%
[libx264 @ 0x7fa2f382f000] i16 v,h,dc,p: 59% 35% 4% 3%
[libx264 @ 0x7fa2f382f000] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 41% 20% 30%
2% 1% 1% 1% 2% 2%
[libx264 @ 0x7fa2f382f000] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 64% 11%
1% 1% 1% 1% 1% 2%
[libx264 @ 0x7fa2f382f000] i8c dc,h,v,p: 25% 43% 24% 9%
[libx264 @ 0x7fa2f382f000] Weighted P-Frames: Y:3.4% UV:0.0%
[libx264 @ 0x7fa2f382f000] ref P L0: 57.9% 10.1% 22.4% 9.5% 0.1%
[libx264 @ 0x7fa2f382f000] kb/s:3957.32
+ break
More information about the ffmpeg-user
mailing list