Log in

View Full Version : Aligning iframes across multiple bitrates


UltraTV
1st April 2011, 07:53
Hi All,

We're setting up encoding for HTTP Live Streaming and I was wondering if anybody has a method they can recommend for aligning iframes across multiple streams. For example, if I have a single source file and encode to multiple bitrates, how can I guarantee each iframe will occur at the same frame at each bitrate?

My instinct is to use the same .stats file from pass 1 of x264 for each of the different bitrates. The .stats would be produced at a medium resolution/bitrate and then repurposed at the other resolutions and bitrates. This should cause a loss of compression efficiency, but the trade off is much more reliable playback on a wider variety of HLS implementations.

Any thoughts are greatly appreciated.

mp3dom
1st April 2011, 07:56
Closed GOP + Disable scene change detection ?

UltraTV
1st April 2011, 08:16
Interesting, but would that incur greater or less penalty than reusing the .stats file?

Actually, thinking about it, I wonder if reusing the .stats file from the first pass for the highest bitrate for lower bitrates would be even better. If reusing the .stats file is impossible or stupid please lay the smack down.

Until then, I'll test both out tomorrow and see how it looks.

akupenguin
1st April 2011, 10:32
Same statsfile works for varying bitrate, but not for varying resolution.
qpfile works unconditionally.

mp3dom
1st April 2011, 12:53
Interesting, but would that incur greater or less penalty than reusing the .stats file?

Honestly I don't know.
The combo "no scene change+closed gop" is used for multiangle so it's guaranteed to work for video that can be completely different each other. Surely there's some inefficiency but x264 is very good in motion estimation so the degradation probably isn't that high (if the bitrate amount is quite decent). A high me and subme settings probably can help in this.