Log in

View Full Version : ffmpeg: setting IDR frames option.


Prathamesh
12th November 2015, 10:53
Hi all,

Can somebody help me regarding IDR frames in ffmpeg.

My client wants the below :

H.264 elementary stream + AAC audio stream muxed in mpeg 2 transport stream.
H.264 Video bitrate : CBR@1.5mbps
Frame rate = 29.97 fps.
Resolution = 720x480 Anamorphic.
Profile = Main@L3.2 , CABAC.
GOP length = 15, Every I frame must be an IDR.

I think this requires the use of keyint=15:keyint_min=15:no-scenecut in ffmpeg to force a closed gop right??

How do i verify that every I frame is an IDR?

Also, the client has stated that the H.264 stream must be in streaming format. i.e SPS and other sequence headers must be repeated throughout the stream.

How do i ensure my H.264 stream is streaming format? do i need to use annex B filter : -bsf:v h264_mp4toannexb?

My source is Apple ProRes 422 HQ @ 25 fps.

I would appreciate any help you guys can provide.

kolak
17th November 2015, 23:07
On Mac/Linux:

ffprobe -show_frames -of compact -i "source" | grep 'key_frame=1'

Someone may translate this to PC.

Switch player from Telestream has now very neat feature called Timeline, which nicely shows GOP structure:

http://www.telestream.net/switch/features.htm

but this costs money.

pandy
19th November 2015, 00:05
Should work with most decent formats:
@ffprobe -v quiet -pretty -print_format json -show_entries "format=size,bit_rate:frame=coded_picture_number,pict_type,key_frame" -select_streams v:0 %1 > %1.json