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

Nico Sabbi nsabbi at email.it
Tue Sep 20 15:52:36 CEST 2005


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




More information about the MPlayer-dev-eng mailing list