diff mbox

[FFmpeg-devel] configure - add dependencies for MPEG-PS and MPEG-ES demuxers

Message ID 62164407-e3e8-578a-3845-00a727ae0e42@gmail.com
State New
Headers show

Commit Message

Gyan Jan. 31, 2018, 10:03 a.m. UTC
MPEG-1/2 video streams in MPEG-PS containers fail to be identified 
unless the raw MPEG video demuxer is also enabled. Once identified, 
decoding for these streams, whether as ES or in PS, isn't error-free 
unless the mpegvideo parser is enabled. Patch adds these dependencies.

MPEG-1/2 videos streams in other containers like MP4, MKV don't have 
these requirements.
From 4c84a9421213ba49f09a30e2777c84b5e15101bf Mon Sep 17 00:00:00 2001
From: Gyan Doshi <gyandoshi@gmail.com>
Date: Wed, 31 Jan 2018 14:45:23 +0530
Subject: [PATCH] configure - add dependencies for MPEG-PS and MPEG-ES demuxers

MPEG-1/2 video streams in MPEG-1/2 PS containers require the mpegvideo demuxer
in order to be recognized.

In turn, the mpegvideo parser is required for decoding these and raw MPEG-1/2 ES.
---
 configure | 2 ++
 1 file changed, 2 insertions(+)

Comments

Carl Eugen Hoyos Jan. 31, 2018, 4:48 p.m. UTC | #1
2018-01-31 11:03 GMT+01:00 Gyan Doshi <gyandoshi@gmail.com>:
>
> MPEG-1/2 video streams in MPEG-PS containers fail to be identified unless
> the raw MPEG video demuxer is also enabled. Once identified, decoding for
> these streams, whether as ES or in PS, isn't error-free unless the mpegvideo
> parser is enabled. Patch adds these dependencies.

While this would help me personally, I don't think it is correct:
Many such examples exist, I believe the dependencies are meant to
ensure compilation, not necessarily specific use-cases.

Carl Eugen
Gyan Jan. 31, 2018, 5:22 p.m. UTC | #2
On 1/31/2018 10:18 PM, Carl Eugen Hoyos wrote:
> 
> While this would help me personally, I don't think it is correct:
> Many such examples exist, I believe the dependencies are meant to
> ensure compilation, not necessarily specific use-cases.

Compilation in its own does succeed. And that's the problem. The most 
common major payloads can't be accessed (or identified) without these 
other components, making the PS demuxer, solo, close to useless.

Will *_suggest be fine?


Regards,
Gyan
Hendrik Leppkes Jan. 31, 2018, 6:20 p.m. UTC | #3
On Wed, Jan 31, 2018 at 6:22 PM, Gyan Doshi <gyandoshi@gmail.com> wrote:
>
> On 1/31/2018 10:18 PM, Carl Eugen Hoyos wrote:
>>
>>
>> While this would help me personally, I don't think it is correct:
>> Many such examples exist, I believe the dependencies are meant to
>> ensure compilation, not necessarily specific use-cases.
>
>
> Compilation in its own does succeed. And that's the problem. The most common
> major payloads can't be accessed (or identified) without these other
> components, making the PS demuxer, solo, close to useless.
>

It is somewhat intentional that components do not depend on each other
like this. Someone that has only specific requirements may not need
those detections, so we generally do not force anything like that.
Anyone who wants a very minimal build needs to configure components
very carefully, specifically because of these interactions.

Note that _suggest serves a different purpose in configure then one
might know from other systems, and would not be appropriate.

- Hendrik
Gyan Jan. 31, 2018, 7:59 p.m. UTC | #4
On 1/31/2018 11:50 PM, Hendrik Leppkes wrote:

> Anyone who wants a very minimal build needs to configure components
> very carefully, specifically because of these interactions.

In this case, how would a non-dev user go about discovering which 
components other than the 'obvious' ones are required for adequate 
functionality?

For someone who has compiled only the PS demuxer + MPEG-1/2 decoders, 
there's no part of the documentation devoted to selection of 
non-dependent but still essential components. In this case, ffmpeg's 
console output also provides no clues, only the appearance of a broken 
demuxer.

Regards,
Gyan
James Almer Jan. 31, 2018, 8:04 p.m. UTC | #5
On 1/31/2018 3:20 PM, Hendrik Leppkes wrote:
> On Wed, Jan 31, 2018 at 6:22 PM, Gyan Doshi <gyandoshi@gmail.com> wrote:
>>
>> On 1/31/2018 10:18 PM, Carl Eugen Hoyos wrote:
>>>
>>>
>>> While this would help me personally, I don't think it is correct:
>>> Many such examples exist, I believe the dependencies are meant to
>>> ensure compilation, not necessarily specific use-cases.
>>
>>
>> Compilation in its own does succeed. And that's the problem. The most common
>> major payloads can't be accessed (or identified) without these other
>> components, making the PS demuxer, solo, close to useless.
>>
> 
> It is somewhat intentional that components do not depend on each other
> like this. Someone that has only specific requirements may not need
> those detections, so we generally do not force anything like that.
> Anyone who wants a very minimal build needs to configure components
> very carefully, specifically because of these interactions.
> 
> Note that _suggest serves a different purpose in configure then one
> might know from other systems, and would not be appropriate.
> 
> - Hendrik

Demuxers selecting parsers is done a lot, not for compilation reasons
but for stream handling reason. See dtshd demuxer and dca parser.

No comment about the demuxer selecting demuxer line. That's usually only
done when they both share pretty much the exact same code.
Gyan Jan. 31, 2018, 8:08 p.m. UTC | #6
On 2/1/2018 1:34 AM, James Almer wrote:

> No comment about the demuxer selecting demuxer line. That's usually only
> done when they both share pretty much the exact same code.

In this case, if the mpegvideo demuxer isn't enabled, the PS demuxer 
sends the video stream to the MPEG audio decoder which then complains 
about 'Header missing'.


Regards,
Gyan
diff mbox

Patch

diff --git a/configure b/configure
index fcfa7aa442..3b9956d467 100755
--- a/configure
+++ b/configure
@@ -3031,9 +3031,11 @@  mov_muxer_select="iso_media riffenc rtpenc_chain"
 mp3_demuxer_select="mpegaudio_parser"
 mp3_muxer_select="mpegaudioheader"
 mp4_muxer_select="mov_muxer"
+mpegps_demuxer_select="mpegvideo_demuxer"
 mpegts_demuxer_select="iso_media"
 mpegts_muxer_select="adts_muxer latm_muxer"
 mpegtsraw_demuxer_select="mpegts_demuxer"
+mpegvideo_demuxer_select="mpegvideo_parser"
 mxf_d10_muxer_select="mxf_muxer"
 mxf_opatom_muxer_select="mxf_muxer"
 nut_muxer_select="riffenc"