[mythtv-users] HD Transcoder to .mkv?

Lucas Christian lucas at lucasec.com
Sat Oct 25 14:38:10 UTC 2014


On October 24, 2014 at 12:30:02 PM, scott at tbwifi.ca (scott at tbwifi.ca) wrote:
Hi, 

Thanks for the tip on using ffmpeg, but I have been playing around trying 
to get Mythbrake to work for my situation (uses Handbrake), but I thinking 
there are many features of this that I don't require. Perhaps I'm wrong. 
All I really want to do is convert the mpeg2 file to h.264 and place into 
a MP4 container. Handbrake seems to be the best choice. Since I don't 
really need the extra stuff in this script 
https://www.mythtv.org/wiki/Mythbrake related to audio track checking and 
selection, can someone offer thoughts on what I can comment out? I'm 
having some challenges getting mediainfo to work, but now realize that I 
likely don't need that step. 

Any tips appreciated! 

Scott 


I dealt with the same problem when I was creating my initial setup, although I wanted to transcode my content to mp4 files compatible with iOS devices.

I have a script that uses ffmpeg and works pretty well—it’s a derivation a script I found on someone’s blog and is written in bash: http://static.lucasec.com/mythtv/mythtranscode-h264.sh. To run it from a user job, create a user job with this command line: “/path/to/mythtranscode-h264.sh "%DIR%/%FILE%" "%CHANID%" "%STARTTIMEUTC%" "%JOBID%””.

Getting a MKV out of the script should be as simple as changing $DEST_BASE (line 35) to have a .mkv extension. Change the -scodec option on line 86 from “mov_text" to “srt” as mkv uses different subtitle formats than mp4.

There are a few other gotchas.  Make sure you set your database user/pass at the top of the script so that it can report progress into the job queue table.  Also, the current script converts audio into AAC using the libfdk_aac encoder, which your ffmpeg install probably didn’t come with. If you want original audio, just delete the -acodec and -vbr options and add "-acodec copy" on lines 86 and 90.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20141025/5db06bc2/attachment.html>


More information about the mythtv-users mailing list