[MPlayer-dev-eng] How to convert MPEG1/2 elementary streams toseparate program streams?

shaswata jash shaswata_jash at yahoo.com
Wed Sep 21 14:38:48 CEST 2005


Thanks Nico Sabbi  for the reply. After your suggestion i will obviously try to form only one program stream from the two elementary streams ( MPEG2 audio and video). Now to form the PS, i need PACK_HEADER, SYSTEM_HEADER, Length of Packetised elementary stream and other necessary extension data (e.g. to hold information for syncronization like Presentation time stamp etc). In this case, my understanding may not be completely right.
Now my problem is that i am getting the ES stream through RTP (which follows RFC 2250 for MPEG payload packetization) and i have to form the PS with necessary data from that much of information only. Is it possible? If so, any hint  ( specifically C/C++ code) to the above mentioned job will be highly helpful.

Nico Sabbi <nsabbi at email.it> wrote:
shaswata jash wrote:

>How an elementary stream can be converted to a program stream? More specifically , I am in-fact getting an MPEG1/2 elementary stream from Live's RTP server according to RFC 2250. Now after getting this ES, i want to change that individual ES to program stream. So obviously two separate program streams will be created and each of these PS will contain separately an audio and video data. 
> 
>
why two program streams? doesn't live libraries fetch both audio and 
video at the same time?

>I thought of following approach ----> Whenever a sequence_header arrives in RTP packet, start writing the media data to a file until the next sequence_header. Now add sequence_end code ( 0x000001B7) 
>

>and program_end code ( 0x000001B7) 
>
0x1b9. leave this crap alone, it's good only to make a mess

>at the last of the file. But obvious problem i am facing is that the players can't play that program stream. This may be due to absence PACK_header and program stream specific data. How to form those necessary data ?
>Any help in this matter will be highly helpful.
>
> 
>

mencoder -of mpeg -o file.mpg -ovc copy -oac copy sdp://file.sdp
eventually with -nosound. Notice that audio only PS is not supported, 
yet (if ever).

You can watch the resulting file in a separate window


--
Email.it, the professional e-mail, gratis per te: http://www.email.it/f

Sponsor:
Vuoi diventare un vero esperto sul Controllo di Gestione? Scopri come nella tua azienda puoi migliorare gli utili e ridurre le spese.
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=3214&d=20-9

_______________________________________________
MPlayer-dev-eng mailing list
MPlayer-dev-eng at mplayerhq.hu
http://mplayerhq.hu/mailman/listinfo/mplayer-dev-eng

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the MPlayer-dev-eng mailing list