[x264-devel] libx264 encoding parameters that influence SPS andPPS

declan harrison harrison.declan at gmail.com
Thu Sep 23 22:46:24 CEST 2010


On Wed, Sep 22, 2010 at 7:33 PM, declan harrison
<harrison.declan at gmail.com> wrote:
> On Mon, Sep 20, 2010 at 11:31 PM, Jason Garrett-Glaser
> <darkshikari at gmail.com> wrote:
>> On Mon, Sep 20, 2010 at 2:57 PM,  <harrison.declan at gmail.com> wrote:
>>> Hi jason
>>>
>>> Do you think exposing the libx264 parameter sps-id in ffmpeg would be of general use?
>>
>> Yes.  Patches welcome.  Send it to the ffmpeg-devel ML.
> Hi Jason
>
> I noticed a problem in what Im doing with supplying multiple SPS/PPS
> for  video content during playback over network based I/O. File based
> I/O is fine.
>
> For example if I use VLC to playback one of these videos files that I
> have created, then theres no problems whatever, the player is able to
> switch to playing the 2nd part of the video content, this is were the
> content is file based.
>
> Now for the exact same video but this time as I create the content and
> send it over the network (over HTTP) to VLC the player is using
> network based I/O the player freezes completely on when the 2nd part
> of the video content arrives; and then buffers up all the rest of the
> video content before playing. When it resumes playing it does do
> without a problem.  The debugger in VLC complains about the number of
> "reference frames exceeds max".  Now if I captured this exact same
> video as client downloads over network and save as a file and playback
> to VLC it has no problems or complaints.
>
> That indicates to me that the player is able to seek forward using
> file based I/O to get the frame it wants but is unable to do when
> using network based I/O and therefore buffers up all the content
> before continuing to play.  Well thats what I suspect as I'm not 100%
> sure.
>
> So I assumed that the problem was that I might have transitioned on a
> non-key packet (which it was) so then I ensured that as soon as I
> transition I force the next packet output to be a complete keyframe.
> However this doesnt solve it and the problem still exists.
>
> You any ideas what the root cause of the problem is when doing this
> over a network that doesnt occur when using file based I/O.
>
> Running through H264Visa, around frame 400 I see that the switch
> occurs and I see that the Picture No and Decoding No can get out of
> sync by 1. Also the MaxFPS changes to 2000(from 50) and Aspect Ratio
> changes to Unspecified (from 1:1) and Timing Type changes to Variable
> (from Fixed).
>
> Not sure why or if these parameters cause the problem I see over the network.
>
> Any suggestions I could try out or ideas why this isnt playing back
> over the network
>
Hi Jason

Just completed some more testing, which proves that there is no
problem with the multiple SPS/PPS's, which I said incorrectly in my
previous post.  I verified this by ensuring that the values in each
PPS and SPS were the same in each entry and I still see this problem.

So this makes me think that this is only a problem when we switch
bitstreams real-time on the fly when playing and not when the
bitstreams are witten to a file and played back.

So the two bitstreams in question represent the same sequence of
images but when they are spliced together dynamically realtime then
the player freezes until it has buffered up all the content before
playing. I only switch the bitstreams on a key frame.

I am at a loss to determine if theres anything else I need to do to
ensure continous playback in realtime when I dynamically splice these
2 bitstreams togther.  Do I need to generate SP or SI frames to ensure
smooth transition?

Thanks
Declan

Thanks
Decla


More information about the x264-devel mailing list