[FFmpeg-user] Fixed GOP encoding for HLS

Christian Ebert blacktrash at gmx.net
Thu Dec 6 10:08:14 CET 2012


* Christian Ebert on Wednesday, December 05, 2012 at 23:59:53 +0000
> * Christian Ebert on Wednesday, December 05, 2012 at 23:53:52 +0000
>> ffprobe -show_frames test.ts 2>/dev/null | fgrep -B 14 -A 7 pict_type=I | head -45
>> [FRAME]
>> media_type=video
>> key_frame=1
>> pkt_pts=126000
>> pkt_pts_time=1.400000
>> pkt_dts=126000
>> pkt_dts_time=1.400000
>> pkt_duration=3600
>> pkt_duration_time=0.040000
>> pkt_pos=564
>> width=512
>> height=384
>> pix_fmt=yuv420p
>> sample_aspect_ratio=1:1
>> pict_type=I
>> coded_picture_number=0
>> display_picture_number=0
>> interlaced_frame=0
>> top_field_first=0
>> repeat_pict=0
>> reference=0
>> [/FRAME]
>> --
>> [FRAME]
>> media_type=video
>> key_frame=1
>> pkt_pts=1026000
>> pkt_pts_time=11.400000
>> pkt_dts=1026000
>> pkt_dts_time=11.400000
>> pkt_duration=3600
>> pkt_duration_time=0.040000
>> pkt_pos=161116
>> width=512
>> height=384
>> pix_fmt=yuv420p
>> sample_aspect_ratio=1:1
>> pict_type=I
>> coded_picture_number=250
>> display_picture_number=0
>> interlaced_frame=0
>> top_field_first=0
>> repeat_pict=0
>> reference=0
>> [/FRAME]
>> 
>> But the above makes this entry:
>> 
>> #EXTINF:10.030933,
>> test-000.ts
>> 
>> even less understandable.
> 
> Add this to the mix (first 2 audio, second 2 video):
> 
> ffprobe -show_streams test-000.ts 2>/dev/null | fgrep duration
> duration_ts=896400
> duration=9.960000
> duration_ts=900695
> duration=10.007722

What looks correct is the coded_picture_number: 0 and 250. So I
assume -force_key_frames does its job.

The rest of the output of ffprobe or the generated m3u8 gives the
impression of a sort of random precision.

c
-- 
\black\trash movie         _SAME  TIME  SAME  PLACE_
 --->> http://www.blacktrash.org/underdogma/stsp.php
\black\trash audio   _ANOTHER  TIME  ANOTHER  PLACE_
--->> http://www.blacktrash.org/underdogma/atap.html


More information about the ffmpeg-user mailing list