After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 692942 - h264parse: add conversion support from baseline/other profiles to constrained-baseline profile
h264parse: add conversion support from baseline/other profiles to constrained...
Status: RESOLVED WONTFIX
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
unspecified
Other All
: Normal enhancement
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-01-31 13:41 UTC by Nicola
Modified: 2013-06-05 12:32 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Nicola 2013-01-31 13:41:30 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
Comment 1 Tim-Philipp Müller 2013-01-31 13:51:17 UTC
> 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?
Comment 2 Nicola 2013-01-31 14:07:58 UTC
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)
Comment 3 Gwenole Beauchesne 2013-02-08 09:42:18 UTC
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.
Comment 4 Gwenole Beauchesne 2013-02-08 09:57:38 UTC
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.
Comment 5 Nicola 2013-02-08 11:22:55 UTC
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
Comment 6 Tim-Philipp Müller 2013-06-05 12:32:16 UTC
Not really easily possible, see comments above.