[mythtv-users] Transcoding/editing recordings to 720p/AC3 .mkv/.avi format

Bob Sully rcs at malibyte.net
Wed Sep 2 22:48:30 UTC 2009


Another Sillyname wrote:
> 2009/9/1 Bob Sully <rcs at malibyte.net>:
>> Hi all -
>>
>> I've been having problems trying to transcode recordings.
>>
>> Forgive me if these questions are overly simplistic, but I've been all
>> over Google and haven't found an easy answer.  I have two different
>> types
>> of files I'm trying to transcode - in both cases I'd like to wind up
>> with
>> 720p .mkv or .avi files with AC3 5.1 audio, at approximately 700MB per
>> ~40-45 minute "1 hour" episode after the commercials are cut out.  I
>> don't
>> want to have to download torrents to get these, since I have the
>> high-quality source recordings already saved on my Myth backend.
>>
>> (1) Regular Myth recordings.  Currently, I do NOT have auto-transcoding
>> enabled, but I do have commflagging set.  I still have to edit and set
>> up
>> a precise cutlist - after which I wind up with an .mpg file (no longer
>> .nuv).  Mythtranscode wants to do DVD-resolution and .ps files - neither
>> of those are what I'm looking for.  Problem is, nothing else knows about
>> the cutlist, so I have to do the same edits in avidemux - which does a
>> great job with the video but b0rks the audio completely (for example, it
>> usually cuts video correctly but doesn't always edit out the
>> corresponding
>> audio, so when I do get audio at all after the save, it's out of sync -
>> or
>> I get pops and hums, and that's all the sound I get).  I think I must
>> have
>> the wrong output settings (currently using x264/AC3/MKV - please tell me
>> if these are wrong).  Can Mythnuv2mkv handle an .mpg with a cutlist as
>> the
>> input file?  If so, what are the command-line options I need to use?
>>
>> (2) HD-PVR recordings which I've recorded via a little bash script (will
>> share if anyone's interested - changes channel on the Motorola 6200 STB,
>> starts/stops recording at preset times); I'm running 0.21-fixes with
>> JYA's
>> VDPAU backports, so can't yet record from the HD-PVR within Myth.  These
>> recordings are at 720p resolution from the STB with 5.1 AC3 sound.  Same
>> problem with avidemux - I can edit out commercials from the video, but
>> it
>> doesn't cut the audio correctly.
>>
>> I know there must be a way to do these edits and wind up with the
>> decent-quality 720p/AC3 .mkv and .avi files I'm looking for.
>>
>> Can anyone please enlighten me/send me a pointer?
>>
>> Thanks in advance!
>> Bob
>> --
>> ________________________________________
>> Bob Sully - Simi Valley, California, USA
>> http://www.malibyte.net
>> http://www.malibyte.com
>>
>> _______________________________________________
>> mythtv-users mailing list
>> mythtv-users at mythtv.org
>> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>>
> Hi Bob
>
> I'm currently using Mencoder to turn BBC HD 1080i AC3 material into
> 720p H264 AC3 saves, like you there wasn't a lot on info out there.
>
> Try running the following as a two pass on one of your files and see
> what you get (you MUST run the second pass in the directory where you
> ran the first pass).
>
> mencoder -noskip -oac lavc -lavcopts acodec=ac3 -ovc lavc -lavcopts
> vcodec=mpeg4:vbitrate=1800:vqmin=2:vqmax=31:mbd=2:vpass=1 -vf
> scale=1280:720 -ss 1:32:0 -endpos 41:10:00 -o /dev/null
> /path/to/original/file/for/transcode
>
> mencoder -noskip -oac lavc -lavcopts acodec=ac3 -ovc lavc -lavcopts
> vcodec=mpeg4:vbitrate=1800:vqmin=2:vqmax=31:mbd=2:vpass=2 -vf
> scale=1280:720 -ss 1:32:0 -endpos 41:10:00 -o
> /path/to/file/you/want/to/create/itsname
> /path/to/original/file/for/transcode
>
> The -ss value is the start position of where you want to begin the
> transcode
>
> The -endpos value is the LENGTH (It's not the actual end position)
>
> Both the above is MM:SS:FS (i.e. Minutes:Seconds:Tenths of Seconds)
>
> Good Luck
>


Hi -

Thanks for the reply, tried this but got the following:

[mythtv at vader: /video]$ mencoder -noskip -oac lavc -lavcopts acodec=ac3
-ovc lavc -lavcopts
vcodec=mpeg4:vbitrate=1800:vqmin=2:vqmax=31:mbd=2:vpass=1 -vf
scale=1280:720 -ss 1:32:0 -endpos 40:00:00 -o /dev/null
4071_20090823215900.mpg

MEncoder UNKNOWN-4.3.3 (C) 2000-2009 MPlayer Team
success: format: 0  data: 0x0 - 0x2a9130cc
TS file format detected.
VIDEO MPEG2(pid=1984) AUDIO A52(pid=1986) NO SUBS (yet)!  PROGRAM N. 1
VIDEO:  MPEG2  1280x720  (aspect 3)  59.940 fps  38810.4 kbps (4851.3
kbyte/s)
[V] filefmt:29  fourcc:0x10000002  size:1280x720  fps:59.940  ftime:=0.0167
==========================================================================
Opening audio decoder: [liba52] AC3 decoding with liba52
Using SSE optimized IMDCT transform
Using MMX optimized resampler
AUDIO: 48000 Hz, 2 ch, s16le, 96.0 kbit/6.25% (ratio: 12000->192000)
Selected audio codec: [a52] afm: liba52 (AC3-liba52)
==========================================================================
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
Opening video filter: [scale w=1280 h=720]
==========================================================================
Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
VDec: vo config request - 1280 x 720 (preferred colorspace: Mpeg PES)
The selected video_out device is incompatible with this codec.
Try appending the scale filter to your filter list,
e.g. -vf spp,scale instead of -vf spp.
VDecoder init failed :(
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Unsupported PixelFormat -1
Selected video codec: [ffmpeg2] vfm: ffmpeg (FFmpeg MPEG-2)
==========================================================================
[ac3 @ 0x2f9a9b0]No channel layout specified. The encoder will guess the
layout, but it might be incorrect.

Flushing video frames.
Filters have not been configured! Empty file?
Writing index...
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing
vprp header.

Video stream:      nan kbit/s  (-2147483648 B/s)  size: 0 bytes  0.000
secs  0 frames

Audio stream:      nan kbit/s  (-2147483648 B/s)  size: 0 bytes  0.000 secs
Segmentation fault


I also tried it with:

mencoder -noskip -oac lavc -lavcopts acodec=ac3 -ovc x264 -x264encopts
:vbitrate=1800:vqmin=2:vqmax=31:mbd=2:vpass=1 -vf scale=1280:720 -ss
1:32:0 -endpos 40:00:00 -o /dev/null 4071_20090823215900.mpg

with the same results.  I must be missing something obvious...


Interestingly, I also tried it with the Mythnuv2mkv script (2 passes,
quality=720) on the same file...after about 4 hours of cooking the CPU
(2.4GHz Q6600), it did come up with a finished 1.6GB (down from 5GB) file,
but with the caveat that there were a lot of errors, and "-SUSPECT" was
tacked onto the end of the filename.  It **didn't** use the cutlist, and
there was frequent hesitation on playback.

Hmmmmm....any other feedback would be welcome - thanks.

Bob
-- 
________________________________________
Bob Sully - Simi Valley, California, USA
http://www.malibyte.net
http://www.malibyte.com



More information about the mythtv-users mailing list