<br><br><div class="gmail_quote">On 21 September 2012 09:13, Peter Bennett (cats22) <span dir="ltr"><<a href="mailto:cats22@comcast.net" target="_blank">cats22@comcast.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 09/18/2012 03:29 PM, <a href="mailto:reubencrane@gmail.com">reubencrane@gmail.com</a> wrote:<br>
> Hello,<br>
><br>
> I am running mythtv on freebsd. Works great but I am having trouble<br>
> doing video conversion. I successfully used mythtranscode (had to add<br>
> season, episode, and another column to the recorder table) to cut<br>
> commericials and am now trying to use mencoder to convert the<br>
> resulting mpg to avi(mpeg4 and mp3) I can do a single pass but I<br>
> wasn't to happy with video quality during scenes with motion. So now I<br>
> am trying 2 and 3 passes but this always fails on second or third<br>
> pass. Most of the information I have googled seems dated. So could<br>
> someone share their preferred method to convert mythtv mpg to<br>
> reasonable quality file?<br>
><br>
> Thanks,<br>
> Reuben<br>
><br>
</div>My method consists of the following steps. I am not using mythtv<br>
transcode in this process.<br>
<br>
set LINKSDIR to a suitable directory<br>
<br>
Create symbolic links for my recordings as follows:<br>
/usr/share/doc/mythtv-backend/contrib/user_jobs/<a href="http://mythlink.pl" target="_blank">mythlink.pl</a> \<br>
--link $LINKSDIR/origdate --format "%U/%T/%oy%om%od %S"<br>
<br>
This creates links in that directory to all your recordings (mpg files).<br>
You can browse the directory and find the file that corresponds to your<br>
program. I copy that to another computer because my backend is a low-end<br>
machine with not much CPU power.<br>
<br>
For creating mkv/x264 archives, download and install handbrake-cli. To<br>
install on ubuntu add the following ppa:<br>
sudo add-apt-repository ppa:stebbins/handbrake-releases<br>
<br>
Handbrake is the best video tool I have found. The options below will<br>
automatically figure out and apply deinterlacing if required and will<br>
automatically apply correct frame rates. Some recordings may have<br>
variable frame rates, for example 29.97 fps for commercials, 23.976 for<br>
the movie. Handbrake will keep these rates in the mkv file.<br>
<br>
To archive 1080i and 1080p content with excellent quality use this<br>
command line<br>
HandBrakeCLI -i Serenity.mpg -o Serenity.mkv -f mkv -e x264<br>
--x264-preset superfast --x264-profile high --x264-tune film -q 30 -E<br>
copy --audio-fallback ffac3 --crop 0:0:0:0 -w 1920 -l 1080 --decomb<br>
<br>
This uses a 1 pass constant quality encoding, uses about 1 GiB per hour<br>
for the encoded file, although this will vary. On my system it is almost<br>
real-time encoding, to encode 1 hour takes a little over an hour, around<br>
1 hour 10 minutes.<br>
<br>
To leave out excess footage at the beginning and end, add these entries<br>
to the end of the command line<br>
--start-at duration:138 --stop-at duration:1111<br>
138 is the position in seconds to start encoding, and stop-at is the<br>
length in seconds. You can use fractions for example --start-at<br>
duration:2986.416766666667.<br>
<br>
To archive into 480p content use the same command line but substitute<br>
appropriate -w and -l values:<br>
-w 640 -l 480 for 4x3 (SD) pictures or -w 720 -l 404 for 16x9. For 480p<br>
I recommend -q 26 instead of -q 30 if you plan to watch it on a large<br>
screen TV (to avoid artifacts that will show up when watching a<br>
low-definition image enlarged). 26 will use about 300 GiB per hour. 30<br>
will use about 200 GiB per hour. Encoding in SD takes also a little over<br>
real time.<br>
<br>
Instead of "-E copy" you can use "-E lame --ac 2 --ab 128" to encode<br>
audio as mp3 to save more disk space.<br>
<br>
The mkv files can be played on a computer with mythtv, VLC or other<br>
programs, or burned on a DVD and played in a stand-alone Blu-ray player.<br>
<br>
I plan to put this all in a blog with more detail, and info on how to<br>
edit the files to remove commercials, join files, rip DVDs, and create<br>
avi files that can be burned on a DVD and played in a standalone DVD player.<br>
<div class="HOEnZb"><div class="h5"><br>
Peter<br>
<br></div></div></blockquote><div><br>Possibly related to an issue I reported a while back, however I had no one confirm or deny the problem<br><br><a href="http://www.gossamer-threads.com/lists/mythtv/users/515305">www.gossamer-threads.com/lists/mythtv/users/515305</a><br>
<br>I've been meaning to raise a bug for this issue.<br><br>Cheers,<br><br>Anthony <br></div></div><br>