[mythtv] transcoding with cutlist

Martin Moeller martin at martinm-76.dk
Wed Aug 13 19:45:56 EDT 2003


ons, 2003-08-13 kl. 17:36 skrev Geoffrey Hausheer:
> On 13 Aug 2003 07:17:00 +0200, "Martin Moeller martin-at-martinm-76.dk
> |mythtv/1.0-Allow|" <mvx1hgfxer0t at sneakemail.com> said:
> > ons, 2003-08-13 kl. 01:39 skrev Geoffrey Hausheer:
> > [musings about fifos and mencoder/mythtranscode interaction]
[(semi) working solution with raw data piped to mplayer]

> First, I should mention that this only works with CVS mplayer.  the 0.91
> and earlier versions don't support using -audiofile with -rawvideo
> 
Check. Have MPlayer from CVS.

> > Okay, well it's a great start I'd say. Most of the shows I want to
> > archive only have 'junk' at the beginning and end, no advertising in the
> > actual broadcast (that is not always the case but for most of my needs
> > it is). I would like to test it on a couple of files when you feel
> > you're ready for that.
> 
> I'm still working on a viable solution
> 
Ok.


[prodding about mpeg4 / mp3 framedumps rather that totally raw]
> I'm not really sure how viable this is yet.  I want to get it working
> well with raw data first.  After lots of playing with it, I've found that
> mplayer hates fifos.  It refuses to work with them.  This really makes
> things hard, since uncompressed data is really big, and we don't really
> want to keep it around.
> 
I have just tried to pipe a show recorded long ago and AVI'ized to a
fifo, having dumped the sound to stream.dump first, and run the sound
through mpg123 -s stream.dump > audio.raw (audio.raw is also a fifo).

It seems mencoder gets ahead of itself. It is encoding at almost twice
the rate the data is decoded..? Why isn't it waiting for data if it has
already read all there is..?

> My current solution is the following:
> in mythtranscode, I write video to a fifo (vidout) and audio to a file
> (audout)
> 
> then I can start mplayer like:
> cat vidout | mplayer -rawvideo on:w=640:h=480 -audiofile audout
> -audio-demuxer 20 -rawaudio rate=32000 -
> the mencoder line looks like:
> cat vidout | mencoder -rawvideo on:w=640:h=480 -audiofile audout
> -audio-demuxer 20 -rawaudio rate=32000 -ovc lavc -oac mp3lame -o out.avi
> 
Tried a few this along those lines if the manner available to me, but it
seems to encode the video too fast and usually the sound doesn't seem to
show up... I may have forgotten about the demux part though... Even with
only video piped into mencoder I see it encode faster than it gets the
data. Weird...

> and it plays video from the fifo and audio from the file.  The problem is
> that it may be possible to underrun the audio.  You also end up with a
> raw audio file on your disk when you are done, which takes up ~128kB/sec
> or 461Megs/hr (at 32kbps sample rate).
> 
if need be I can handle the audio part, but there's no way I have room
for the raw video with anything other than pipes/fifos/etc...

> If there is an interest in this (you'll need to delete the audio file
> when done), I will continue working on it.  Assuming I can get the audio
Not a problem.
> and video synced, this will give a solution for going from nuv to
> divx/avi without an mencoder patch.  As to whether it can be done without
> recompressing the video stream (as I said, the audio stream will almost
> certainly need to be recompressed to maintain sync), I don't know yet.
> 
> If anyone knows any clever ways to make mplayer work with named-pipes,
> I'd be glad to hear them.
I thought I did but it seems I don't.. :-/
> 
> .Geoff
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev



More information about the mythtv-dev mailing list