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.
+ Reply to Thread
Results 1 to 11 of 11
I'm pretty sure that you cannot select between I and IDR frames for the time being, but this might be subject to change:
An option "forced_idr" might show up in the future, or it might alredy be implemented, but undocumented. You could test this with x246option "forced_idr=1".
keyint (or -g) declares the maximum distance between keyframes, keyint_min declares the minimum distance between keyframes. By setting both to 15 you will have a keyframe for each 15 frames no matter what and I do not think this is what you want. AFAIK FFmpeg uses closed GOP by default but you can force it with "-flags +cgop". Repeating SPS (better streamability) can be achieved by forcing local headers with "-flags2 +local_header".
Hope it helpsI'm the developer behind FFQueue. My posts might reflect this! ;-)
Hi TorBru & El Heggunte,
Thanks for your suggestions.
TorBru, if i understand correct, i don't need to convert my stream to annex b if I use -flags +local_header? does this ensure SPS & PPS is repeated?
If I use refs=2, bf=2, b-pyramid=0, b-adapt=0, no-scenecut, keyint=15, keyint_min=1, -flags +cgop I would get a stream with IBBPBBPBBPBBPBPI ?
You get IPBBPBBPBBPBBPB
I'm referring to the storage (coded) order. In display order it would go IBBP...