
Recherche avancée
Autres articles (31)
-
ANNEXE : Les plugins utilisés spécifiquement pour la ferme
5 mars 2010, parLe site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)
-
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...) -
L’utiliser, en parler, le critiquer
10 avril 2011La première attitude à adopter est d’en parler, soit directement avec les personnes impliquées dans son développement, soit autour de vous pour convaincre de nouvelles personnes à l’utiliser.
Plus la communauté sera nombreuse et plus les évolutions seront rapides ...
Une liste de discussion est disponible pour tout échange entre utilisateurs.
Sur d’autres sites (5624)
-
Use ffmpeg to extract picture from m4v file
31 octobre 2017, par BrianI used a program called MetaZ on my mac to tag all my video files (m4v). I am now trying to use these m4v files in Kodi which requires .nfo files and separate picture files for movie posters, etc. I want to extract the picture that is already in the m4v file.
When I use ffprobe -show_streams, I can see that index4 is a png file (codec_name=png). How do I extract it ? I believe ffmpeg can do it, but can’t figure out how.
Here is the output from ffprobe :
Brians-Mac-mini:PythonScript brianjhille$ ffprobe -show_streams badwords.m4v
ffprobe version N-88046-g0cb8369-tessus Copyright (c) 2007-2017 the FFmpeg developers
built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libass --enable-libbluray --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --disable-ffplay
libavutil 56. 0.100 / 56. 0.100
libavcodec 58. 0.100 / 58. 0.100
libavformat 58. 0.100 / 58. 0.100
libavdevice 58. 0.100 / 58. 0.100
libavfilter 7. 0.100 / 7. 0.100
libswscale 5. 0.100 / 5. 0.100
libswresample 3. 0.100 / 3. 0.100
libpostproc 55. 0.100 / 55. 0.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fd67b002a00] stream 0, timescale not set
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'badwords.m4v':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: mp42isomavc1
creation_time : 2014-10-20T13:01:06.000000Z
iTunEXTC : mpaa|R|400|
title : Bad Words
artist : Jason Bateman, Kathryn Hahn, Allison Janney, Philip Baker Hall, Rohan Chand, Ben Falcone, Patricia Belcher, Beth Grant, Rachel Harris, Steve Witting, Greg Cromer
date : 2013-09-06T11:00:00Z
track : 0
disc : 0
season_number : 0
episode_sort : 0
description : A spelling bee loser sets out to exact revenge by finding a loophole and attempting to win as an adult.
synopsis : A spelling bee loser sets out to exact revenge by finding a loophole and attempting to win as an adult.
encoder : HandBrake 0.9.9 2013052900
hd_video : 0
media_type : 9
genre : Comedy
iTunMOVI : <?xml version="1.0" encoding="UTF-8"?>
:
: <plist version="1.0">
: <dict>
: <key>cast</key>
: <array>
: <dict>
: <key>name</key>
: <string>Jason Bateman</string>
: </dict>
: <dict>
: <key>name</key>
: <string>Kathryn Hahn</string>
: </dict>
: <dict>
: <key>name</key>
: <string>Allison Janney</string>
: </dict>
: <dict>
: <key>name</key>
: <string>Philip Baker Hall</string>
: </dict>
: <dict>
: <key>name</key>
: <string>Rohan Chand</string>
: </dict>
: <dict>
: <key>name</key>
: <string>Ben Falcone</string>
: </dict>
: <dict>
: <key>name</key>
: <string>Patricia Belcher</string>
: </dict>
: <dict>
: <key>name</key>
: <string>Beth Grant</string>
: </dict>
: <dict>
: <key>name</key>
: <string>Rachel Harris</string>
: </dict>
: <dict>
: <key>name</key>
: <string>Steve Witting</string>
: </dict>
: <dict>
: <key>name</key>
: <string>Greg Cromer</string>
: </dict>
: </array>
: </dict>
: </plist>
:
Duration: 01:29:02.84, start: 0.000000, bitrate: 1339 kb/s
Chapter #0:0: start 0.000000, end 348.214000
Metadata:
title : Chapter 1
Chapter #0:1: start 348.214000, end 676.542000
Metadata:
title : Chapter 2
Chapter #0:2: start 676.542000, end 860.058000
Metadata:
title : Chapter 3
Chapter #0:3: start 860.058000, end 1171.836000
Metadata:
title : Chapter 4
Chapter #0:4: start 1171.836000, end 1441.839000
Metadata:
title : Chapter 5
Chapter #0:5: start 1441.839000, end 1632.129000
Metadata:
title : Chapter 6
Chapter #0:6: start 1632.129000, end 1925.422000
Metadata:
title : Chapter 7
Chapter #0:7: start 1925.422000, end 2167.030000
Metadata:
title : Chapter 8
Chapter #0:8: start 2167.030000, end 2409.605000
Metadata:
title : Chapter 9
Chapter #0:9: start 2409.605000, end 2748.276000
Metadata:
title : Chapter 10
Chapter #0:10: start 2748.276000, end 2917.945000
Metadata:
title : Chapter 11
Chapter #0:11: start 2917.945000, end 3309.502000
Metadata:
title : Chapter 12
Chapter #0:12: start 3309.502000, end 3634.660000
Metadata:
title : Chapter 13
Chapter #0:13: start 3634.660000, end 3942.434000
Metadata:
title : Chapter 14
Chapter #0:14: start 3942.434000, end 4101.626000
Metadata:
title : Chapter 15
Chapter #0:15: start 4101.626000, end 4336.193000
Metadata:
title : Chapter 16
Chapter #0:16: start 4336.193000, end 4620.643000
Metadata:
title : Chapter 17
Chapter #0:17: start 4620.643000, end 4873.729000
Metadata:
title : Chapter 18
Chapter #0:18: start 4873.729000, end 5153.341000
Metadata:
title : Chapter 19
Chapter #0:19: start 5153.341000, end 5342.796000
Metadata:
title : Chapter 20
Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(tv, smpte170m/smpte170m/bt709), 720x356 [SAR 32:27 DAR 640:267], 716 kb/s, 23.98 fps, 59.94 tbr, 90k tbn, 180k tbc (default)
Metadata:
creation_time : 2014-10-20T13:01:06.000000Z
encoder : JVT/AVC Coding
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 159 kb/s (default)
Metadata:
creation_time : 2014-10-20T13:01:06.000000Z
Stream #0:2(eng): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 448 kb/s
Metadata:
creation_time : 2014-10-20T13:01:06.000000Z
Side data:
audio service type: main
Stream #0:3(und): Data: bin_data (text / 0x74786574)
Metadata:
creation_time : 2014-10-21T13:42:00.000000Z
Stream #0:4: Video: png, rgb24(pc), 1400x2100, 90k tbr, 90k tbn, 90k tbc
Unsupported codec with id 100359 for input stream 3
[STREAM]
index=0
codec_name=h264
codec_long_name=H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
profile=Constrained Baseline
codec_type=video
codec_time_base=40071281/1921695000
codec_tag_string=avc1
codec_tag=0x31637661
width=720
height=356
coded_width=720
coded_height=356
has_b_frames=0
sample_aspect_ratio=32:27
display_aspect_ratio=640:267
pix_fmt=yuv420p
level=30
color_range=tv
color_space=smpte170m
color_transfer=bt709
color_primaries=smpte170m
chroma_location=left
field_order=unknown
timecode=N/A
refs=1
is_avc=true
nal_length_size=4
id=N/A
r_frame_rate=60000/1001
avg_frame_rate=960847500/40071281
time_base=1/90000
start_pts=0
start_time=0.000000
duration_ts=480855372
duration=5342.837467
bit_rate=716167
max_bit_rate=N/A
bits_per_raw_sample=8
nb_frames=128113
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=1
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0
TAG:creation_time=2014-10-20T13:01:06.000000Z
TAG:language=und
TAG:encoder=JVT/AVC Coding
[/STREAM]
[STREAM]
index=1
codec_name=aac
codec_long_name=AAC (Advanced Audio Coding)
profile=LC
codec_type=audio
codec_time_base=1/48000
codec_tag_string=mp4a
codec_tag=0x6134706d
sample_fmt=fltp
sample_rate=48000
channels=2
channel_layout=stereo
bits_per_sample=0
id=N/A
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/48000
start_pts=0
start_time=0.000000
duration_ts=256454656
duration=5342.805333
bit_rate=159788
max_bit_rate=321176
bits_per_raw_sample=N/A
nb_frames=250444
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=1
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0
TAG:creation_time=2014-10-20T13:01:06.000000Z
TAG:language=eng
[/STREAM]
[STREAM]
index=2
codec_name=ac3
codec_long_name=ATSC A/52A (AC-3)
profile=unknown
codec_type=audio
codec_time_base=1/48000
codec_tag_string=ac-3
codec_tag=0x332d6361
sample_fmt=fltp
sample_rate=48000
channels=6
channel_layout=5.1(side)
bits_per_sample=0
dmix_mode=-1
ltrt_cmixlev=-1.000000
ltrt_surmixlev=-1.000000
loro_cmixlev=-1.000000
loro_surmixlev=-1.000000
id=N/A
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/48000
start_pts=0
start_time=0.000000
duration_ts=256453632
duration=5342.784000
bit_rate=448000
max_bit_rate=N/A
bits_per_raw_sample=N/A
nb_frames=166962
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=0
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0
TAG:creation_time=2014-10-20T13:01:06.000000Z
TAG:language=eng
[SIDE_DATA]
side_data_type=Audio Service Type
[/SIDE_DATA]
[/STREAM]
[STREAM]
index=3
codec_name=bin_data
codec_long_name=binary data
profile=unknown
codec_type=data
codec_tag_string=text
codec_tag=0x74786574
id=N/A
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/1000
start_pts=0
start_time=0.000000
duration_ts=5342837
duration=5342.837000
bit_rate=N/A
max_bit_rate=N/A
bits_per_raw_sample=N/A
nb_frames=20
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=0
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0
TAG:creation_time=2014-10-21T13:42:00.000000Z
TAG:language=und
[/STREAM]
[STREAM]
index=4
codec_name=png
codec_long_name=PNG (Portable Network Graphics) image
profile=unknown
codec_type=video
codec_time_base=0/1
codec_tag_string=[0][0][0][0]
codec_tag=0x0000
width=1400
height=2100
coded_width=1400
coded_height=2100
has_b_frames=0
sample_aspect_ratio=0:1
display_aspect_ratio=0:1
pix_fmt=rgb24
level=-99
color_range=pc
color_space=unknown
color_transfer=unknown
color_primaries=unknown
chroma_location=unspecified
field_order=unknown
timecode=N/A
refs=1
id=N/A
r_frame_rate=90000/1
avg_frame_rate=0/0
time_base=1/90000
start_pts=0
start_time=0.000000
duration_ts=480855372
duration=5342.837467
bit_rate=N/A
max_bit_rate=N/A
bits_per_raw_sample=N/A
nb_frames=N/A
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=0
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=1
DISPOSITION:timed_thumbnails=0
[/STREAM]Thanks. Brian
-
ffmpeg - splitting, overlaying and selecting frame range in multiple input/outputs with complex video filter producing empty output
11 octobre 2017, par Josep CarnerI am trying to use ffmpeg to apply multiple filters -single input, multiple outputs-. In concrete, I am splitting the output in two, then applying an overlaying patch to one of those streams, split again and select a time range. The command I am using is :
ffmpeg \
-i ./dataset_test/videos/jz_10_huron_barstow.mkv \
-an \
-sn \
-loglevel error \
-filter_complex \
"[0:v]split=2[L_in][F_in];
[L_in]
crop=226:307:21:74,scale=200x200,setdar=200:200,split=2\
[L_in_0][L_in_1];\
color=#808080:226x307,setpts=PTS-STARTPTS[L_PATCH];\
[F_in][L_PATCH]
overlay=21:74:shortest=1,scale=200x200,setdar=200:200,split=2\
[F_in_0][F_in_1];\
[F_in_0]select='between(t\,32\,212)',select='not(mod(n\,20))',setpts=(PTS-STARTPTS)/20[F_0];\
[F_in_1]select='between(t\,213\,393)',select='not(mod(n\,20))',setpts=(PTS-STARTPTS)/20[F_1];\
[L_in_0]select='between(t\,32\,212)',select='not(mod(n\,20))',setpts=(PTS-STARTPTS)/20[L_0];\
[L_in_1]select='between(t\,213\,393)',select='not(mod(n\,20))',setpts=(PTS-STARTPTS)/20[L_1]\
"\
-map [F_0] -an -sn ./out/jz_10_huron_barstow/F/0_F.mp4\
-map [F_1] -an -sn ./out/jz_10_huron_barstow/F/1_F.mp4\
-map [L_0] -an -sn ./out/jz_10_huron_barstow/L/0_L.mp4\
-map [L_1] -an -sn ./out/jz_10_huron_barstow/L/1_L.mp4\For some reason, 0_F.mp4 is empty and 1_F.mp4 is cropped. My intuition is that it has something to do with applying splitting + overlaying + selecting. I think at some point some filter before select is changing the PTS of the frames in some way select is not properly discarding them, but I honestly don’t know how to solve it. Some insights :
-
L_0 and L_1 are fine (no overlay is used in those two)
-
If I suppress L outputs everything works fine (no "split" is needed at the beginning)
Could someone provide some light ? I don’t really know what else to try.
The logs with loglevel 40 are (some repeated lines ommited) :ffmpeg version 2.8.1 Copyright (c) 2000-2015 the FFmpeg developers
built with Apple LLVM version 9.0.0 (clang-900.0.37)
configuration: --prefix=/usr/local/Cellar/ffmpeg/2.8.1_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-vda
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
libpostproc 53. 3.100 / 53. 3.100
Input #0, matroska,webm, from './dataset_test/videos/jz_10_huron_barstow.mkv':
Metadata:
ENCODER : Lavf57.66.104
Duration: 00:24:04.14, start: 0.000000, bitrate: 2117 kb/s
Stream #0:0: Video: h264 (Main), 1 reference frame, yuv420p, 1440x900 (1440x912) [SAR 1:1 DAR 8:5], 30 fps, 30 tbr, 1k tbn, 60 tbc (default)
Metadata:
ENCODER : Lavc57.83.100 h264_nvenc
DURATION : 00:24:04.102000000
Stream #0:1: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s (default)
Metadata:
ENCODER : Lavc57.83.100 ac3
DURATION : 00:24:04.135000000
[Parsed_scale_2 @ 0x7fdfd2403d20] w:200 h:200 flags:'bilinear' interl:0
[Parsed_setdar_3 @ 0x7fdfd240ad80] num:den syntax is deprecated, please use num/den or named options instead
[Parsed_color_5 @ 0x7fdfd24096a0] size:226x307 rate:25/1 duration:-1.000000 sar:1/1
[Parsed_scale_8 @ 0x7fdfd24092c0] w:200 h:200 flags:'bilinear' interl:0
[Parsed_setdar_9 @ 0x7fdfd240b360] num:den syntax is deprecated, please use num/den or named options instead
[Parsed_scale_2 @ 0x7fdfd2509b00] w:200 h:200 flags:'bilinear' interl:0
[Parsed_setdar_3 @ 0x7fdfd25092c0] num:den syntax is deprecated, please use num/den or named options instead
[Parsed_color_5 @ 0x7fdfd250a520] size:226x307 rate:25/1 duration:-1.000000 sar:1/1
[Parsed_scale_8 @ 0x7fdfd250b620] w:200 h:200 flags:'bilinear' interl:0
[Parsed_setdar_9 @ 0x7fdfd250a960] num:den syntax is deprecated, please use num/den or named options instead
[graph 0 input from stream 0:0 @ 0x7fdfd2511360] w:1440 h:900 pixfmt:yuv420p tb:1/1000 fr:30/1 sar:1/1 sws_param:flags=2
[Parsed_crop_1 @ 0x7fdfd2509c80] w:1440 h:900 sar:1/1 -> w:226 h:306 sar:1/1
[Parsed_scale_2 @ 0x7fdfd2509b00] w:226 h:306 fmt:yuv420p sar:1/1 -> w:200 h:200 fmt:yuv420p sar:113/153 flags:0x2
[Parsed_setdar_3 @ 0x7fdfd25092c0] w:200 h:200 dar:113/153 sar:113/153 -> dar:1/1 sar:1/1
[Parsed_select_21 @ 0x7fdfd250a760] TB:0.001000 FRAME_RATE:30.000000 SAMPLE_RATE:nan
[Parsed_select_18 @ 0x7fdfd250a080] TB:0.001000 FRAME_RATE:30.000000 SAMPLE_RATE:nan
[Parsed_color_5 @ 0x7fdfd250a520] TB:0.040000 FRAME_RATE:25.000000 SAMPLE_RATE:nan
[Parsed_overlay_7 @ 0x7fdfd250b020] main w:1440 h:900 fmt:yuv420p overlay w:226 h:306 fmt:yuva420p eof_action:endall
[Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Selected 1/1000 time base
[Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Sync level 2
[Parsed_scale_8 @ 0x7fdfd250b620] w:1440 h:900 fmt:yuv420p sar:1/1 -> w:200 h:200 fmt:yuv420p sar:8/5 flags:0x2
[Parsed_setdar_9 @ 0x7fdfd250a960] w:200 h:200 dar:8/5 sar:8/5 -> dar:1/1 sar:1/1
[Parsed_select_15 @ 0x7fdfd250dd00] TB:0.001000 FRAME_RATE:30.000000 SAMPLE_RATE:nan
[Parsed_select_12 @ 0x7fdfd250ca60] TB:0.001000 FRAME_RATE:30.000000 SAMPLE_RATE:nan
[libx264 @ 0x7fdfd4005e00] using SAR=1/1
[libx264 @ 0x7fdfd4005e00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0x7fdfd4005e00] profile High, level 1.2
[libx264 @ 0x7fdfd4005e00] 264 - core 148 r2601 a0cd7d3 - 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
[libx264 @ 0x7fdfd400f600] using SAR=1/1
[libx264 @ 0x7fdfd400f600] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0x7fdfd400f600] profile High, level 1.2
[libx264 @ 0x7fdfd400f600] 264 - core 148 r2601 a0cd7d3 - 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
[libx264 @ 0x7fdfd4018e00] using SAR=1/1
[libx264 @ 0x7fdfd4018e00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0x7fdfd4018e00] profile High, level 1.2
[libx264 @ 0x7fdfd4018e00] 264 - core 148 r2601 a0cd7d3 - 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
[libx264 @ 0x7fdfd4022600] using SAR=1/1
[libx264 @ 0x7fdfd4022600] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0x7fdfd4022600] profile High, level 1.2
[libx264 @ 0x7fdfd4022600] 264 - core 148 r2601 a0cd7d3 - 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, mp4, to './out/jz_10_huron_barstow/F/0_F.mp4':
Metadata:
encoder : Lavf56.40.101
Stream #0:0: Video: h264 (libx264), -1 reference frame ([33][0][0][0] / 0x0021), yuv420p, 200x200 [SAR 1:1 DAR 1:1], q=-1--1, 30 fps, 15360 tbn, 30 tbc (default)
Metadata:
encoder : Lavc56.60.100 libx264
Output #1, mp4, to './out/jz_10_huron_barstow/F/1_F.mp4':
Metadata:
encoder : Lavf56.40.101
Stream #1:0: Video: h264 (libx264), -1 reference frame ([33][0][0][0] / 0x0021), yuv420p, 200x200 [SAR 1:1 DAR 1:1], q=-1--1, 30 fps, 15360 tbn, 30 tbc (default)
Metadata:
encoder : Lavc56.60.100 libx264
Output #2, mp4, to './out/jz_10_huron_barstow/L/0_L.mp4':
Metadata:
encoder : Lavf56.40.101
Stream #2:0: Video: h264 (libx264), -1 reference frame ([33][0][0][0] / 0x0021), yuv420p, 200x200 [SAR 1:1 DAR 1:1], q=-1--1, 30 fps, 15360 tbn, 30 tbc (default)
Metadata:
encoder : Lavc56.60.100 libx264
Output #3, mp4, to './out/jz_10_huron_barstow/L/1_L.mp4':
Metadata:
encoder : Lavf56.40.101
Stream #3:0: Video: h264 (libx264), -1 reference frame ([33][0][0][0] / 0x0021), yuv420p, 200x200 [SAR 1:1 DAR 1:1], q=-1--1, 30 fps, 15360 tbn, 30 tbc (default)
Metadata:
encoder : Lavc56.60.100 libx264
Stream mapping:
Stream #0:0 (h264) -> split
setpts -> Stream #0:0 (libx264)
setpts -> Stream #1:0 (libx264)
setpts -> Stream #2:0 (libx264)
setpts -> Stream #3:0 (libx264)
Press [q] to stop, [?] for help
[swscaler @ 0x7fdfd3800000] Warning: data is not aligned! This can lead to a speedloss
[Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
Last message repeated 210 times
frame= 0 fps=0.0 q=0.0 q=0.0 q=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A
[Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
Last message repeated 262 times
frame= 0 fps=0.0 q=0.0 q=0.0 q=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A
[Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
Last message repeated 239 times
frame= 0 fps=0.0 q=0.0 q=0.0 q=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A
[Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
Last message repeated 195 times
frame= 0 fps=0.0 q=0.0 q=0.0 q=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A
[Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
Last message repeated 211 times
frame= 0 fps=0.0 q=0.0 q=0.0 q=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A
[Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
Last message repeated 255 times
frame= 0 fps=0.0 q=0.0 q=0.0 q=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A
[Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
Last message repeated 148 times
frame= 0 fps=0.0 q=0.0 q=0.0 q=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A
[Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
Last message repeated 174 times
frame= 0 fps=0.0 q=0.0 q=0.0 q=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A
[Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
Last message repeated 182 times
frame= 0 fps=0.0 q=0.0 q=0.0 q=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A
[Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
Last message repeated 193 times
frame= 0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size= 0kB time=00:00:00.26 bitrate= 1.4kbits/s
[Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
Last message repeated 156 times
frame= 0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size= 0kB time=00:00:00.53 bitrate= 0.7kbits/s
[Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
Last message repeated 154 times
frame= 0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size= 0kB time=00:00:00.76 bitrate= 0.5kbits/s
[Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
Last message repeated 155 times
frame= 0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size= 0kB time=00:00:01.03 bitrate= 0.4kbits/s
[Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
Last message repeated 231 times
frame= 0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size= 0kB time=00:00:01.43 bitrate= 0.3kbits/s
[Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
Last message repeated 260 times
frame= 0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size= 0kB time=00:00:01.86 bitrate= 0.2kbits/s
[Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
Last message repeated 256 times
frame= 0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size= 0kB time=00:00:02.30 bitrate= 0.2kbits/s
[Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
Last message repeated 209 times
frame= 0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size= 0kB time=00:00:02.63 bitrate= 0.1kbits/s
[Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
Last message repeated 253 times
frame= 0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size= 0kB time=00:00:03.06 bitrate= 0.1kbits/s
[Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
Last message repeated 160 times
frame= 0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size= 0kB time=00:00:03.33 bitrate= 0.1kbits/s
[Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
Last message repeated 189 times
frame= 0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size= 0kB time=00:00:03.63 bitrate= 0.1kbits/s
[Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
Last message repeated 201 times
frame= 0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size= 0kB time=00:00:03.96 bitrate= 0.1kbits/s
[Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
Last message repeated 251 times
frame= 0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size= 0kB time=00:00:04.40 bitrate= 0.1kbits/s
[Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
Last message repeated 246 times
frame= 0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size= 0kB time=00:00:04.80 bitrate= 0.1kbits/s
[Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
Last message repeated 257 times
frame= 0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size= 0kB time=00:00:05.23 bitrate= 0.1kbits/s
[Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
Last message repeated 258 times
frame= 0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size= 0kB time=00:00:05.66 bitrate= 0.1kbits/s
[Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
Last message repeated 251 times
frame= 0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size= 0kB time=00:00:06.10 bitrate= 0.1kbits/s
[Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
Last message repeated 274 times
frame= 0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size= 0kB time=00:00:06.56 bitrate= 0.1kbits/s
[Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
Last message repeated 282 times
frame= 0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size= 0kB time=00:00:07.03 bitrate= 0.1kbits/s
[Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
Last message repeated 185 times
frame= 0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size= 0kB time=00:00:07.26 bitrate= 0.1kbits/s
frame= 0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size= 0kB time=00:00:07.26 bitrate= 0.1kbits/s
frame= 0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size= 0kB time=00:00:07.26 bitrate= 0.1kbits/s
frame= 0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size= 0kB time=00:00:07.26 bitrate= 0.1kbits/s
frame= 0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size= 0kB time=00:00:07.26 bitrate= 0.1kbits/s
frame= 0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size= 0kB time=00:00:07.26 bitrate= 0.1kbits/s
frame= 0 fps=0.0 q=0.0 q=29.0 q=29.0 q=29.0 size= 0kB time=00:00:07.26 bitrate= 0.1kbits/s
frame= 0 fps=0.0 q=0.0 q=29.0 q=29.0 q=29.0 size= 0kB time=00:00:07.26 bitrate= 0.1kbits/s
frame= 0 fps=0.0 q=0.0 q=29.0 q=29.0 q=29.0 size= 0kB time=00:00:07.26 bitrate= 0.1kbits/s
frame= 0 fps=0.0 q=0.0 q=29.0 q=29.0 q=29.0 size= 0kB time=00:00:07.26 bitrate= 0.1kbits/s
frame= 0 fps=0.0 q=0.0 q=29.0 q=29.0 q=29.0 size= 0kB time=00:00:07.26 bitrate= 0.1kbits/s
[…]
frame= 0 fps=0.0 q=0.0 q=29.0 q=29.0 q=29.0 size= 0kB time=00:00:07.26 bitrate= 0.1kbits/s
[Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Sync level 1
No more output streams to write to, finishing.
frame= 0 fps=0.0 q=0.0 Lq=-1.0 q=-1.0 q=-1.0 size= 0kB time=00:00:08.93 bitrate= 0.2kbits/s
video:620kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Input file #0 (./dataset_test/videos/jz_10_huron_barstow.mkv):
Input stream #0:0 (video): 43323 packets read (347030822 bytes); 43323 frames decoded;
Input stream #0:1 (audio): 4 packets read (3072 bytes);
Total: 43327 packets (347033894 bytes) demuxed
Output file #0 (./out/jz_10_huron_barstow/F/0_F.mp4):
Output stream #0:0 (video): 0 frames encoded; 0 packets muxed (0 bytes);
Total: 0 packets (0 bytes) muxed
Output file #1 (./out/jz_10_huron_barstow/F/1_F.mp4):
Output stream #1:0 (video): 270 frames encoded; 270 packets muxed (309743 bytes);
Total: 270 packets (309743 bytes) muxed
Output file #2 (./out/jz_10_huron_barstow/L/0_L.mp4):
Output stream #2:0 (video): 270 frames encoded; 270 packets muxed (169687 bytes);
Total: 270 packets (169687 bytes) muxed
Output file #3 (./out/jz_10_huron_barstow/L/1_L.mp4):
Output stream #3:0 (video): 270 frames encoded; 270 packets muxed (155502 bytes);
Total: 270 packets (155502 bytes) muxed
[libx264 @ 0x7fdfd400f600] frame I:2 Avg QP:25.08 size: 3204
[libx264 @ 0x7fdfd400f600] frame P:140 Avg QP:26.63 size: 1426
[libx264 @ 0x7fdfd400f600] frame B:128 Avg QP:28.64 size: 805
[libx264 @ 0x7fdfd400f600] consecutive B-frames: 5.2% 94.8% 0.0% 0.0%
[libx264 @ 0x7fdfd400f600] mb I I16..4: 8.6% 62.7% 28.7%
[libx264 @ 0x7fdfd400f600] mb P I16..4: 2.5% 12.5% 3.4% P16..4: 39.2% 21.4% 9.3% 0.0% 0.0% skip:11.6%
[libx264 @ 0x7fdfd400f600] mb B I16..4: 0.5% 4.0% 1.0% B16..8: 36.5% 16.7% 4.0% direct: 5.5% skip:31.8% L0:43.4% L1:46.9% BI: 9.7%
[libx264 @ 0x7fdfd400f600] 8x8 transform intra:68.6% inter:67.7%
[libx264 @ 0x7fdfd400f600] coded y,uvDC,uvAC intra: 63.1% 48.6% 17.9% inter: 34.5% 21.1% 3.6%
[libx264 @ 0x7fdfd400f600] i16 v,h,dc,p: 24% 23% 12% 41%
[libx264 @ 0x7fdfd400f600] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17% 19% 26% 7% 5% 5% 7% 6% 8%
[libx264 @ 0x7fdfd400f600] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22% 29% 18% 6% 6% 5% 5% 4% 5%
[libx264 @ 0x7fdfd400f600] i8c dc,h,v,p: 63% 21% 14% 3%
[libx264 @ 0x7fdfd400f600] Weighted P-Frames: Y:14.3% UV:1.4%
[libx264 @ 0x7fdfd400f600] ref P L0: 49.2% 20.4% 17.3% 11.2% 1.9%
[libx264 @ 0x7fdfd400f600] ref B L0: 75.4% 24.6%
[libx264 @ 0x7fdfd400f600] kb/s:274.71
[libx264 @ 0x7fdfd4018e00] frame I:2 Avg QP:23.87 size: 2294
[libx264 @ 0x7fdfd4018e00] frame P:133 Avg QP:25.45 size: 864
[libx264 @ 0x7fdfd4018e00] frame B:135 Avg QP:28.99 size: 367
[libx264 @ 0x7fdfd4018e00] consecutive B-frames: 17.4% 38.5% 27.8% 16.3%
[libx264 @ 0x7fdfd4018e00] mb I I16..4: 14.5% 54.1% 31.4%
[libx264 @ 0x7fdfd4018e00] mb P I16..4: 6.4% 9.6% 2.1% P16..4: 33.3% 16.7% 5.9% 0.0% 0.0% skip:26.0%
[libx264 @ 0x7fdfd4018e00] mb B I16..4: 1.6% 2.0% 0.3% B16..8: 29.6% 9.3% 1.4% direct: 2.2% skip:53.6% L0:41.9% L1:51.4% BI: 6.7%
[libx264 @ 0x7fdfd4018e00] 8x8 transform intra:52.8% inter:73.8%
[libx264 @ 0x7fdfd4018e00] coded y,uvDC,uvAC intra: 40.7% 41.7% 8.9% inter: 20.7% 16.6% 0.2%
[libx264 @ 0x7fdfd4018e00] i16 v,h,dc,p: 22% 50% 8% 21%
[libx264 @ 0x7fdfd4018e00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18% 30% 23% 6% 2% 2% 5% 5% 9%
[libx264 @ 0x7fdfd4018e00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 29% 14% 5% 3% 4% 5% 6% 5%
[libx264 @ 0x7fdfd4018e00] i8c dc,h,v,p: 62% 23% 12% 3%
[libx264 @ 0x7fdfd4018e00] Weighted P-Frames: Y:1.5% UV:0.8%
[libx264 @ 0x7fdfd4018e00] ref P L0: 56.1% 15.8% 17.7% 10.2% 0.1%
[libx264 @ 0x7fdfd4018e00] ref B L0: 75.4% 20.8% 3.9%
[libx264 @ 0x7fdfd4018e00] ref B L1: 92.6% 7.4%
[libx264 @ 0x7fdfd4018e00] kb/s:150.22
[libx264 @ 0x7fdfd4022600] frame I:2 Avg QP:23.86 size: 2208
[libx264 @ 0x7fdfd4022600] frame P:139 Avg QP:24.90 size: 784
[libx264 @ 0x7fdfd4022600] frame B:129 Avg QP:28.25 size: 322
[libx264 @ 0x7fdfd4022600] consecutive B-frames: 17.8% 50.4% 15.6% 16.3%
[libx264 @ 0x7fdfd4022600] mb I I16..4: 15.7% 53.3% 31.1%
[libx264 @ 0x7fdfd4022600] mb P I16..4: 8.3% 9.9% 1.5% P16..4: 33.8% 14.8% 5.0% 0.0% 0.0% skip:26.7%
[libx264 @ 0x7fdfd4022600] mb B I16..4: 1.6% 1.8% 0.1% B16..8: 28.8% 8.2% 1.1% direct: 2.1% skip:56.4% L0:45.5% L1:47.6% BI: 6.9%
[libx264 @ 0x7fdfd4022600] 8x8 transform intra:50.6% inter:75.8%
[libx264 @ 0x7fdfd4022600] coded y,uvDC,uvAC intra: 34.0% 44.3% 10.0% inter: 18.8% 17.9% 0.4%
[libx264 @ 0x7fdfd4022600] i16 v,h,dc,p: 18% 54% 8% 20%
[libx264 @ 0x7fdfd4022600] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 28% 26% 6% 2% 2% 4% 5% 8%
[libx264 @ 0x7fdfd4022600] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 32% 31% 14% 4% 2% 2% 3% 7% 5%
[libx264 @ 0x7fdfd4022600] i8c dc,h,v,p: 60% 25% 13% 2%
[libx264 @ 0x7fdfd4022600] Weighted P-Frames: Y:2.2% UV:0.7%
[libx264 @ 0x7fdfd4022600] ref P L0: 57.9% 16.8% 16.1% 8.9% 0.2%
[libx264 @ 0x7fdfd4022600] ref B L0: 76.5% 21.0% 2.5%
[libx264 @ 0x7fdfd4022600] ref B L1: 95.0% 5.0%
[libx264 @ 0x7fdfd4022600] kb/s:137.61 -
-
The C++11 Thread Timer is not working
26 août 2017, par GathrosI’m trying to make a video player using SDL2 and FFmpeg API. The video is being decoded and I can display an image on screen. I can also play audio but I not doing that (I know it works, I’ve tried it).
My problem is I can’t update the image when it should be. I’m able to get the timestamps and work out the delay then send it to a thread, where it should call an window update when the time has elapsed. But all that happens is the images flash on the screen with no delay. I have even set the delay to 1 second and the images still flash, after there being 1 second of a blank window.
Here is my code :
extern "C"{
//FFmpeg libraries
#include <libavcodec></libavcodec>avcodec.h>
#include <libavformat></libavformat>avformat.h>
#include <libswscale></libswscale>swscale.h>
//SDL2 libraries
#include <sdl2></sdl2>SDL.h>
}
// compatibility with newer API
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55,28,1)
#define av_frame_alloc avcodec_alloc_frame
#define av_frame_free avcodec_free_frame
#endif
//C++ libraries
#include <cstdio>
#include <chrono>
#include <thread>
#include <atomic>
#include <mutex>
#include
typedef struct PacketQueue {
AVPacketList *first_pkt, *last_pkt;
std::mutex mutex;
std::condition_variable convar;
} PacketQueue;
std::atomic<bool> quitting, decoded;
std::atomic delay;
Uint32 Update_Window;
int packet_queue_put(PacketQueue *q, AVPacket *pkt){
AVPacketList *pkt1;
if(av_dup_packet(pkt) < 0){
return -1;
}
pkt1 = (AVPacketList*) av_malloc(sizeof(AVPacketList));
if(!pkt1){
return -1;
}
pkt1->pkt = *pkt;
pkt1->next = NULL;
std::lock_guard lock(q->mutex);
if (!q->last_pkt){
q->first_pkt = pkt1;
}else{
q->last_pkt->next = pkt1;
}
q->last_pkt = pkt1;
q->convar.notify_all();
return 0;
}
static int packet_queue_get(PacketQueue *q, AVPacket *pkt, int block){
AVPacketList *pkt1;
int ret;
std::unique_lock lk(q->mutex);
while(1){
if(quitting){
ret = -1;
break;
}
pkt1 = q->first_pkt;
if(pkt1){
q->first_pkt = pkt1->next;
if(!q->first_pkt){
q->last_pkt = NULL;
}
*pkt = pkt1->pkt;
av_free(pkt1);
ret = 1;
break;
}else if(decoded){
ret = 0;
quitting = true;
break;
}else if(block){
q->convar.wait_for(lk, std::chrono::microseconds(50));
}else {
ret = 0;
break;
}
}
return ret;
}
void UpdateEventQueue(){
SDL_Event event;
SDL_zero(event);
event.type = Update_Window;
SDL_PushEvent(&event);
}
void VideoTimerThreadFunc(){
UpdateEventQueue();
while(!quitting){
if(delay == 0){
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}else {
std::this_thread::sleep_for(std::chrono::microseconds(delay));
UpdateEventQueue();
}
}
}
int main(int argc, char *argv[]){
AVFormatContext* FormatCtx = nullptr;
AVCodecContext* CodecCtxOrig = nullptr;
AVCodecContext* CodecCtx = nullptr;
AVCodec* Codec = nullptr;
int videoStream;
AVFrame* Frame = nullptr;
AVPacket packet;
struct SwsContext* SwsCtx = nullptr;
PacketQueue videoq;
int frameFinished;
int64_t last_pts = 0;
const AVRational ms = {1, 1000};
SDL_Event event;
SDL_Window* screen;
SDL_Renderer* renderer;
SDL_Texture* texture;
std::shared_ptr<uint8> yPlane, uPlane, vPlane;
int uvPitch;
if (argc != 2) {
fprintf(stderr, "Usage: %s <file>\n", argv[0]);
return -1;
}
// Register all formats and codecs
av_register_all();
// Initialise SDL2
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER)) {
fprintf(stderr, "Couldn't initialise SDL - %s\n", SDL_GetError());
return -1;
}
// Setting things up
quitting = false;
decoded = false;
delay = 0;
Update_Window = SDL_RegisterEvents(1);
memset(&videoq, 0, sizeof(PacketQueue));
// Open video file
if(avformat_open_input(&FormatCtx, argv[1], NULL, NULL) != 0){
fprintf(stderr, "Couldn't open file\n");
return -1; // Couldn't open file
}
// Retrieve stream information
if(avformat_find_stream_info(FormatCtx, NULL) < 0){
fprintf(stderr, "Couldn't find stream information\n");
// Close the video file
avformat_close_input(&FormatCtx);
return -1; // Couldn't find stream information
}
// Find the video stream
videoStream = av_find_best_stream(FormatCtx, AVMEDIA_TYPE_VIDEO, -1, -1, NULL, 0);
if(videoStream < 0){
fprintf(stderr, "Couldn't find video stream\n");
// Close the video file
avformat_close_input(&FormatCtx);
return -1; // Didn't find a video stream
}
// Get a pointer to the codec context for the video stream
CodecCtxOrig = FormatCtx->streams[videoStream]->codec;
// Find the decoder for the video stream
Codec = avcodec_find_decoder(CodecCtxOrig->codec_id);
if(Codec == NULL){
fprintf(stderr, "Unsupported codec\n");
// Close the codec
avcodec_close(CodecCtxOrig);
// Close the video file
avformat_close_input(&FormatCtx);
return -1; // Codec not found
}
// Copy context
CodecCtx = avcodec_alloc_context3(Codec);
if(avcodec_copy_context(CodecCtx, CodecCtxOrig) != 0){
fprintf(stderr, "Couldn't copy codec context");
// Close the codec
avcodec_close(CodecCtxOrig);
// Close the video file
avformat_close_input(&FormatCtx);
return -1; // Error copying codec context
}
// Open codec
if(avcodec_open2(CodecCtx, Codec, NULL) < 0){
fprintf(stderr, "Couldn't open codec\n");
// Close the codec
avcodec_close(CodecCtx);
avcodec_close(CodecCtxOrig);
// Close the video file
avformat_close_input(&FormatCtx);
return -1; // Could not open codec
}
// Allocate video frame
Frame = av_frame_alloc();
// Make a screen to put our video
screen = SDL_CreateWindow("Video Player", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, CodecCtx->width, CodecCtx->height, 0);
if(!screen){
fprintf(stderr, "SDL: could not create window - exiting\n");
quitting = true;
// Clean up SDL2
SDL_Quit();
// Free the YUV frame
av_frame_free(&Frame);
// Close the codec
avcodec_close(CodecCtx);
avcodec_close(CodecCtxOrig);
// Close the video file
avformat_close_input(&FormatCtx);
return -1;
}
renderer = SDL_CreateRenderer(screen, -1, 0);
if(!renderer){
fprintf(stderr, "SDL: could not create renderer - exiting\n");
quitting = true;
// Clean up SDL2
SDL_DestroyWindow(screen);
SDL_Quit();
// Free the YUV frame
av_frame_free(&Frame);
// Close the codec
avcodec_close(CodecCtx);
avcodec_close(CodecCtxOrig);
// Close the video file
avformat_close_input(&FormatCtx);
return -1;
}
// Allocate a place to put our YUV image on that screen
texture = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_YV12, SDL_TEXTUREACCESS_STREAMING, CodecCtx->width, CodecCtx->height);
if(!texture){
fprintf(stderr, "SDL: could not create texture - exiting\n");
quitting = true;
// Clean up SDL2
SDL_DestroyRenderer(renderer);
SDL_DestroyWindow(screen);
SDL_Quit();
// Free the YUV frame
av_frame_free(&Frame);
// Close the codec
avcodec_close(CodecCtx);
avcodec_close(CodecCtxOrig);
// Close the video file
avformat_close_input(&FormatCtx);
return -1;
}
// Initialise SWS context for software scaling
SwsCtx = sws_getContext(CodecCtx->width, CodecCtx->height, CodecCtx->pix_fmt,
CodecCtx->width, CodecCtx->height, PIX_FMT_YUV420P, SWS_BILINEAR, NULL, NULL, NULL);
if(!SwsCtx){
fprintf(stderr, "Couldn't create sws context\n");
quitting = true;
// Clean up SDL2
SDL_DestroyTexture(texture);
SDL_DestroyRenderer(renderer);
SDL_DestroyWindow(screen);
SDL_Quit();
// Free the YUV frame
av_frame_free(&Frame);
// Close the codec
avcodec_close(CodecCtx);
avcodec_close(CodecCtxOrig);
// Close the video file
avformat_close_input(&FormatCtx);
return -1;
}
// set up YV12 pixel array (12 bits per pixel)
yPlane = std::shared_ptr<uint8>((Uint8 *)::operator new (CodecCtx->width * CodecCtx->height, std::nothrow));
uPlane = std::shared_ptr<uint8>((Uint8 *)::operator new (CodecCtx->width * CodecCtx->height / 4, std::nothrow));
vPlane = std::shared_ptr<uint8>((Uint8 *)::operator new (CodecCtx->width * CodecCtx->height / 4, std::nothrow));
uvPitch = CodecCtx->width / 2;
if (!yPlane || !uPlane || !vPlane) {
fprintf(stderr, "Could not allocate pixel buffers - exiting\n");
quitting = true;
// Clean up SDL2
SDL_DestroyTexture(texture);
SDL_DestroyRenderer(renderer);
SDL_DestroyWindow(screen);
SDL_Quit();
// Free the YUV frame
av_frame_free(&Frame);
// Close the codec
avcodec_close(CodecCtx);
avcodec_close(CodecCtxOrig);
// Close the video file
avformat_close_input(&FormatCtx);
return -1;
}
std::thread VideoTimer (VideoTimerThreadFunc);
while (!quitting) {
// Check for more packets
if(av_read_frame(FormatCtx, &packet) >= 0){
// Check what stream it belongs to
if (packet.stream_index == videoStream) {
packet_queue_put(&videoq, &packet);
}else{
// Free the packet that was allocated by av_read_frame
av_free_packet(&packet);
}
}else {
decoded = true;
}
SDL_PollEvent(&event);
if(event.type == Update_Window){
// Getting packet
if(packet_queue_get(&videoq, &packet, 0)){
// Decode video frame
avcodec_decode_video2(CodecCtx, Frame, &frameFinished, &packet);
// Did we get a video frame?
if (frameFinished) {
AVPicture pict;
pict.data[0] = yPlane.get();
pict.data[1] = uPlane.get();
pict.data[2] = vPlane.get();
pict.linesize[0] = CodecCtx->width;
pict.linesize[1] = uvPitch;
pict.linesize[2] = uvPitch;
// Convert the image into YUV format that SDL uses
sws_scale(SwsCtx, (uint8_t const * const *) Frame->data, Frame->linesize, 0, CodecCtx->height, pict.data, pict.linesize);
SDL_UpdateYUVTexture(texture, NULL, yPlane.get(), CodecCtx->width, uPlane.get(), uvPitch, vPlane.get(), uvPitch);
SDL_RenderClear(renderer);
SDL_RenderCopy(renderer, texture, NULL, NULL);
SDL_RenderPresent(renderer);
// Calculating delay
delay = av_rescale_q(packet.dts, CodecCtx->time_base, ms) - last_pts;
last_pts = av_rescale_q(packet.dts, CodecCtx->time_base, ms);
}else{
//UpdateEventQueue();
delay = 1;
}
// Free the packet that was allocated by av_read_frame
av_free_packet(&packet);
}else{
//UpdateEventQueue();
}
}
switch (event.type) {
case SDL_QUIT:
quitting = true;
break;
default:
break;
}
}
VideoTimer.join();
//SDL2 clean up
SDL_DestroyTexture(texture);
SDL_DestroyRenderer(renderer);
SDL_DestroyWindow(screen);
SDL_Quit();
// Free the YUV frame
av_frame_free(&Frame);
// Free Sws
sws_freeContext(SwsCtx);
// Close the codec
avcodec_close(CodecCtx);
avcodec_close(CodecCtxOrig);
// Close the video file
avformat_close_input(&FormatCtx);
return 0;
}
</uint8></uint8></uint8></file></uint8></bool></mutex></atomic></thread></chrono></cstdio>