[mythtv] transcoding with cutlist
martin at martinm-76.dk
Thu Aug 14 20:43:45 EDT 2003
Well, after thinking it over for several split-seconds I decided to
throw caution to the wind and just do it :)
Guess what: My first file seems to be A-OK.
What might I do next... I know: Do it again with a different file :)
martin at monsterpc:/Multimedia/TV> mythtranscode -c 2 -s
2003-08-05T00:30:00 -p Transcode -k
Transcoding from /Multimedia/TV/2_20030805003000_20030805012000.nuv to
allocating additonal buffer for : video(21)
allocating additonal buffer for : video(22)
allocating additonal buffer for : video(23)
allocating additonal buffer for : video(24)
allocating additonal buffer for : video(25)
allocating additonal buffer for : video(26)
allocating additonal buffer for : video(27)
allocating additonal buffer for : video(28)
allocating additonal buffer for : video(29)
allocating additonal buffer for : video(30)
allocating additonal buffer for : video(31)
allocating additonal buffer for : video(32)
allocating additonal buffer for : video(33)
allocating additonal buffer for : video(34)
allocating additonal buffer for : video(35)
allocating additonal buffer for : video(36)
allocating additonal buffer for : video(37)
allocating additonal buffer for : video(38)
allocating additonal buffer for : video(39)
allocating additonal buffer for : video(40)
allocating additonal buffer for : video(41)
Transcoding /Multimedia/TV/2_20030805003000_20030805012000.nuv done
martin at monsterpc:/Multimedia/TV> mencoder -audiofile audout
-audio-demuxer 20 -rawaudio rate=44100 -rawvideo on:w=384:h=288:fps=25
-ovc lavc -oac mp3lame -o foo.avi vidout
Using GNU internationalization
Original domain: messages
Original dirname: /usr/share/locale
Current domain: mplayer
Current dirname: /usr/share/locale
MEncoder dev-CVS-030805-18:54-3.2 (C) 2000-2003 MPlayer Team
CPU: Intel (Family: 8, Stepping: 7)
Detected cache-line size is 64 bytes
CPUflags: Type: 8 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with Runtime CPU Detection - WARNING - this is not optimal!
To get best performance, recompile MPlayer with
Reading /home/martin/.mplayer/codecs.conf: Can't open
'/home/martin/.mplayer/codecs.conf': Ingen sådan fil eller filkatalog
Reading /usr/etc/mplayer/codecs.conf: Can't open
'/usr/etc/mplayer/codecs.conf': Ingen sådan fil eller filkatalog
Using built-in default codecs.conf
File not found: 'frameno.avi'
Failed to open frameno.avi
Reading config file /home/martin/.mplayer/mencoder: Ingen sådan fil
success: format: 0 data: 0x0 - 0x0
[V] filefmt:65536 fourcc:0x30323449 size:384x288 fps:25,00
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 44100 Hz, 2 ch, 16 bit (0x10), ratio: 176400->176400 (1411,2
Selected audio codec: [pcm] afm:pcm (Uncompressed PCM)
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1 (-1=autodetect) osd: 1
Opening video decoder: [raw] RAW Uncompressed Video
VDec: vo config request - 384 x 288 (preferred csp: Planar I420)
VDec: using Planar I420 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
videocodec: libavcodec (384x288 fourcc=58564944 [DIVX])
Selected video codec: [rawi420] vfm:raw (RAW I420)
MP3 audio selected
Building audio filter chain for 44100Hz/2ch/16bit ->
Writing AVI header...
New_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
Pos:2627,5s 65688f ( 0%) 83fps Trem: 0min 0mb A-V:0,079
Writing AVI index...
Fixing AVI header...
Video stream: 792,391 kbit/s (99048 bps) size: 260252816 bytes
2627,520 secs 65688 frames
Audio stream: 134,585 kbit/s (16823 bps) size: 44211588 bytes
Hurray! My harddisk is saved. All is well with the universe! :)
tor, 2003-08-14 kl. 16:25 skrev Geoffrey Hausheer:
> ****** THIS PATCH WILL CAUSE YOUR COMPUTER TO EXPLODE---DO NOT USE
> As always, I spoke a little too soon. Here is a crude patch that lets
> mythtranscode write to 2 fifos, that (sort of) works with mencoder. it
> dynamically allocates buffers for audio or video data to keep the fifos
> from blocking, so if the rates are wrong, either audio or video will
> consistantly require more buffers, and you'll eventually run outof RAM.
> However, it appears to work acceptably once you get the rates set right.
> YOU WILL NEED THE CVS VERSION OF MPLAYER.
> The patch overrides the 'keep all frames' flag in mythtranscode to mean
> 'write to fifos'
> first create two fifos 'audout' and 'vidout' in the directory of your
> mkfifo audout
> mkfifo vidout
> in the directory with the fifos, run mythtranscode, use a command line
> mythtranscode -c 2036 -s 2003-08-08-11-00-00 -p Transcode -k
> it should say 'CreatedThreads' and then sit there. I think there is still
> a race in the code, so if it segfaults, just try again. You can use the
> '-l' switch to parse the cutlist, but DO NOT use the '-d' switch, or else
> your nuv file will get deleted by mythbackend.
> In another window, start mencoder as:
> mencoder -audiofile audout -audio-demuxer 20 -rawaudio rate=32000
> -rawvideo on:w=640:h=480:fps=29.97 -ovc lavc -oac mp3lame -o foo.avi
> (point vidout and audout to the directory of the fifos you created). The
> above assumes your stream is 640x480:ntsc with audio at 32kps, change as
> in the mythtranscode window you should see messages like:
> allocating additonal buffer for : video(11)
> allocating additonal buffer for : video(12)
> For a while, then they should stop (probably around 50 for video, 20 for
> audio, with the above settings). If one or the other continuously climbs
> throughout the encoding, your rates are wrong.
> mencoder will run a bit slower than using files. I haven't really looked
> into it, but it probably has to do with the threading solution. It
> should be able to do the whole thing in a single thread using select(),
> which will probably help.
> As a side note, if you need to stop encoding, hit ctrl-c in the
> mythtranscode window, NOT the mencoder window. Otherwise the transcoder
> will runaway and fill up all your ram.
> For those wondering, this could probably be used for mplayer, but I doubt
> it would be efficient. The goal I am trying to achieve is to have the
> fewest data-processing steps between going from nuv to avi/whatever,
> while allowing the flexibility of processing cutlists. the solution
> providied in this patch allows to go from nuv to avi with one decode and
> one encode of both audio and video. I think I can get that down to only
> an audio decode/encode when the nuv is in mpeg4, which should preserve
> the best quality. In theory if cutlists aren't being used, it would be
> possible to go from nuv to avi using this method with no quality loss of
> audio or video, but I'm not sure how realistic any of that is yet.
> Obviously, this patch is very crude, doesn't clean up after itself, and
> is, in general, not good. But if someone else could try it out, and
> confirm it works okay, I'll work on the audio-sync issues, and make it
> presentable. Also, make sur eto check the avi. I've noticed that
> sometimes mencoder starts off a half frame off on the video, which leads
> to a black line down the middle of the picture. I'm not sure when this
> happens, but it seems to happen mostly if I didn't stop mythtranscode
> first in the previous run.
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
Martin Moeller <martin at martinm-76.dk>
More information about the mythtv-dev