[Ffmpeg-devel] h264 playback crash
Loren Merritt
lorenm
Sun May 7 08:17:20 CEST 2006
On Sat, 6 May 2006, grenola wrote:
>> The recommended way to do it is using x264's --sps-id. It should also be
>> possible to change the sps id of an already encoded file, but I don't know
>> any tool to do so.
>
> I just checked out the latest x264 from CVS and it seems to lack this option.
> Perhaps it was removed for some reason ? I notice in the code that the SPS
> and PPS IDs are set in encoder/encoder.c by calls to the functions
> x264_pps_init() and x264_sps_init(), and the ID is set to 0 in both cases. I
> appreciate you may not be responsible for the x264 encoder, but would
> replacing the fixed ID of 0 with say (time(NULL)&~0) seem like a reasonable
> workaround (or would that be disastrous - I haven't actually checked whether
> these functions get called multiple times) ? I'm not really familiar with
> video codec hacking or how h264 works.
I am responsible for the x264 encoder. I added --sps-id only yesterday.
There's no inherent reason a random value wouldn't work. But sps-id only
has a range of 0..31 so that's not enough to assume no collisions.
And if you're going to concatenate 2 videos with the same settings,
you do want the same sps-id.
And I like to be able to encode something twice and get bit-wise
identical outputs.
--Loren Merritt
More information about the ffmpeg-devel
mailing list