Can Macports install package run Mythlink & Mythbrake?
Can Macports install package run Mythlink & Mythbrake?
Hi,
I have a MythTV system running great from the current Macports install. I want to move forward and integrate the media into my Plex server. I would like to transcode the shows to h264 and use Mythlink to make them readable in Plex. I tried using the transcoder in MythTV, but the results are not very good, so I was thinking of using Mythbrake. Is this possible in the Macports version of MythTV and is there any "cookbook" instructions to make this work in OS X? I just need someone to point me in the right direction. I would even use the transcoder in MythTV, if I could find a good preset.
Thanks,
Dylansob
I have a MythTV system running great from the current Macports install. I want to move forward and integrate the media into my Plex server. I would like to transcode the shows to h264 and use Mythlink to make them readable in Plex. I tried using the transcoder in MythTV, but the results are not very good, so I was thinking of using Mythbrake. Is this possible in the Macports version of MythTV and is there any "cookbook" instructions to make this work in OS X? I just need someone to point me in the right direction. I would even use the transcoder in MythTV, if I could find a good preset.
Thanks,
Dylansob
Re: Can Macports install package run Mythlink & Mythbrake?
The only transcoding I've done is when I was playing with MythExpress last year. It transcodes to h264 on the fly to serve the video via HLS. Worked fine at that point. Most of my recordings are high def from OTA through an HDHomerun Dual.
What problems are you having with transcoding, exactly?
I used to run mythlink on a regular basis but not for the last couple of years. You should find a copy of the script in '/opt/dvr/share/mythtv/contrib/mythlink.pl'. The only difference from the standard version is that it specifically uses the version of Perl installed with Myth.
Never tried MythBrake.
Craig
What problems are you having with transcoding, exactly?
I used to run mythlink on a regular basis but not for the last couple of years. You should find a copy of the script in '/opt/dvr/share/mythtv/contrib/mythlink.pl'. The only difference from the standard version is that it specifically uses the version of Perl installed with Myth.
Never tried MythBrake.
Craig
Formerly the MacPorts guy.
Re: Can Macports install package run Mythlink & Mythbrake?
I have created a couple of scripts that handle the following:
User Job that when a recording is started it will remove commercials and then uses Handbrake to transcode (x264 with Apple TV 3 as a preset)
User Job that looks up the metadata for the TV show and then creates the directory structure and TV show name that is compatible for Plex and Kodi
Example:
Record The Big Bang Theory --> User Job #1 will kick in when the recording has finished and will use the cultist of the program and will transcode and create a *.mpg without the commericals and then run Handbrake to transcode (x264 with Apple TV presets) to a *.m4v file. * is the datetimestamp of the recording in mythtv.
User Job #2 will look up the recording (mysql query) and then use TTVDB to lookup the metadata of the show. If this recording exists but this is the first time you recorded this show, it will create a directory structure and move the file to The Big Bang Theory/Season 8/The Big Bang Theory - s8e1 - The Locomotion Interruption.m4v. If the recording isn't found in TTVDB (Sports or non-standard recordings), then it uses the recording info in mysql to form the directory structure and move the file to The_Big_Bang_Theory/2015/The_Big_Bang_Theory The_Locomotion_Interruption.m4v. If this isn't the first time for the TV show, it will simply move the transcoded recording to the correct location that is compatible with Kodi and Plex.
I don't know what all the prereqs are but I am running on Yosemite and Mythtv 0.27.4 and used Macports to create my Mythtv setup.
I have a mac mini 2012 2.3GHz i7 and the handbrake transcoding is around the same duration as the recording. About 10 min after the recording has finished, the transcode job will run 60ish minutes for a 60 minute recording at full tilt. The transcode file is around 1/2 the mpeg-ts file recording and when you rip out the commercials the base meg-ts file is 70-80% of the original recording.
User Job that when a recording is started it will remove commercials and then uses Handbrake to transcode (x264 with Apple TV 3 as a preset)
User Job that looks up the metadata for the TV show and then creates the directory structure and TV show name that is compatible for Plex and Kodi
Example:
Record The Big Bang Theory --> User Job #1 will kick in when the recording has finished and will use the cultist of the program and will transcode and create a *.mpg without the commericals and then run Handbrake to transcode (x264 with Apple TV presets) to a *.m4v file. * is the datetimestamp of the recording in mythtv.
User Job #2 will look up the recording (mysql query) and then use TTVDB to lookup the metadata of the show. If this recording exists but this is the first time you recorded this show, it will create a directory structure and move the file to The Big Bang Theory/Season 8/The Big Bang Theory - s8e1 - The Locomotion Interruption.m4v. If the recording isn't found in TTVDB (Sports or non-standard recordings), then it uses the recording info in mysql to form the directory structure and move the file to The_Big_Bang_Theory/2015/The_Big_Bang_Theory The_Locomotion_Interruption.m4v. If this isn't the first time for the TV show, it will simply move the transcoded recording to the correct location that is compatible with Kodi and Plex.
I don't know what all the prereqs are but I am running on Yosemite and Mythtv 0.27.4 and used Macports to create my Mythtv setup.
I have a mac mini 2012 2.3GHz i7 and the handbrake transcoding is around the same duration as the recording. About 10 min after the recording has finished, the transcode job will run 60ish minutes for a 60 minute recording at full tilt. The transcode file is around 1/2 the mpeg-ts file recording and when you rip out the commercials the base meg-ts file is 70-80% of the original recording.
Re: Can Macports install package run Mythlink & Mythbrake?
Hi gsulshski,
The scripts that you have are what I would like to do. I am running on Mavericks with MythTV .27.4 made with macports. Would it be possible to get a copy of your scripts and some instructions on how to set it up?
The scripts that you have are what I would like to do. I am running on Mavericks with MythTV .27.4 made with macports. Would it be possible to get a copy of your scripts and some instructions on how to set it up?
Re: Can Macports install package run Mythlink & Mythbrake?
Hi Craig,
Thanks for the direction to where the myth link script is, I'll try and set it up. My problem with MythTV doing the transcoding is that the settings for the transcoder are very numeric for me and don't make and sense in the real world. So I know the settings in Handbrake and what they look like on my TV. MythTV is just a lot of trial and error until the right setting is found.
DylanSOB
Thanks for the direction to where the myth link script is, I'll try and set it up. My problem with MythTV doing the transcoding is that the settings for the transcoder are very numeric for me and don't make and sense in the real world. So I know the settings in Handbrake and what they look like on my TV. MythTV is just a lot of trial and error until the right setting is found.
DylanSOB
Re: Can Macports install package run Mythlink & Mythbrake?
Hi,
I will post the bash scripts on Github and post a link to them for access (by anyone) in here.
You will have to go through and update the paths in the script to point to the directories that you wish to have.
For example, $DestDir = /Volumes...
I tried not to hardcode anything...
Also, I will also add instructions in Github (with screen shots) ...but that will take sometime...but you can check periodically...
Please download the latest handbrake both the gui and cli and test it out and find out what preset or setting you like or need.
I will post the bash scripts on Github and post a link to them for access (by anyone) in here.
You will have to go through and update the paths in the script to point to the directories that you wish to have.
For example, $DestDir = /Volumes...
I tried not to hardcode anything...
Also, I will also add instructions in Github (with screen shots) ...but that will take sometime...but you can check periodically...
Please download the latest handbrake both the gui and cli and test it out and find out what preset or setting you like or need.
Re: Can Macports install package run Mythlink & Mythbrake?
Here is the github repository that I will be using for the mythtv scripts.
#1 remove commercials (if you enable properly during the recording) (mpeg-ts) -> transcode x264.5 (apple tv3) (m4v)
#2 fetch metadata from TVdb for the recording -> create (or use) a directory structure/filename that allows plex and kodi to recognize and build the TV show (if metadata if found for recording) or -> create (or use) a directory structure based on the recording information in the mysql db.
https://github.com/gsulshski/mythtv-handbrake-TVshow
I will deposit the bash scripts in this evening (2/24/15) first and will start adding the documentation right after that in the repository...
You could look through github searching for mythtv or the like to find out scripts that may be more of what you need/like.
#1 remove commercials (if you enable properly during the recording) (mpeg-ts) -> transcode x264.5 (apple tv3) (m4v)
#2 fetch metadata from TVdb for the recording -> create (or use) a directory structure/filename that allows plex and kodi to recognize and build the TV show (if metadata if found for recording) or -> create (or use) a directory structure based on the recording information in the mysql db.
https://github.com/gsulshski/mythtv-handbrake-TVshow
I will deposit the bash scripts in this evening (2/24/15) first and will start adding the documentation right after that in the repository...
You could look through github searching for mythtv or the like to find out scripts that may be more of what you need/like.
Re: Can Macports install package run Mythlink & Mythbrake?
Thank you gsulshski. I will try to set it up this weekend.
Cheers.
Cheers.
Re: Can Macports install package run Mythlink & Mythbrake?
I will be posting the detail instruction (increments) over this weekend in github.
Re: Can Macports install package run Mythlink & Mythbrake?
Hi gsulshski,
I downloaded the scripts and followed your instructions, but I keep running into an error "command not found". I renamed the directories in the script according to my computer. Here's a copy of my terminal.
Last login: Sun Mar 1 12:42:14 on ttys000
Deep-Thought:~ deepthought$ cd /volumes/pvr/mythtv/transcode
Deep-Thought:transcode deepthought$ ls -lt
total 32
-rwxr-xr-x@ 1 deepthought staff 2622 Mar 1 12:33 mythtv-transcode-x264-noautom.sh
-rwxr-xr-x@ 1 deepthought staff 8256 Mar 1 12:24 mythtv-metadata-fetch-noautom.sh
Deep-Thought:transcode deepthought$ mythtv-transcode-x264-noautom.sh
-bash: mythtv-transcode-x264-noautom.sh: command not found
Deep-Thought:transcode deepthought$
In your instructions, you refer to a script called mythtv-comm-removal-x264-noautom.sh, but the only scripts I can download are mythtv-transcode-x264-noautom.sh and mythtv-metadata-fetch-noautom.sh. Am I working with the correct script? I'm assuming I am and it's a name change.
Thanks
I downloaded the scripts and followed your instructions, but I keep running into an error "command not found". I renamed the directories in the script according to my computer. Here's a copy of my terminal.
Last login: Sun Mar 1 12:42:14 on ttys000
Deep-Thought:~ deepthought$ cd /volumes/pvr/mythtv/transcode
Deep-Thought:transcode deepthought$ ls -lt
total 32
-rwxr-xr-x@ 1 deepthought staff 2622 Mar 1 12:33 mythtv-transcode-x264-noautom.sh
-rwxr-xr-x@ 1 deepthought staff 8256 Mar 1 12:24 mythtv-metadata-fetch-noautom.sh
Deep-Thought:transcode deepthought$ mythtv-transcode-x264-noautom.sh
-bash: mythtv-transcode-x264-noautom.sh: command not found
Deep-Thought:transcode deepthought$
In your instructions, you refer to a script called mythtv-comm-removal-x264-noautom.sh, but the only scripts I can download are mythtv-transcode-x264-noautom.sh and mythtv-metadata-fetch-noautom.sh. Am I working with the correct script? I'm assuming I am and it's a name change.
Thanks
Re: Can Macports install package run Mythlink & Mythbrake?
Well, there are two issues.
1) I put the wrong script in Github, I will fix that to be the one in the directions.. mythtv-comm-removal-x264-noautom.sh
Remember, you will need to edit the scripts with your directory structure (again since I put the wrong one in)..... I suspect you did that
I see from the ls ..that you have them as executable...must be a path issue...
2) You have the script as executable but it isn't found ; for my $PATH it picks up the current directory....let me add my $PATH.. in the instructions
I will add this info into the instructions sometime tonight...but here is the idea. You may already know this but for completeness
http://coolestguidesontheplanet.com/add-shell-path-osx/
Why don't you just move the scripts to their final spot now ..and edit and debug them from there...
I would suggest moving the scripts to /opt/local/bin... this is the macports for mythv path....
and make sure your path looks like this...
echo $PATH
/opt/local/bin:/opt/local/sbin:/opt/local/lib/mariadb/bin:/opt/local/bin:/opt/local/sbin:/opt/local/lib/mariadb/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/Applications/Server.app/Contents/ServerRoot/usr/bin:/Applications/Server.app/Contents/ServerRoot/usr/sbin:/usr/local/git/bin
you see that /opt/local/bin is in the path
1) I put the wrong script in Github, I will fix that to be the one in the directions.. mythtv-comm-removal-x264-noautom.sh
Remember, you will need to edit the scripts with your directory structure (again since I put the wrong one in)..... I suspect you did that
I see from the ls ..that you have them as executable...must be a path issue...
2) You have the script as executable but it isn't found ; for my $PATH it picks up the current directory....let me add my $PATH.. in the instructions
I will add this info into the instructions sometime tonight...but here is the idea. You may already know this but for completeness
http://coolestguidesontheplanet.com/add-shell-path-osx/
Why don't you just move the scripts to their final spot now ..and edit and debug them from there...
I would suggest moving the scripts to /opt/local/bin... this is the macports for mythv path....
and make sure your path looks like this...
echo $PATH
/opt/local/bin:/opt/local/sbin:/opt/local/lib/mariadb/bin:/opt/local/bin:/opt/local/sbin:/opt/local/lib/mariadb/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/Applications/Server.app/Contents/ServerRoot/usr/bin:/Applications/Server.app/Contents/ServerRoot/usr/sbin:/usr/local/git/bin
you see that /opt/local/bin is in the path
Re: Can Macports install package run Mythlink & Mythbrake?
Sorry for the late reply. I've been out of town. I will try again setting up the script next week.
Thank you for your help so far.
Thank you for your help so far.
Re: Can Macports install package run Mythlink & Mythbrake?
Just wanted to point out that Perl and Python scripts you may find on the wiki need a slight modification to find their MythTV bindings under MacPorts. The shebang line needs to be pointed to the MacPorts-installed version of Perl/Python, as the case may be. See the newly added section at:
https://www.mythtv.org/wiki/MacPorts#Scripts
Note that not all Perl or Python scripts use the bindings--they'll work without modification. There are no bindings for Bash shell scripts (such as mythbrake) so they never need modification.
Craig
https://www.mythtv.org/wiki/MacPorts#Scripts
Note that not all Perl or Python scripts use the bindings--they'll work without modification. There are no bindings for Bash shell scripts (such as mythbrake) so they never need modification.
Craig
Formerly the MacPorts guy.

