[FFmpeg-user] Change in video length and loss of audio sync
John Harlow
johnrharlow at mac.com
Tue Apr 13 22:53:54 EEST 2021
Hi:
I have a large number of videos I am converting to a standardized HLS video with a particular format and frame rate and I’ve automated the process. The source videos are in many different formats (16:9, 4:3), densities 720, 1080, 480 and frame rates.
After it completed and I tested the videos I found that about 6% of them were shortened and lost audio/video sync in the conversion. They also take an inordinately long time to start streaming.
Examining the source videos, it seems that many of them were at unusual frame rates (like15, 24, 25…)
I’ve put a test mp4 that I sourced from and the resulting m3u8 video up in http://ipziptv.com/testing/test.mp4 and http://iziptv.com/testing/video.m3u8
Below is mediainfo on the source video (263.8 seconds long) and the converted m3u8 video (220 seconds long), the script I converted with and the ffmpeg output.
Any advice on how I can successfully convert these would be appreciated.
==========================================Start of output=================================================
Here is mediainfo’s view of that mp4. You can see that (for some reason) it is at 25FPS.
mediainfo test.mp4
General
Complete name : test.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom (isom/iso2/avc1/mp41)
File size : 46.9 MiB
Duration : 4 min 23 s
Overall bit rate : 1 491 kb/s
Writing application : Lavf57.83.100
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High at L3.1
Format settings : CABAC / 4 Ref Frames
Format settings, CABAC : Yes
Format settings, Reference frames : 4 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 4 min 23 s
Bit rate : 1 354 kb/s
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 25.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.059
Stream size : 42.6 MiB (91%)
Writing library : x264 core 148 r2795 aaa9aa8
Encoding settings : 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=22 / lookahead_threads=3 / 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
Codec configuration box : avcC
Audio
ID : 2
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : mp4a-40-2
Duration : 4 min 23 s
Bit rate mode : Constant
Bit rate : 132 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 4.10 MiB (9%)
Language : English
Default : Yes
Alternate group : 1
Here is mediainfo’s view of the first segment of the m3u8. You can see that it is at 29.97FPS.
mediainfo video0000.ts
General
ID : 1 (0x1)
Complete name : video0000.ts
Format : MPEG-TS
File size : 1.53 MiB
Duration : 5 s 939 ms
Overall bit rate mode : Variable
Overall bit rate : 2 143 kb/s
Video
ID : 256 (0x100)
Menu ID : 1 (0x1)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Main at L3.1
Format settings : CABAC / 2 Ref Frames
Format settings, CABAC : Yes
Format settings, Reference frames : 2 frames
Codec ID : 27
Duration : 6 s 6 ms
Bit rate mode : Constant
Nominal bit rate : 2 000 kb/s
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Frame rate : 29.970 (29970/1000) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.072
Writing library : x264 core 148 r2795 aaa9aa8
Encoding settings : cabac=1 / ref=1 / deblock=1:0:0 / analyse=0x1:0x111 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=8 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=0 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=60 / keyint_min=31 / scenecut=0 / intra_refresh=0 / rc_lookahead=40 / rc=cbr / mbtree=1 / bitrate=2000 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=2000 / vbv_bufsize=8000 / nal_hrd=cbr / filler=1 / ip_ratio=1.40 / aq=1:1.00
Audio
ID : 257 (0x101)
Menu ID : 1 (0x1)
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Format version : Version 4
Muxing mode : ADTS
Codec ID : 15-2
Duration : 5 s 973 ms
Bit rate mode : Variable
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Delay relative to video : -21 ms
Language : English
So, I ran this command to generate the m3u8.
#!/bin/sh
#
BASEURL="http://iziptv.com/testing/"
BASEDIR="/var/www/vhosts/iziptv.com/httpdocs/testing/"
TMP=test.mp4
cd $BASEDIR
RES1=`nice -20 cpulimit -l 400 /usr/bin/ffmpeg -y -hide_banner -loglevel verbose -r 29.97 -i "$TMP" \
-vf yadif,format=yuv420p -g 60 -force_key_frames "expr:gte(t,n_forced*2)" \
-profile:v main -level 3.1 -s 1280x720 -vf "fps=fps=30*1000/1001:round=zero" -c:v libx264 \
-x264-params "nal-hrd=cbr:keyint=60:min-keyint=60:scenecut=0:ref=1:b-pyramid=0:force-cfr=1" \
-vf "scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:(ow-iw)/2:(oh-ih)/2,setsar=1" \
-b:v 2M -maxrate 2.0M -minrate 2.0M -bufsize 8M \
-b:a 128k -ar 48000 -start_number 0 \
-f segment -segment_list_type m3u8 -segment_list_size 0 -segment_time 6.006 -segment_time_delta 0.1 \
-hls_base_url "$BASEURL" \
-hls_time 6 -hls_list_size 0 -f hls \
-hls_segment_filename "video%04d.ts" -strict 2 -threads 8 "video.m3u8" 2>&1`
#
#
if [ $? != 0 ]; then echo fail; exit 1;fi
# rm -f $TMP
#
# if successful get length
#
echo "Length of Source:" `/usr/bin/ffprobe -i "$TMP" -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1`
echo "Length of M3U8:" `/usr/bin/ffprobe -i "${BASEURL}/video.m3u8" -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1`
I get this output and at the bottom of it you can see that the mp4 is 263 seconds long and the m3u8 is 220 seconds long:
sh -x encoder1.sh
+ BASEURL=http://iziptv.com/testing/
+ BASEDIR=/var/www/vhosts/iziptv.com/httpdocs/testing/
+ TMP=test.mp4
+ cd /var/www/vhosts/iziptv.com/httpdocs/testing/
++ nice -20 cpulimit -l 400 /usr/bin/ffmpeg -y -hide_banner -loglevel verbose -r 29.97 -i test.mp4 -vf yadif,format=yuv420p -g 60 -force_key_frames 'expr:gte(t,n_forced*2)' -profile:v main -level 3.1 -s 1280x720 -vf 'fps=fps=30*1000/1001:round=zero' -c:v libx264 -x264-params nal-hrd=cbr:keyint=60:min-keyint=60:scenecut=0:ref=1:b-pyramid=0:force-cfr=1 -vf 'scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:(ow-iw)/2:(oh-ih)/2,setsar=1' -b:v 2M -maxrate 2.0M -minrate 2.0M -bufsize 8M -b:a 128k -ar 48000 -start_number 0 -f segment -segment_list_type m3u8 -segment_list_size 0 -segment_time 6.006 -segment_time_delta 0.1 -hls_base_url http://iziptv.com/testing/ -hls_time 6 -hls_list_size 0 -f hls -hls_segment_filename video%04d.ts -strict 2 -threads 8 video.m3u8
+ RES1='Routing option strict to both codec and muxer layer
[h264 @ 0x18f0ae0] Reinit context to 1280x720, pix_fmt: yuv420p
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '\''test.mp4'\'':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.83.100
Duration: 00:04:23.84, start: 0.000000, bitrate: 1490 kb/s
Stream #0:0(und): Video: h264 (High), 1 reference frame (avc1 / 0x31637661), yuv420p(left), 1280x720 [SAR 1:1 DAR 16:9], 1354 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 130 kb/s (default)
Metadata:
handler_name : SoundHandler
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[h264 @ 0x19218e0] Reinit context to 1280x720, pix_fmt: yuv420p
[graph_1_in_0_1 @ 0x1d02ba0] tb:1/48000 samplefmt:fltp samplerate:48000 chlayout:0x3
[Parsed_scale_0 @ 0x2266660] w:1280 h:720 flags:'\''bicubic'\'' interl:0
[graph 0 input from stream 0:0 @ 0x2268200] w:1280 h:720 pixfmt:yuv420p tb:100/2997 fr:2997/100 sar:1/1 sws_param:flags=2
[scaler_out_0_0 @ 0x2269140] w:1280 h:720 flags:'\''bicubic'\'' interl:0
[Parsed_scale_0 @ 0x2266660] w:1280 h:720 fmt:yuv420p sar:1/1 -> w:1280 h:720 fmt:yuv420p sar:1/1 flags:0x4
[Parsed_pad_1 @ 0x2266fa0] w:1280 h:720 -> w:1280 h:720 x:0 y:0 color:0x000000FF
[Parsed_setsar_2 @ 0x22679c0] w:1280 h:720 sar:1/1 dar:16/9 -> sar:1/1 dar:16/9
[scaler_out_0_0 @ 0x2269140] w:1280 h:720 fmt:yuv420p sar:1/1 -> w:1280 h:720 fmt:yuv420p sar:1/1 flags:0x4
[libx264 @ 0x19299e0] using SAR=1/1
[libx264 @ 0x19299e0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0x19299e0] profile Main, level 3.1
[libx264 @ 0x19299e0] 264 - core 148 r2795 aaa9aa8 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=8 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=0 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=60 keyint_min=31 scenecut=0 intra_refresh=0 rc_lookahead=40 rc=cbr mbtree=1 bitrate=2000 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=2000 vbv_bufsize=8000 nal_hrd=cbr filler=1 ip_ratio=1.40 aq=1:1.00
[hls @ 0x18f3920] Opening '\''video0000.ts'\'' for writing
[mpegts @ 0x28e7100] muxrate VBR, pcr every 2 pkts, sdt every 2147483647, pat/pmt every 2147483647 pkts
Output #0, hls, to '\''video.m3u8'\'':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.83.100
Stream #0:0(und): Video: h264 (libx264), 1 reference frame, yuv420p(left), 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 2000 kb/s, 29.97 fps, 90k tbn, 29.97 tbc (default)
Metadata:
handler_name : VideoHandler
encoder : Lavc57.107.100 libx264
Side data:
cpb: bitrate max/min/avg: 2000000/0/2000000 buffer size: 8000000 vbv_delay: -1
Stream #0:1(eng): Audio: aac (LC), 48000 Hz, stereo, fltp, delay 1024, 128 kb/s (default)
Metadata:
handler_name : SoundHandler
encoder : Lavc57.107.100 aac
[hls @ 0x18f3920] Opening '\''video0001.ts'\'' for writingte=N/A speed= 8.6x
[hls @ 0x18f3920] Opening '\''video.m3u8.tmp'\'' for writing
[hls muxer @ 0x1928700] EXT-X-MEDIA-SEQUENCE:0
[hls @ 0x18f3920] Opening '\''video0002.ts'\'' for writingte=N/A speed=5.08x
[hls @ 0x18f3920] Opening '\''video.m3u8.tmp'\'' for writing
[hls muxer @ 0x1928700] EXT-X-MEDIA-SEQUENCE:0
[hls @ 0x18f3920] Opening '\''video0003.ts'\'' for writingte=N/A speed=4.59x
[hls @ 0x18f3920] Opening '\''video.m3u8.tmp'\'' for writing
[hls muxer @ 0x1928700] EXT-X-MEDIA-SEQUENCE:0
[hls @ 0x18f3920] Opening '\''video0004.ts'\'' for writingte=N/A speed=4.28x
[hls @ 0x18f3920] Opening '\''video.m3u8.tmp'\'' for writing
[hls muxer @ 0x1928700] EXT-X-MEDIA-SEQUENCE:0
[hls @ 0x18f3920] Opening '\''video0005.ts'\'' for writingte=N/A speed=4.11x
[hls @ 0x18f3920] Opening '\''video.m3u8.tmp'\'' for writing
[hls muxer @ 0x1928700] EXT-X-MEDIA-SEQUENCE:0
[hls @ 0x18f3920] Opening '\''video0006.ts'\'' for writingte=N/A speed=4.03x
[hls @ 0x18f3920] Opening '\''video.m3u8.tmp'\'' for writing
[hls muxer @ 0x1928700] EXT-X-MEDIA-SEQUENCE:0
[hls @ 0x18f3920] Opening '\''video0007.ts'\'' for writingte=N/A speed=4.01x
[hls @ 0x18f3920] Opening '\''video.m3u8.tmp'\'' for writing
[hls muxer @ 0x1928700] EXT-X-MEDIA-SEQUENCE:0
[hls @ 0x18f3920] Opening '\''video0008.ts'\'' for writingte=N/A speed=4.05x
[hls @ 0x18f3920] Opening '\''video.m3u8.tmp'\'' for writing
[hls muxer @ 0x1928700] EXT-X-MEDIA-SEQUENCE:0
[hls @ 0x18f3920] Opening '\''video0009.ts'\'' for writingte=N/A speed=4.07x
[hls @ 0x18f3920] Opening '\''video.m3u8.tmp'\'' for writing
[hls muxer @ 0x1928700] EXT-X-MEDIA-SEQUENCE:0
[hls @ 0x18f3920] Opening '\''video0010.ts'\'' for writingte=N/A speed=4.04x
[hls @ 0x18f3920] Opening '\''video.m3u8.tmp'\'' for writing
[hls muxer @ 0x1928700] EXT-X-MEDIA-SEQUENCE:0
[hls @ 0x18f3920] Opening '\''video0011.ts'\'' for writingte=N/A speed=4.05x
[hls @ 0x18f3920] Opening '\''video.m3u8.tmp'\'' for writing
[hls muxer @ 0x1928700] EXT-X-MEDIA-SEQUENCE:0
[hls @ 0x18f3920] Opening '\''video0012.ts'\'' for writingte=N/A speed=4.05x
[hls @ 0x18f3920] Opening '\''video.m3u8.tmp'\'' for writing
[hls muxer @ 0x1928700] EXT-X-MEDIA-SEQUENCE:0
[hls @ 0x18f3920] Opening '\''video0013.ts'\'' for writingte=N/A speed=4.07x
[hls @ 0x18f3920] Opening '\''video.m3u8.tmp'\'' for writing
[hls muxer @ 0x1928700] EXT-X-MEDIA-SEQUENCE:0
[hls @ 0x18f3920] Opening '\''video0014.ts'\'' for writingte=N/A speed= 4.1x
[hls @ 0x18f3920] Opening '\''video.m3u8.tmp'\'' for writing
[hls muxer @ 0x1928700] EXT-X-MEDIA-SEQUENCE:0
[hls @ 0x18f3920] Opening '\''video0015.ts'\'' for writingte=N/A speed=4.17x
[hls @ 0x18f3920] Opening '\''video.m3u8.tmp'\'' for writing
[hls muxer @ 0x1928700] EXT-X-MEDIA-SEQUENCE:0
[hls @ 0x18f3920] Opening '\''video0016.ts'\'' for writingte=N/A speed=4.14x
[hls @ 0x18f3920] Opening '\''video.m3u8.tmp'\'' for writing
[hls muxer @ 0x1928700] EXT-X-MEDIA-SEQUENCE:0
[hls @ 0x18f3920] Opening '\''video0017.ts'\'' for writingte=N/A speed=4.14x
[hls @ 0x18f3920] Opening '\''video.m3u8.tmp'\'' for writing
[hls muxer @ 0x1928700] EXT-X-MEDIA-SEQUENCE:0
[hls @ 0x18f3920] Opening '\''video0018.ts'\'' for writingte=N/A speed= 4.1x
[hls @ 0x18f3920] Opening '\''video.m3u8.tmp'\'' for writing
[hls muxer @ 0x1928700] EXT-X-MEDIA-SEQUENCE:0
[hls @ 0x18f3920] Opening '\''video0019.ts'\'' for writingte=N/A speed=4.06x
[hls @ 0x18f3920] Opening '\''video.m3u8.tmp'\'' for writing
[hls muxer @ 0x1928700] EXT-X-MEDIA-SEQUENCE:0
[hls @ 0x18f3920] Opening '\''video0020.ts'\'' for writingte=N/A speed=4.05x
[hls @ 0x18f3920] Opening '\''video.m3u8.tmp'\'' for writing
[hls muxer @ 0x1928700] EXT-X-MEDIA-SEQUENCE:0
[hls @ 0x18f3920] Opening '\''video0021.ts'\'' for writingte=N/A speed=4.04x
[hls @ 0x18f3920] Opening '\''video.m3u8.tmp'\'' for writing
[hls muxer @ 0x1928700] EXT-X-MEDIA-SEQUENCE:0
[hls @ 0x18f3920] Opening '\''video0022.ts'\'' for writingte=N/A speed=4.07x
[hls @ 0x18f3920] Opening '\''video.m3u8.tmp'\'' for writing
[hls muxer @ 0x1928700] EXT-X-MEDIA-SEQUENCE:0
[hls @ 0x18f3920] Opening '\''video0023.ts'\'' for writingte=N/A speed=4.11x
[hls @ 0x18f3920] Opening '\''video.m3u8.tmp'\'' for writing
[hls muxer @ 0x1928700] EXT-X-MEDIA-SEQUENCE:0
[hls @ 0x18f3920] Opening '\''video0024.ts'\'' for writingte=N/A speed=4.09x
[hls @ 0x18f3920] Opening '\''video.m3u8.tmp'\'' for writing
[hls muxer @ 0x1928700] EXT-X-MEDIA-SEQUENCE:0
[hls @ 0x18f3920] Opening '\''video0025.ts'\'' for writingte=N/A speed=4.11x
[hls @ 0x18f3920] Opening '\''video.m3u8.tmp'\'' for writing
[hls muxer @ 0x1928700] EXT-X-MEDIA-SEQUENCE:0
[hls @ 0x18f3920] Opening '\''video0026.ts'\'' for writingte=N/A speed=4.11x
[hls @ 0x18f3920] Opening '\''video.m3u8.tmp'\'' for writing
[hls muxer @ 0x1928700] EXT-X-MEDIA-SEQUENCE:0
[hls @ 0x18f3920] Opening '\''video0027.ts'\'' for writingte=N/A speed= 4.1x
[hls @ 0x18f3920] Opening '\''video.m3u8.tmp'\'' for writing
[hls muxer @ 0x1928700] EXT-X-MEDIA-SEQUENCE:0
[hls @ 0x18f3920] Opening '\''video0028.ts'\'' for writingte=N/A speed=4.09x
[hls @ 0x18f3920] Opening '\''video.m3u8.tmp'\'' for writing
[hls muxer @ 0x1928700] EXT-X-MEDIA-SEQUENCE:0
[hls @ 0x18f3920] Opening '\''video0029.ts'\'' for writingte=N/A speed=4.12x
[hls @ 0x18f3920] Opening '\''video.m3u8.tmp'\'' for writing
[hls muxer @ 0x1928700] EXT-X-MEDIA-SEQUENCE:0
[hls @ 0x18f3920] Opening '\''video0030.ts'\'' for writingte=N/A speed=4.14x
[hls @ 0x18f3920] Opening '\''video.m3u8.tmp'\'' for writing
[hls muxer @ 0x1928700] EXT-X-MEDIA-SEQUENCE:0
[hls @ 0x18f3920] Opening '\''video0031.ts'\'' for writingte=N/A speed=4.15x
[hls @ 0x18f3920] Opening '\''video.m3u8.tmp'\'' for writing
[hls muxer @ 0x1928700] EXT-X-MEDIA-SEQUENCE:0
[hls @ 0x18f3920] Opening '\''video0032.ts'\'' for writingte=N/A speed=4.14x
[hls @ 0x18f3920] Opening '\''video.m3u8.tmp'\'' for writing
[hls muxer @ 0x1928700] EXT-X-MEDIA-SEQUENCE:0
[hls @ 0x18f3920] Opening '\''video0033.ts'\'' for writingte=N/A speed=4.15x
[hls @ 0x18f3920] Opening '\''video.m3u8.tmp'\'' for writing
[hls muxer @ 0x1928700] EXT-X-MEDIA-SEQUENCE:0
[hls @ 0x18f3920] Opening '\''video0034.ts'\'' for writingte=N/A speed=4.21x
[hls @ 0x18f3920] Opening '\''video.m3u8.tmp'\'' for writing
[hls muxer @ 0x1928700] EXT-X-MEDIA-SEQUENCE:0
[hls @ 0x18f3920] Opening '\''video0035.ts'\'' for writingte=N/A speed=4.29x
[hls @ 0x18f3920] Opening '\''video.m3u8.tmp'\'' for writing
[hls muxer @ 0x1928700] EXT-X-MEDIA-SEQUENCE:0
[hls @ 0x18f3920] Opening '\''video0036.ts'\'' for writingte=N/A speed=4.32x
[hls @ 0x18f3920] Opening '\''video.m3u8.tmp'\'' for writing
[hls muxer @ 0x1928700] EXT-X-MEDIA-SEQUENCE:0
No more output streams to write to, finishing.:22.78 bitrate=N/A speed=4.33x
[hls @ 0x18f3920] Opening '\''video.m3u8.tmp'\'' for writing
[hls muxer @ 0x1928700] EXT-X-MEDIA-SEQUENCE:0
frame= 6596 fps=108 q=-1.0 Lsize=N/A time=00:04:23.78 bitrate=N/A speed=4.32x
video:53638kB audio:4185kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Input file #0 (test.mp4):
Input stream #0:0 (video): 6596 packets read (44663233 bytes); 6596 frames decoded;
Input stream #0:1 (audio): 12366 packets read (4298119 bytes); 12365 frames decoded (12661760 samples);
Total: 18962 packets (48961352 bytes) demuxed
Output file #0 (video.m3u8):
Output stream #0:0 (video): 6596 frames encoded; 6596 packets muxed (54924920 bytes);
Output stream #0:1 (audio): 12365 frames encoded (12661760 samples); 12366 packets muxed (4285386 bytes);
Total: 18962 packets (59210306 bytes) muxed
[libx264 @ 0x19299e0] frame I:111 Avg QP:16.08 size:103171
[libx264 @ 0x19299e0] frame P:2421 Avg QP:20.06 size: 13578
[libx264 @ 0x19299e0] frame B:4064 Avg QP:24.77 size: 2608
[libx264 @ 0x19299e0] consecutive B-frames: 4.3% 36.1% 13.8% 45.8%
[libx264 @ 0x19299e0] mb I I16..4: 22.5% 0.0% 77.5%
[libx264 @ 0x19299e0] mb P I16..4: 4.5% 0.0% 4.4% P16..4: 34.8% 12.2% 5.1% 0.0% 0.0% skip:39.1%
[libx264 @ 0x19299e0] mb B I16..4: 0.5% 0.0% 0.3% B16..8: 29.0% 1.6% 0.2% direct: 1.0% skip:67.4% L0:35.5% L1:61.0% BI: 3.5%
[libx264 @ 0x19299e0] coded y,uvDC,uvAC intra: 52.6% 65.8% 27.0% inter: 7.8% 10.8% 0.3%
[libx264 @ 0x19299e0] i16 v,h,dc,p: 42% 19% 13% 27%
[libx264 @ 0x19299e0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 30% 20% 13% 5% 9% 7% 6% 5% 4%
[libx264 @ 0x19299e0] i8c dc,h,v,p: 49% 19% 24% 8%
[libx264 @ 0x19299e0] Weighted P-Frames: Y:9.9% UV:4.5%
[libx264 @ 0x19299e0] kb/s:1996.46
[aac @ 0x191f8a0] Qavg: 749.019'
+ '[' 0 '!=' 0 ']'
++ /usr/bin/ffprobe -i test.mp4 -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1
+ echo 'Length of Source:' 263.840000
Length of Source: 263.840000
++ /usr/bin/ffprobe -i http://iziptv.com/testing//video.m3u8 -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1
+ echo 'Length of M3U8:' 220.086530
Length of M3U8: 220.086530
More information about the ffmpeg-user
mailing list