This script will convert almost every MKVfile (H.264/X.264) to a working M4V file wich iTunes (and so the Apple TV 2G) will like and embrace it to it's ecosystem.
After the conversion the M4V-file will have:
- H.264/X.264 video
- AAC/M4A audio
- And best of all subtitles
- Automatic TV Show/Movie recognition and setting it for iTunes.
There is much to learn and probably much to improve so let me what you think.
Things I want to improve or add as a function are:
- Renaming features
- Subtitle downloading
- Multiple audiostreams (AC-3)
- 1080P (Apple TV 3G)
- Clean up the toolshed, a lot of stuff comes with MKVToolnix, MP4Box etc. (total zip-file is now 78.7 MB)
Changelog:
0.5
- Stop script if bigger than 720p (until 1080p is possible)
- Automatic removal of smaller files than 100MB
- Show how much time the script needed to finish
- Stripping certain words out of filename
- Enhanced audio picker (preferring English)
0.4
- Original release
Install:
Step 1.
To use the script just download the file and extract it.
Put the contents of "Sabscripts" into the folder where your SABnzbd+ scripts are, if your not sure go to "Config" in SABnzbd+ and open "Folders".
Here you can see of fill in the "Post-Processing Scripts Folder".
Step 2.
I'm not quite sure about licensing so I'm not providing the needed Nero AAC Encoder/Decoder.
Download Nero AAC Encoder right here http://www.nero.com/eng/downloads-nerod ... -codec.php and place the contents into the "EAC3TO" folder.
This step is due to licensing issues, don't worry it's free.
Step3.
Open the Config.ini and change the values to your needs.
You probably want the destination directory to be the auto import directory of iTunes
so the downloads will pop right into iTunes after conversion.
Step4.
To actually use the script you need to select or through a category within "Config".
If you open the dropdown box of a category (like default) you should be able to see iMP4.bat, click on it and choose "save".
That's it, go ahead and give it a spin!
Download iMP4 0.5 right here!
[Windows] iMP4 0.5 - MKV to M4V with subtitles for Apple TV
[Windows] iMP4 0.5 - MKV to M4V with subtitles for Apple TV
Last edited by eXisTa on December 8th, 2012, 9:39 am, edited 1 time in total.
Re: [Windows] iMP4 0.5 - MKV to M4V with subtitles for Apple
Ok I seem to be a massive noob here.
I've added the iMP4 contents to my script folder and assigned the iMP4.cmd to the categories for TV and Movies.
I don't have any folder called 'Sabscripts' included in the download and mentioned in step 1, once I googled it I found a bunch of scripts but I don't know what I mean to be doing with them.
Basically the script executes but nothing happens, here's some of the log which I believe is relevant. I've been using Sickbeard and Sab for ages but I only recently got an ATV2 so I've been looking into the scripting to make it easier.
I did change a bit of code to convert 1080p files too but the file in the log is 720p anyway. As a suggestion ATV2 can easily play 1080p files just not output in that resolution. Might be worth having it convert them anyway to futureproof it.
I've added the iMP4 contents to my script folder and assigned the iMP4.cmd to the categories for TV and Movies.
I don't have any folder called 'Sabscripts' included in the download and mentioned in step 1, once I googled it I found a bunch of scripts but I don't know what I mean to be doing with them.
Basically the script executes but nothing happens, here's some of the log which I believe is relevant. I've been using Sickbeard and Sab for ages but I only recently got an ATV2 so I've been looking into the scripting to make it easier.
I did change a bit of code to convert 1080p files too but the file in the log is 720p anyway. As a suggestion ATV2 can easily play 1080p files just not output in that resolution. Might be worth having it convert them anyway to futureproof it.
Code: Select all
2011-10-17 21:04:57,948::INFO::[postproc:316] unpack_magic finished on Parks and Recreation - 4x01 - I'm Leslie Knope
2011-10-17 21:04:57,950::INFO::[postproc:627] Removing unwanted file E:\Usenet Downloads\TV\TV\_UNPACK_Parks and Recreation - 4x01 - I'm Leslie Knope\Parks.and.Recreation.S04E01.720p.WEB-DL.DD5.1.H.264.nzb
2011-10-17 21:04:57,956::INFO::[newsunpack:132] Running external script C:\Scripts\iMP4.cmd(E:\Usenet Downloads\TV\TV, Parks and Recreation - 4x01 - I'm Leslie Knope.nzb, Parks and Recreation - 4x01 - I'm Leslie Knope, , tv, alt.binaries.tv, 0)
2011-10-17 21:04:58,130::INFO::[postproc:472] Cleaning up Parks and Recreation - 4x01 - I'm Leslie Knope (keep_basic=False)
2011-10-17 21:04:58,131::INFO::[__init__:827] E:\Files\Temp\Parks and Recreation - 4x01 - I'm Leslie Knope\__ADMIN__\SABnzbd_nzf_asqzgi removed
2011-10-17 21:04:58,131::INFO::[__init__:827] E:\Files\Temp\Parks and Recreation - 4x01 - I'm Leslie Knope\__ADMIN__\SABnzbd_nzf_rsgy0h removed
2011-10-17 21:04:58,131::INFO::[__init__:827] E:\Files\Temp\Parks and Recreation - 4x01 - I'm Leslie Knope\__ADMIN__\SABnzbd_nzf_puardm removed
2011-10-17 21:04:58,131::INFO::[__init__:827] E:\Files\Temp\Parks and Recreation - 4x01 - I'm Leslie Knope\__ADMIN__\SABnzbd_nzf_nkrh1t removed
2011-10-17 21:04:58,131::INFO::[__init__:827] E:\Files\Temp\Parks and Recreation - 4x01 - I'm Leslie Knope\__ADMIN__\SABnzbd_nzf_6isxzy removed
2011-10-17 21:04:58,265::INFO::[postproc:83] Saving postproc queue
Re: [Windows] iMP4 0.5 - MKV to M4V with subtitles for Apple
Allright, what does Sab say when it finished? Can you share the settings in the ini file, I'll try to reproduce it.
Re: [Windows] iMP4 0.5 - MKV to M4V with subtitles for Apple
My config.ini is pretty simple
destinationdir=E:\Usenet Downloads\TV
prefsublang=en
deloriginal=no
I'm not sure where you want me to look in Sab. The job reports as finished and the mkv just sits where it's supposed to. Is there another log entry I can give?
destinationdir=E:\Usenet Downloads\TV
prefsublang=en
deloriginal=no
I'm not sure where you want me to look in Sab. The job reports as finished and the mkv just sits where it's supposed to. Is there another log entry I can give?
Re: [Windows] iMP4 0.5 - MKV to M4V with subtitles for Apple
You could edit the cmd file and change line one from:
@echo off
to:
@echo on
Then download a file and let the script do it's thing, when it's finished you can click on "more" at the finished jobs.
@echo off
to:
@echo on
Then download a file and let the script do it's thing, when it's finished you can click on "more" at the finished jobs.
Re: [Windows] iMP4 0.5 - MKV to M4V with subtitles for Apple
OK this is what I got on a recent download.
Downloads\TV\Parks was unexpected at this time.
C:\SABnzbd>FOR /R ""D:\Usenet Downloads\TV\Parks and Recreation - 4x01 - I'm Leslie Knope"" %F IN (*.mkv) DO (
I know it's changed from E to D but I've recently reformatted and am now using a D drive so I changed the config to match.
Downloads\TV\Parks was unexpected at this time.
C:\SABnzbd>FOR /R ""D:\Usenet Downloads\TV\Parks and Recreation - 4x01 - I'm Leslie Knope"" %F IN (*.mkv) DO (
I know it's changed from E to D but I've recently reformatted and am now using a D drive so I changed the config to match.
Re: [Windows] iMP4 0.5 - MKV to M4V with subtitles for Apple
Any update on what might be going wrong?
Re: [Windows] iMP4 0.5 - MKV to M4V with subtitles for Apple
Nice script that I'm working on modifying heavily to suit my needs. I may share in the future. No need for eac3to in mine because I'm converting the audio with ffmpeg to waveform and then taking the wav to aac with qaac. eac3to is nice, but my understanding is that the Nero aac encoder introduces some delay (100ms) which might cause some audio sync issues (not verified). I'm not crazy about the final file showing as a total bitrate of "0" in iTunes (get info). However, they don't show that in any other application, and stream perfectly to Apple TV 2 which suites my purposes.
There are a couple of kinks that need to be worked out, I think you ran into one iveoles. The following code is at the beginning of the cmd file:
Need to remove the quotes from "%1" in order for it to work because SABnzbd already includes quotes in the %1 parameter. The result is double quoting which is causing a problem with spaces in your folder name. Alternatively (and must have been the case for the writer), you could choose one of the options in switches to replace folder name spaces with underscores or periods. Make sure to restart SABnzbd. As far as the rest of the script goes, not sure if there are any other anomalies because like I said I have heavily simplified it and changed some of the software used for my implementation.
For my version I would love to adjust the level of h264 video so I'm trying to find a decent cmd line utility for that. There seems to be a hacked version of ffmpeg floating around that will edit the bitstream and modify it.
The next step that I'm dying to sort out is to automatically tag using Apple's data and artwork (not TagChimp).
There are a couple of kinks that need to be worked out, I think you ran into one iveoles. The following code is at the beginning of the cmd file:
Code: Select all
FOR /R "%1" %%F IN (*.mkv) DO (
IF %%~ZF LSS 102400000 (DEL "%%F"))
For my version I would love to adjust the level of h264 video so I'm trying to find a decent cmd line utility for that. There seems to be a hacked version of ffmpeg floating around that will edit the bitstream and modify it.
The next step that I'm dying to sort out is to automatically tag using Apple's data and artwork (not TagChimp).
Last edited by ddantzler on January 6th, 2012, 4:24 pm, edited 1 time in total.
Re: [Windows] iMP4 0.5 - MKV to M4V with subtitles for Apple
I thought I'd also point out that you can simply run the cmd at the command line and pass the path to an MKV enclosed in quotes in order to launch the script if you don't want to kill your bandwidth while you're trying to work out the kinks.
Re: [Windows] iMP4 0.5 - MKV to M4V with subtitles for Apple
Since I obtained an Apple TV 3 I will try and update the script for 1080p movies.
-
- Newbie
- Posts: 1
- Joined: December 3rd, 2012, 1:16 am
Re: [Windows] iMP4 0.5 - MKV to M4V with subtitles for Apple
Has there been any progress made on this script? Also I can't seem to find the actual download link from that website. Any help?
Re: [Windows] iMP4 0.5 - MKV to M4V with subtitles for Apple
Due to time shortage I have not yet continued the progress on the script.
I fixed the broken download link though.
I fixed the broken download link though.