[auto-solved] private streams in TS and fourcc

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
Piksou
Blank Cone
Blank Cone
Posts: 23
Joined: 30 Mar 2006 15:47

[auto-solved] private streams in TS and fourcc

Postby Piksou » 31 May 2006 09:22

Hi,

I'm curious to understand how VLC really manages the private stream.
In the code (ts.c) we have:

Code: Select all

switch( i_stream_type ) { case 0x01: /* MPEG-1 video */ case 0x02: /* MPEG-2 video */ case 0x80: /* MPEG-2 MOTO video */ es_format_Init( fmt, VIDEO_ES, VLC_FOURCC( 'm', 'p', 'g', 'v' ) ); break; case 0x03: /* MPEG-1 audio */ case 0x04: /* MPEG-2 audio */ es_format_Init( fmt, AUDIO_ES, VLC_FOURCC( 'm', 'p', 'g', 'a' ) ); break; case 0x11: /* MPEG4 (audio) */ case 0x0f: /* ISO/IEC 13818-7 Audio with ADTS transport syntax */ es_format_Init( fmt, AUDIO_ES, VLC_FOURCC( 'm', 'p', '4', 'a' ) ); break; case 0x10: /* MPEG4 (video) */ es_format_Init( fmt, VIDEO_ES, VLC_FOURCC( 'm', 'p', '4', 'v' ) ); pid->es->b_gather = VLC_TRUE; break; case 0x1B: /* H264 <- check transport syntax/needed descriptor */ es_format_Init( fmt, VIDEO_ES, VLC_FOURCC( 'h', '2', '6', '4' ) ); break; case 0x81: /* A52 (audio) */ es_format_Init( fmt, AUDIO_ES, VLC_FOURCC( 'a', '5', '2', ' ' ) ); break; case 0x82: /* DVD_SPU (sub) */ es_format_Init( fmt, SPU_ES, VLC_FOURCC( 's', 'p', 'u', ' ' ) ); break; case 0x83: /* LPCM (audio) */ es_format_Init( fmt, AUDIO_ES, VLC_FOURCC( 'l', 'p', 'c', 'm' ) ); break; case 0x84: /* SDDS (audio) */ es_format_Init( fmt, AUDIO_ES, VLC_FOURCC( 's', 'd', 'd', 's' ) ); break; case 0x85: /* DTS (audio) */ es_format_Init( fmt, AUDIO_ES, VLC_FOURCC( 'd', 't', 's', ' ' ) ); break; case 0x91: /* A52 vls (audio) */ es_format_Init( fmt, AUDIO_ES, VLC_FOURCC( 'a', '5', '2', 'b' ) ); break; case 0x92: /* DVD_SPU vls (sub) */ es_format_Init( fmt, SPU_ES, VLC_FOURCC( 's', 'p', 'u', 'b' ) ); break; case 0x93: /* LPCM vls (audio) */ es_format_Init( fmt, AUDIO_ES, VLC_FOURCC( 'l', 'p', 'c', 'b' ) ); break; case 0x94: /* SDDS (audio) */ es_format_Init( fmt, AUDIO_ES, VLC_FOURCC( 's', 'd', 'd', 'b' ) ); break; case 0xa0: /* MSCODEC vlc (video) (fixed later) */ es_format_Init( fmt, UNKNOWN_ES, 0 ); pid->es->b_gather = VLC_TRUE; break; case 0x06: /* PES_PRIVATE (fixed later) */ case 0x12: /* MPEG-4 generic (sub/scene/...) (fixed later) */ default: es_format_Init( fmt, UNKNOWN_ES, 0 ); break; }
So each format get its FOURCC based on the type except... the 0xA0 private treams. It's true that in a way, it seems logical but the decoder will need it some day won't it ? And i haven't found where a FOURCC was affected.

My only hypothesis right now is that in this cas the packet is blindly given to ffmpeg, used like a universal trash can where you can put anything and just expect ffmpeg to separate the codec himself. Is that it ? So we can't use TS for any compression method aht is not either standard MPEG or supported by ffmpeg ?

Thx in advance for your answer :)
Last edited by Piksou on 31 May 2006 10:42, edited 3 times in total.

Piksou
Blank Cone
Blank Cone
Posts: 23
Joined: 30 Mar 2006 15:47

Postby Piksou » 31 May 2006 10:16

In the muxer, we have:

Code: Select all

/* XXX dirty dirty but somebody want that: * using crapy MS-codec XXX */ /* I didn't want to do that :P */ case VLC_FOURCC( 'H', '2', '6', '3' ): case VLC_FOURCC( 'I', '2', '6', '3' ): case VLC_FOURCC( 'W', 'M', 'V', '3' ): case VLC_FOURCC( 'W', 'M', 'V', '2' ): case VLC_FOURCC( 'W', 'M', 'V', '1' ): case VLC_FOURCC( 'D', 'I', 'V', '3' ): case VLC_FOURCC( 'D', 'I', 'V', '2' ): case VLC_FOURCC( 'D', 'I', 'V', '1' ): case VLC_FOURCC( 'M', 'J', 'P', 'G' ): p_stream->i_stream_type = 0xa0; /* private */ p_stream->i_stream_id = 0xa0; /* beurk */ p_stream->i_bih_codec = p_input->p_fmt->i_codec; p_stream->i_bih_width = p_input->p_fmt->video.i_width; p_stream->i_bih_height = p_input->p_fmt->video.i_height; break;
so we did had a FOURCC in the beginning, it's saved in i_bih_codec but... the is no trac of this onr except avout DIV3 a bit latter.
So a MJPG stream had a FOURCC before the TS muxing and... is lost in the streaming isn't it ?

Piksou
Blank Cone
Blank Cone
Posts: 23
Joined: 30 Mar 2006 15:47

Postby Piksou » 31 May 2006 10:43

sorry i should get a brain and wait a lot more before asking here.
or it's just the good old murphy law
anyway, solved, sorry :o


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: chriska416 and 12 guests