[mythtv-users] Convert nuv to mpg
Scott Alfter
mythtv at salfter.dyndns.org
Wed Feb 7 05:40:47 UTC 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Andrew Robinson wrote:
> Does anyone have an example or a pointer to an example of a 'transcode'
> command to convert a nuv file to an mpg file?
I use mencoder (part of mplayer) for audio and video encoding. Something like
this would work:
#!/bin/sh
src=$1
dest=$2
vbitrate=$3
nice -n 18 mencoder -vf pullup,softskip,scale=720:480,harddup -ofps 24000/1001
- -ovc lavc -lavcopts
vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9600:vbitrate=${vbitrate}:keyint=18:vpass=1:turbo:trell:dc=10
- -oac copy -o /dev/null ${src}
nice -n 18 mencoder -vf pullup,softskip,scale=720:480,harddup -ofps 24000/1001
- -ovc lavc -lavcopts
vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9600:vbitrate=${vbitrate}:keyint=18:vpass=2:turbo:trell:dc=10
- -oac lavc -lavcopts acodec=ac3:abitrate=192 -of mpeg -o ${dest} ${src}
(This script should have six lines. "nice -n 18 mencoder..." starts the last
two lines.)
As given above, this will scale to 720x480, do inverse 3:2 pulldown (which is
appropriate for most TV shows, but may not be so good for news, sports, or
other live events), and does two-pass VBR encoding of film-rate NTSC at 4.2
Mbps. In addition, it transcodes the audio to AC3 at 192 kbps. Change the
vbitrate parameter to adjust the video bitrate.
Interlaced encoding of news/sports/etc. requires some changes. Leave out
"pullup,softskip" from the video filter (-vf) options, change the framerate
(-ofps) from 24000/1001 fps to 30000/1001 fps, and add "ilme,ildct" to the
video encoder options (the first -lavcopts in each command).
Lots of shows are broadcast in letterbox format. You might want to convert
these to widescreen; the encoder might have an easier time without the black
bars at top and bottom. To do that, insert "crop=480:360:0:60" before the
scale filter in the filter options, and add "aspect=16/9" to the video encoder
options. (This assumes that your source video is encoded at 480x480; adjust
the first number if it isn't.)
_/_
/ v \ Scott Alfter
(IIGS( http://alfter.us/ Top-posting!
\_^_/ rm -rf /bin/laden >What's the most annoying thing on Usenet?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFyWZe3/dx2FhlNfcRAv6dAJ9yz4OfJ98JSei15IbkyDfUY2DLSQCcDqYu
iBmtgnTsMFnKXFO4WtoRuOQ=
=jodq
-----END PGP SIGNATURE-----
More information about the mythtv-users
mailing list