[bash] autsmuxer - mkv2vob for *nix.

Come up with a useful post-processing script? Share it here!
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 »

SDplinker: It's most definitely bad permissions/missing dependencies then, should be all systems go once that's sorted.

dashy: It just occured to me that aften is used to repair damaged AC3 files as well (damaged as far as tsMuxeR is concerned), these account for probably <5% of what you'll download - but you will encounter one eventually. May be best to look around for an mp4box script that is able to determine correct FPS.
SDplinker
Newbie
Newbie
Posts: 4
Joined: August 19th, 2011, 12:26 am

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

Post by SDplinker »

I'm striking out. Ran the commands to pull down tsMuxeR again just in case there was a bad dropbox file. Re-did the chmod. Still getting the same error. Since I'm not real Unix savvy I'll have to go back to the drawing board. Thanks for the input though!
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 »

SDplinker: It may be worth your time looking into Arch Linux. It's far more minimal and infintiely better suited as an HTPC OS than any Debian based distro. This script, all dependencies and anything else you could think of are available in the repos. Saves you hours of manually compiling with the 'non-free' codec nonsense.

https://www.archlinux.org/
dashy
Newbie
Newbie
Posts: 13
Joined: August 16th, 2011, 10:46 am

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

Post by dashy »

Just wanted to say thanks, sweetie, for the help. Unfortunately despite several emails to the tsMuxeR developer I was unable to obtain either a binary or source code, and so this script will definitely not work. I was able to figure out a way to stream directly from my NAS to Showtime, so no need to remux on the fly or at all.
geggog
Newbie
Newbie
Posts: 4
Joined: September 4th, 2011, 3:49 am

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

Post by geggog »

I registered solely to express my thanks to Sweetie for whipping up this gem of a script. My downloads are now fixed, unpacked, converted, and moved to my NAS ready to be played without a single mouse click or manual interaction whatsoever.

You my friend, are a superstar!

O0
protocall
Newbie
Newbie
Posts: 5
Joined: January 5th, 2012, 11:36 pm

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

Post by protocall »

Sweetie - thank you for making life a little easier.

Wondering if there is any way to add the mkv2vob dts trick - the author added an option to retain dts playback by marking the audio track as LSPCM, iirc. The PS3 will then skip audio decoding altogether and pass the stream to the audio receiver. Users must have an HDMI audio connection as optical is insufficient bitrate, but most HDMI receivers will see the stream as dts. This was quite a milestone. It last worked in mkv2vob 2.4.6 (broke in latest). Quite useful for us audiophiles, not to mention it defeats cinavia protection since the PS3 isn't decoding the track.

I've tried my hand with ffmpeg to recreate this for a while, unsuccessfully. Any ideas how this might be possible with your process?
geggog
Newbie
Newbie
Posts: 4
Joined: September 4th, 2011, 3:49 am

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

Post by geggog »

protocall wrote:Sweetie - thank you for making life a little easier.

Wondering if there is any way to add the mkv2vob dts trick - the author added an option to retain dts playback by marking the audio track as LSPCM, iirc. The PS3 will then skip audio decoding altogether and pass the stream to the audio receiver. Users must have an HDMI audio connection as optical is insufficient bitrate, but most HDMI receivers will see the stream as dts. This was quite a milestone. It last worked in mkv2vob 2.4.6 (broke in latest). Quite useful for us audiophiles, not to mention it defeats cinavia protection since the PS3 isn't decoding the track.

I've tried my hand with ffmpeg to recreate this for a while, unsuccessfully. Any ideas how this might be possible with your process?
You'll find this trick is in fact the SPDIF support within autsmuxer. I have this working flawlessly through my PS3 and DTS amp!

G
protocall
Newbie
Newbie
Posts: 5
Joined: January 5th, 2012, 11:36 pm

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

Post by protocall »

geggog wrote: You'll find this trick is in fact the SPDIF support within autsmuxer. I have this working flawlessly through my PS3 and DTS amp!

G
Awesome. Missed that one. Incidentally, how does the option affect output between spdif option 0/1/2?

Thanks!
geggog
Newbie
Newbie
Posts: 4
Joined: September 4th, 2011, 3:49 am

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

Post by geggog »

Off the top of my head, I couldn't tell you. I do remember however that it didn't take long to get it up and running. By the way, you'll new python up and running for it to work, and you'll likely have to edit the SPDIF python script to point to your python executable.

Enjoy!

G
protocall
Newbie
Newbie
Posts: 5
Joined: January 5th, 2012, 11:36 pm

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

Post by protocall »

geggog wrote:Off the top of my head, I couldn't tell you. I do remember however that it didn't take long to get it up and running. By the way, you'll new python up and running for it to work, and you'll likely have to edit the SPDIF python script to point to your python executable.
Ah, I should have just opened the autsmuxer script and read the detailed comments in the first place!

Thanks for the tip, LPCM trick worked great for me!

Major kudos to sweetie. This is super pro.
protocall
Newbie
Newbie
Posts: 5
Joined: January 5th, 2012, 11:36 pm

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

Post by protocall »

Alright, one final question. The way spdifconvert is encapsulating dts in LPCM must differ a bit from mkv2vob 2.4.6. With mkv2vob, the resulting dts/LPCM file is still playable in VLC with audio. Media information in VLC sees the stream as "bpcm" with "3F2R/LFE". When the same file is converted with this script using --spdif 1, the resulting file plays great on the PS3 but audio is just static when playing thru VLC. Media information shows bpcm but "stereo" instead. This behavior is actually consistent with mkv2vob 2.4.4. Dts over LPCM plays fine on the Ps3 but VLC plays static.

Minor issue - ac3 is fine in most cases. I realize sweetie did not write spdifconvert, but the person who wrote it also did not make it specifically for the Ps3 crowd and may not be familiar with this. Anyone have any ideas on what might be different here?
geggog
Newbie
Newbie
Posts: 4
Joined: September 4th, 2011, 3:49 am

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

Post by geggog »

Essentially all SPDIF and MKV2VOB do here is put a false header on the audio stream to claim its something that it isn't. The PS3 won't forward a DTS stream through its HDMI out port unless it's sourced from a bluray disk in the drive (think of this as a cheap copy protection mechanism). So, all SPDIF/MKV2VOB do is label the audio stream as PCM stereo or some such, which the PS3 will forward through. Of course, once the audio stream hits your amp it's recognised as DTS and played appropriately.

It'd appear in some circumstances that VLC is taking the audio header as gospel and trying to play it as PCM stereo, which of course results in static because in reality it's a completely different format altogether.
protocall
Newbie
Newbie
Posts: 5
Joined: January 5th, 2012, 11:36 pm

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

Post by protocall »

Aye, I'm painfully aware of the ps3 dts limitation, and how the LPCM trick bypasses the device. I guess the question is differences between the header applied by spdifconvert versus mkv2vob 2.6.6 which might be to blame for VLC's failure on files from only the former and not the latter.

Happy to help, debug, testing, whatever anyone can come up with. Got both programs on several different platforms anyway, why not. I can reproduce both scenarios consistently.
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

I have managed to get the script to run from within terminal and it successfully converts MKV to M2TS.

When however i download an MKV in Sabnzbd and the script runs at the end i get the message "Exit(1) Input file: 0 not found."

Any idea whats wrong?

Im running SABnzbd 0.6.15 under Mac OSX 10.7.3

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 »

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
Post Reply