GNOME Bugzilla – Bug 692942
h264parse: add conversion support from baseline/other profiles to constrained-baseline profile
Last modified: 2013-06-05 12:32:16 UTC
html5 video seems to require constrained-baseline profile for h264 (tested only on chrome). Since baseline profile is a superset of constrained-baseline this conversion should be possible without reencoding
> Since baseline profile is a superset of constrained-baseline this > conversion should be possible without reencoding Since baseline profile is a superset of constrained-baseline, it should be possible to convert/relabel a constrained-baseline type stream to baseline, but not necessarily the other way round?
For what I understand each profile could be converted to constrained but not necessarily the other way round (http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC)
You cannot always convert from baseline to constrained baseline. Constrained Baseline profile is Baseline profile without the ASO and FMO madness, which are hardly supported IMHO. So you cannot randomly convert from Baseline profile to Constrained Baseline, especially if you use those features. This means you have to detect ASO (slices not having increasing first_mb_in_slice) and FMO (slice groups) in the parser. Besides, the other issue is that h264parse does not support Baseline profile streams with ASO anyway. i.e. AFAIK, the AU detection logic is very minimal and just assumes a new AU when first_mb_in_slice is zero again, which is not true in presence of Baseline profile streams with ASO.
I was probably confusing. So, in summary: 1. Constrained Baseline to Baseline profile is OK. This is a no-brainer ; 2. Baseline Profile to Constrained Baseline needs processing, that is a. a no-brainer if the stream doesn't use ASO or FMO feature set ; b. should be possible with minimal processing with ASO only ; c. I am not very sure for FMO :) Having said that, what is the proportion of video clips around which are really Baseline profile with ASO and FMO anyway? The reason for CBP is that most HW decoders around could only support it and not the full-blown Baseline profile specification. Even FFmpeg does not fully support it either anyway. So, this looks rare.
thanks for your explainations, my original purpose was to stream using html5 video tag without reencoding, please take a look at this h264 video (CBP): http://stream.flowplayer.org/bauhaus/624x260.mp4 this play perfectly inside html5 video tag I had some h264 video such as this (BP profile): http://195.250.34.59/temp/test1.mp4 this video play inside html5 video tag only if I reencode with x264enc forcing the caps to CBP
Not really easily possible, see comments above.