Re: How to convert MPEG-TS to MPEG-PS on the fly?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 22 Aug 2008, at 15:44, Josef Wolf wrote:

> On Fri, Aug 22, 2008 at 11:07:47AM +1000, Kevin Sheehan wrote:
>
>> Barry was right on the money with the ts2ps suggestion below.  It's  
>> part
>> of the libdvb package.  You don't have to use the dvb-mpegtools  
>> app, you
>> can just use the lib in yours - no pipes, etc.
>
> I know.  But I still consider ts2ps to be too heavy for my  
> application.
> It goes and parses all the PES contents, which eats much CPU.


I might be slightly out in terms of your requirements, but I've had  
success using
the 'replex' tool ( http://www.metzlerbros.org/dvb/ ) to do on-the-fly  
stream
conversions of a recorded TS into a PS with a specified video and  
audio PID.

The command I wrapped in a popen call from a script was:

	/opt/local/bin/replex -o /dev/stdout -i TS -v %s -a %s -t MPEG2 /dev/ 
stdin

Where the two %s's were replaced with the desired audio PID and video  
PID.
Then I wrote to, and read from the pipes accordingly.

The only issue I had with this was that it was prone to breaking  
unless the
TS stream had little or no corruption. The CPU usage for replex was
considerably lower than using mencoder or ffmpeg, although I don't know
how difficult it would be to get replex to insert multiple audio  
streams into
the resulting PS.

Nick

--
Nick Ludlam
nick@xxxxxxxxxx





_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux