[bash] autsmuxer - mkv2vob for *nix.

Come up with a useful post-processing script? Share it here!
scjgreen
Newbie
Newbie
Posts: 7
Joined: February 5th, 2012, 5:06 am

Re: [LiNUX/OSX/BSD - bash] autsmuxer [v4 - MKV2VOB for *NiX]

Post by scjgreen »

sweetie wrote:protocall: Unfortunately I'm rather strapped for time recently; you're very welcome to fork the code though and experiment.

scjgreen: https://forums.sabnzbd.org/viewtopic.ph ... 500#p32642

Thanks thats working now.

Ive just set up Sickbeard however and it somehow seems to be interfering with SAB and I'm getting a message along the lines of

Exit(1) Progress: 0% Progress: 0% Progress: 0% Progress: 0% Progress: 0% Progress: 0% Progress: 1% Progress: 1% Progress: 1% Progress: 1% Progress

Any ideas?
scjgreen
Newbie
Newbie
Posts: 7
Joined: February 5th, 2012, 5:06 am

Re: [LiNUX/OSX/BSD - bash] autsmuxer [v4 - MKV2VOB for *NiX]

Post by scjgreen »

Right i have now figured out my issues are nothing to do with SickBeard.

When i run autsmuxer in Terminal on certain MKV files this happens.

Code: Select all

Zeus:~ stevengreen$ bash "/Users/stevengreen/Library/Application Support/SABnzbd/scripts/mediamux.sh" -m /Users/stevengreen/Downloads/file1/file1.mkv 
 Processing: /Users/stevengreen/Downloads/file1/file1.mkv..

Extracting track 1 with the CodecID 'V_MPEG4/ISO/AVC' to the file '/Users/stevengreen/autsmuxer-tmp-7266/7266.264'. Container format: AVC/h.264 elementary stream
Progress: 100%
Extracting track 2 with the CodecID 'A_AC3' to the file '/Users/stevengreen/autsmuxer-tmp-7266/7266.ac3'. Container format: Dolby Digital (AC3)
Progress: 100%
When i tried it with a different file it worked as it should

Code: Select all

Zeus:~ stevengreen$ bash "/Users/stevengreen/Library/Application Support/SABnzbd/scripts/mediamux.sh" -m /Users/stevengreen/Downloads/file2/file2.mkv 
 Processing: /Users/stevengreen/Downloads/file2/file2.mkv..

SmartLabs tsMuxeR.  Version 1.10.6  http://www.smlabs.net
Decoding H264 stream (track 1): Profile: [email protected]  Resolution: 1280:720p  Frame rate: 23.976
Change H264 level from 4.1 to 4.1
H.264 stream does not contain fps field. Muxing fps=23.976
0.3% complete
H264 bitstream changed: insert nal unit delimiters
H264 bitstream changed: insert pict timing and buffering period SEI units
Decoding AC3 stream (track 2): Bitrate: 448Kbps Sample Rate: 48KHz Channels: 6
B-pyramid level 1 detected. Shift DTS to 2 frames
H264 bitstream changed: insert SPS/PPS units
91.8% complete
Processed 30875 video frames
100.0% complete
Mux successful complete.
Muxing time: 4 sec

 file2.mkv successfully remuxed to: /Users/stevengreen/Downloads/file2/file2.m2ts!
Do you know why this is happening?

Thanks in advance.
sweetie
Full Member
Full Member
Posts: 117
Joined: May 10th, 2009, 10:47 am

Re: [LiNUX/OSX/BSD - bash] autsmuxer [v4 - MKV2VOB for *NiX]

Post by sweetie »

scjgreen wrote:Right i have now figured out my issues are nothing to do with SickBeard.

When i run autsmuxer in Terminal on certain MKV files this happens.

Code: Select all

Zeus:~ stevengreen$ bash "/Users/stevengreen/Library/Application Support/SABnzbd/scripts/mediamux.sh" -m /Users/stevengreen/Downloads/file1/file1.mkv 
 Processing: /Users/stevengreen/Downloads/file1/file1.mkv..

Extracting track 1 with the CodecID 'V_MPEG4/ISO/AVC' to the file '/Users/stevengreen/autsmuxer-tmp-7266/7266.264'. Container format: AVC/h.264 elementary stream
Progress: 100%
Extracting track 2 with the CodecID 'A_AC3' to the file '/Users/stevengreen/autsmuxer-tmp-7266/7266.ac3'. Container format: Dolby Digital (AC3)
Progress: 100%
When i tried it with a different file it worked as it should

Code: Select all

Zeus:~ stevengreen$ bash "/Users/stevengreen/Library/Application Support/SABnzbd/scripts/mediamux.sh" -m /Users/stevengreen/Downloads/file2/file2.mkv 
 Processing: /Users/stevengreen/Downloads/file2/file2.mkv..

SmartLabs tsMuxeR.  Version 1.10.6  http://www.smlabs.net
Decoding H264 stream (track 1): Profile: [email protected]  Resolution: 1280:720p  Frame rate: 23.976
Change H264 level from 4.1 to 4.1
H.264 stream does not contain fps field. Muxing fps=23.976
0.3% complete
H264 bitstream changed: insert nal unit delimiters
H264 bitstream changed: insert pict timing and buffering period SEI units
Decoding AC3 stream (track 2): Bitrate: 448Kbps Sample Rate: 48KHz Channels: 6
B-pyramid level 1 detected. Shift DTS to 2 frames
H264 bitstream changed: insert SPS/PPS units
91.8% complete
Processed 30875 video frames
100.0% complete
Mux successful complete.
Muxing time: 4 sec

 file2.mkv successfully remuxed to: /Users/stevengreen/Downloads/file2/file2.m2ts!
Do you know why this is happening?

Thanks in advance.

Assuming it's muxing after extracting those tracks, then that is expected behaviour. TsMuxeR doesn't support compressed headers among other things.
sweetie
Full Member
Full Member
Posts: 117
Joined: May 10th, 2009, 10:47 am

Re: [LiNUX/OSX/BSD - bash] autsmuxer [v4 - MKV2VOB for *NiX]

Post by sweetie »

Just fixed a major issue with the new or recent mkvextract build. Please update to latest of both mkvtoolnix and autsmuxer if you encounter any problems (you will).
scjgreen
Newbie
Newbie
Posts: 7
Joined: February 5th, 2012, 5:06 am

Re: [LiNUX/OSX/BSD - bash] autsmuxer [v4 - MKV2VOB for *NiX]

Post by scjgreen »

Hi

Have been using your script successfully in conduction with Sickbeard for a while now but I'm having some issues with certain files.

xxxxxxxx.xxxxxxxx.720p.WEB.DL.DD5.1.H.264-CtrlHD

Error: No track with the ID 0 was found in the source file.

Any ideas?

Thanks in advance
Steve
sweetie
Full Member
Full Member
Posts: 117
Joined: May 10th, 2009, 10:47 am

Re: [LiNUX/OSX/BSD - bash] autsmuxer [v4 - MKV2VOB for *NiX]

Post by sweetie »

scjgreen: Are you running the latest mkvtoolnix (5.5.0)? The behaviour you're describing is caused by an outdated build.

If so, I'll take a look over the weekend.
scjgreen
Newbie
Newbie
Posts: 7
Joined: February 5th, 2012, 5:06 am

Re: [LiNUX/OSX/BSD - bash] autsmuxer [v4 - MKV2VOB for *NiX]

Post by scjgreen »

I guess its outdated as MacPorts only has 5.0.1

Does anyone know where i can get the updated version
sweetie
Full Member
Full Member
Posts: 117
Joined: May 10th, 2009, 10:47 am

Re: [LiNUX/OSX/BSD - bash] autsmuxer [v4 - MKV2VOB for *NiX]

Post by sweetie »

scjgreen wrote:I guess its outdated as MacPorts only has 5.0.1

Does anyone know where i can get the updated version
https://www.bunkus.org/videotools/mkvtoolnix/macos/ should do the trick.
scjgreen
Newbie
Newbie
Posts: 7
Joined: February 5th, 2012, 5:06 am

Re: [LiNUX/OSX/BSD - bash] autsmuxer [v4 - MKV2VOB for *NiX]

Post by scjgreen »

I downloaded it from there but it's the GUI app rather than the Binaries that I originally installed via MacPorts.

I copied the updated Binaries from the app but that makes the script give lots of errors related to dylib
scjgreen
Newbie
Newbie
Posts: 7
Joined: February 5th, 2012, 5:06 am

Re: [LiNUX/OSX/BSD - bash] autsmuxer [v4 - MKV2VOB for *NiX]

Post by scjgreen »

Just to let you know i've managed to update MKVToolnix and the script now works perfectly for TV episodes.

Now all i need to do is tweak my setup to get it to work with Movies.

Does the script have options for making it select English Track and DTS to AC3?
sweetie
Full Member
Full Member
Posts: 117
Joined: May 10th, 2009, 10:47 am

Re: [LiNUX/OSX/BSD - bash] autsmuxer [v4 - MKV2VOB for *NiX]

Post by sweetie »

scjgreen wrote:Just to let you know i've managed to update MKVToolnix and the script now works perfectly for TV episodes.

Now all i need to do is tweak my setup to get it to work with Movies.

Does the script have options for making it select English Track and DTS to AC3?

By default it selects the first audio track; you can switch with '--atrack n' - use mkvinfo to list tracks. 99% of the time this'll be English, but with MULTi releases, you may have to manually check.

And yes, to retain DTS pass '--dts 1', there's also support for spdif (receiver required, but can bypass DRM).
garbanzo
Newbie
Newbie
Posts: 1
Joined: October 15th, 2012, 7:58 pm

Re: [bash] autsmuxer - mkv2vob for *nix.

Post by garbanzo »

I was wondering if someone help me figure out the correct settings for what I am trying to do.

I want to remux all downloaded MKV files and just remove any audio or subtitles that aren't english. I don't want to alter the video and I want to keep DTS when it is present.
sweetie
Full Member
Full Member
Posts: 117
Joined: May 10th, 2009, 10:47 am

Re: [bash] autsmuxer - mkv2vob for *nix.

Post by sweetie »

garbanzo wrote:I was wondering if someone help me figure out the correct settings for what I am trying to do.

I want to remux all downloaded MKV files and just remove any audio or subtitles that aren't english. I don't want to alter the video and I want to keep DTS when it is present.
Unfortunately there's no reliable way to automatically detect language of tracks (some files have labelled tracks, but not all). As for your requirements though, you can determine tracks manually either with:

Code: Select all

mkvinfo file.mkv
and note English tracks; or simply play the file in your player of choice and do the same.

Then:

Code: Select all

bash autsmuxer.sh file.mkv --atrack n1 --strack n2 --dts 1
Jeegan
Newbie
Newbie
Posts: 11
Joined: November 28th, 2010, 9:13 pm

Re: [bash] autsmuxer - mkv2vob for *nix.

Post by Jeegan »

So I have been using the old mediamux for some time now without issue. But I decided to try and upgrade everything to use the new autsmuxer script. But I seem to be having some trouble. Occasionally it will work. But most of the time I get this error "Error: No track with the ID 0 was found in the source file." Any ideas?
sweetie
Full Member
Full Member
Posts: 117
Joined: May 10th, 2009, 10:47 am

Re: [bash] autsmuxer - mkv2vob for *nix.

Post by sweetie »

Jeegan wrote:So I have been using the old mediamux for some time now without issue. But I decided to try and upgrade everything to use the new autsmuxer script. But I seem to be having some trouble. Occasionally it will work. But most of the time I get this error "Error: No track with the ID 0 was found in the source file." Any ideas?
autsmuxer requires mkvtoolnix >5.4.0 (https://github.com/dryes/autsmuxer/issues/3) - updating should sort your problems.
Post Reply