[mythtv] [PATCH] Add streaming output to transcoder
ou401cru02 at sneakemail.com
Fri Aug 15 12:12:07 EDT 2003
On Fri, 15 Aug 2003 09:49:14 -0400, "Isaac Richards ijr-at-po.cwru.edu
|mythtv/1.0-Allow|" <e6kbhbk35r0t at sneakemail.com> said:
> On Friday 15 August 2003 08:51 am, Geoffrey Hausheer wrote:
> > The following patch adds the ability to write raw audio/video to sperate
> > fifos. These can then be used by programs like mencoder to build new
> > streams without understanding the nuv format. It also allows for
> > processing the cutlists before reencoding, and should produce better
> > output than any other current solution.
> It's in CVS now.
I've attached another minor patch. the previous code terminates as soon
as decoding is done, which might result in losing the last second or two
of the stream. The transcoder will now drain the fifo buffers before
A few random comments:
1) This patch differs from the previous prototype in that mythtrancsode
will create/delete the fifos. If they are already present, mythtranscode
will fail. This seems to ensure the initial sync happens correctly.
2) ffmpeg appears to also work for reading the raw streams (in case you
don't have a CVS version of mencoder):
ffmpeg -f u16le -ar 32000 -ac 2 -i <path>/audout -f rawvideo -s 640x480
-r 29.97 -i <path>/vidout -vcodec mpeg4 -b 2000 -acodec mp3 -ab 128
(I have encoded a file using this, but can't watch it, as I don't have a
display handy, so I'm not sure the paramters are correct. The ordering
of parameters IS important though).
3) Do NOT do something silly like:
cat <path>/audout >file
even if you were to do : 'cat <path>/audout >file1 &; cat <path>/vidout >
file2' it wouldn't work. The audio and video frames are of vastly
different sizes, and mythtranscode assumes that whatever process is
reading them reads frames at an equal rate (i.e. reads video a lot faster
trhan audio). If you try using 'cat', both streams get read at ~ the
same rate, which will cause mythtranscode to create thousands of new
video buffers, and eventually eat all of your RAM.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1937 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20030815/078f8a71/transcode11a.bin
More information about the mythtv-dev