[bash] autsmuxer - mkv2vob for *nix.
[bash] autsmuxer - mkv2vob for *nix.
Hi,
autsmuxer is a mkv2vob CLI clone for *nix.
https://github.com/dryes/autsmuxer
## dependencies:
* libdca - http://www.videolan.org/developers/libdca.html
* mkvtoolnix - http://www.bunkus.org/videotools/mkvtoolnix/index.html
* mencoder - http://www.mplayerhq.hu/
* aften - http://aften.sourceforge.net/
* tsMuxeR - http://www.smlabs.net/tsmuxer_en.html
* spdifconvert - http://forums.slimdevices.com/showthread.php?t=19260
## usage:
* Install all dependencies, ensuring they are in $PATH.
* bash autsmuxer.sh [-options] inputfile/dir.
## notes:
* mkvtoolnix must be >5.4.0.
* DTS audio is converted to AC3 unless '--dts 1' is passed.
autsmuxer is a mkv2vob CLI clone for *nix.
https://github.com/dryes/autsmuxer
## dependencies:
* libdca - http://www.videolan.org/developers/libdca.html
* mkvtoolnix - http://www.bunkus.org/videotools/mkvtoolnix/index.html
* mencoder - http://www.mplayerhq.hu/
* aften - http://aften.sourceforge.net/
* tsMuxeR - http://www.smlabs.net/tsmuxer_en.html
* spdifconvert - http://forums.slimdevices.com/showthread.php?t=19260
## usage:
* Install all dependencies, ensuring they are in $PATH.
* bash autsmuxer.sh [-options] inputfile/dir.
## notes:
* mkvtoolnix must be >5.4.0.
* DTS audio is converted to AC3 unless '--dts 1' is passed.
Last edited by sweetie on June 6th, 2012, 2:40 pm, edited 3 times in total.
Re: [LiNUX/OSX - bash] MediaMux [v4 - Join multi-part AVI + Remux MKV to M2TS.]
And could you please give step by step instructions for us stupid people.(please) Also can this be used to make .mp4 instead of m2ts
Re: [LiNUX/OSX/BSD - bash] autsmuxer [v4 - MKV2VOB for *NiX]
Once you've followed instructions in original post under HOWTO* (substituting /path/to with your actual path) you could:
(* and tested with: autsmuxer /empty/directory - will inform you of any packages required.)
If calling as a post-processor in SAB:
1) Create blank text file.
2) Paste in:
3) Save text file as: pp_autsmuxer.sh
4) In terminal: chmod +x pp_autsmuxer.sh
5) Move script to SABnzbd script dir.
6) In SAB: Categories >> tv-x264 >> script: pp_autsmuxer.sh
Regarding MP4, see: mkv2mp4
autsmuxer script is designed with PS3 in mind, which supports multi-channel AC3 and DTS.
mkv2mp4 script transcodes and downmixes audio to AAC stereo - for Xbox360.
Any more queries, feel free to ask.
(* and tested with: autsmuxer /empty/directory - will inform you of any packages required.)
If calling as a post-processor in SAB:
1) Create blank text file.
2) Paste in:
Code: Select all
#!/bin/bash
## $1 is download directory.
cd "$1"
## $5 is category. x264 TV category is named 'tv-x264'
if [ "$5" = "tv-x264" ]; then
## Change /path/to/autsmuxer.sh to correspond with your own path.
bash /path/to/autsmuxer.sh -d "$1"
## -d switch will remove input files.
## -R switch will search subdirs for MKVs.
fi
## Repeat for other categories.
4) In terminal: chmod +x pp_autsmuxer.sh
5) Move script to SABnzbd script dir.
6) In SAB: Categories >> tv-x264 >> script: pp_autsmuxer.sh
Regarding MP4, see: mkv2mp4
autsmuxer script is designed with PS3 in mind, which supports multi-channel AC3 and DTS.
mkv2mp4 script transcodes and downmixes audio to AAC stereo - for Xbox360.
Any more queries, feel free to ask.
Last edited by sweetie on February 14th, 2011, 11:28 am, edited 1 time in total.
Re: [LiNUX/OSX/BSD - bash] MediaMux [v4 - Join multi-part AVI + Remux MKV to M2TS.]
hi sweetie ,
getting an incompatable audio codec error again ! ac_3 6 channel
getting an incompatable audio codec error again ! ac_3 6 channel
Re: [LiNUX/OSX/BSD - bash] MediaMux [v4 - Join multi-part AVI + Remux MKV to M2TS.]
This looks like a great script.
I'm unfamiliar with scripting for SAB, so a bit more detail on customizing the script would be appreciated otherwise I may never get this to work.
I'm unfamiliar with scripting for SAB, so a bit more detail on customizing the script would be appreciated otherwise I may never get this to work.
Re: [LiNUX/OSX/BSD - bash] MediaMux [v4 - Join multi-part AVI + Remux MKV to M2TS.]
I am running OS X, and I've noticed issues when there are spaces in the path to the MKVs. Not sure how easy of a fix this is, but it would be a greatly appreciated one.
Re: [LiNUX/OSX/BSD - bash] MediaMux [v4 - Join multi-part AVI + Remux MKV to M2TS.]
It could be possible that the spaces are what was causing gazzzmoly issues. (I've noticed in logs that they're preceded by a backslash (escape key.).)
I'm not overly familiar with OSX, and haven't my laptop to hand so can't test under Linux, but you could try for calling:
-Where $1 is input dir. if not calling from a SAB processor script.
(Can try with both double and a single backslash after the '-d'.
Also, can try with and without " around the $(*).)
I'm not overly familiar with OSX, and haven't my laptop to hand so can't test under Linux, but you could try for calling:
Code: Select all
bash "/path/to/script.sh" -m "$(echo $1 | tr -d '\\')"
(Can try with both double and a single backslash after the '-d'.
Also, can try with and without " around the $(*).)
Last edited by sweetie on June 29th, 2010, 10:09 am, edited 1 time in total.
Re: [LiNUX/OSX/BSD - bash] MediaMux [v4 - Join multi-part AVI + Remux MKV to M2TS.]
Swish:~ owine$ bash Useful\ Stuff/mediamux.sh -m $(echo /Users/owine/Downloads/USENET/Movies/Avatar (2009)/ | tr -d '\\')
-bash: command substitution: line 1: syntax error near unexpected token `('
-bash: command substitution: line 1: `echo /Users/owine/Downloads/USENET/Movies/Avatar (2009)/ | tr -d '\\''
@@ No input directory specified.
-bash: command substitution: line 1: syntax error near unexpected token `('
-bash: command substitution: line 1: `echo /Users/owine/Downloads/USENET/Movies/Avatar (2009)/ | tr -d '\\''
@@ No input directory specified.
Re: [LiNUX/OSX/BSD - bash] MediaMux [v4 - Join multi-part AVI + Remux MKV to M2TS.]
Oh, of course. Backslashes won't be there when typed.
Not to sound patronising, but tried paths (without echo | tr) inside quotes?
That's all I can think of just now.
If you pop on SABnzbd IRC we can try sort it there.
Not to sound patronising, but tried paths (without echo | tr) inside quotes?
That's all I can think of just now.
If you pop on SABnzbd IRC we can try sort it there.
Re: [LiNUX/OSX/BSD - bash] MediaMux [v4 - MKV to TS/M2TS/BluRay/AVCHD/Demux + AVI..]
Has anyone had any luck setting this script up to run in SABNZB? I created the pp_mediamux.sh script and set it up to run in SABNZB but it just says it cannot run the script. Any ideas? TIA.
Oh yeah, I am running OSX 10.6.
Oh yeah, I am running OSX 10.6.
Last edited by Jeegan on November 28th, 2010, 9:58 pm, edited 1 time in total.
Re: [LiNUX/OSX/BSD - bash] MediaMux [v4 - MKV to TS/M2TS/BluRay/AVCHD/Demux + AVI..]
Jeegan: did you set the path in pp_mediamux.sh in double quotes? e.g. "/home/jeegan/sh scripts/mediamux.sh"
Also be sure to set execute bit for both scripts:
- Script definitely does run under OSX btw. Just not particularly user friendly.
Let me know how it goes.
Also be sure to set execute bit for both scripts:
chmod +x script_filename.sh
- Script definitely does run under OSX btw. Just not particularly user friendly.
Let me know how it goes.
Last edited by sweetie on November 29th, 2010, 6:20 am, edited 1 time in total.
Re: [LiNUX/OSX/BSD - bash] MediaMux [v4 - MKV to TS/M2TS/BluRay/AVCHD/Demux + AVI..]
Sweetie,
I did all of that. I just seem to get an error from SABNZB saying it can't run the script. Any other ideas of that might cause that? Could this be the issue that owine was having, that it spaces in the directory name are causing a problem?
I did all of that. I just seem to get an error from SABNZB saying it can't run the script. Any other ideas of that might cause that? Could this be the issue that owine was having, that it spaces in the directory name are causing a problem?
Re: [LiNUX/OSX/BSD - bash] MediaMux [v4 - MKV to TS/M2TS/BluRay/AVCHD/Demux + AVI..]
I'm not sure. If memory serves, owine was able to run the script eventually, though can't recall the steps taken to fix.
For now, all I can suggest is trying to process manually, by:
Can rule out issues with the script that way.
For now, all I can suggest is trying to process manually, by:
bash "/path/to/mediamux.sh" -m "/folder/with/MKV/inside"
Can rule out issues with the script that way.
Re: [LiNUX/OSX/BSD - bash] MediaMux [v4 - MKV to TS/M2TS/BluRay/AVCHD/Demux + AVI..]
Right, when I run the mediamux.sh script manually, it works perfect. I would just like to have SABNZB run it for me. But yeah, the script works great when I run it. Thank you for your help though.
Re: [LiNUX/OSX/BSD - bash] MediaMux [v4 - MKV to TS/M2TS/BluRay/AVCHD/Demux + AVI..]
Ok, figured out why SABNZB couldn't run the script. I didn't create it correctly. Fixed that, but I have a question about mediamux.sh in general. It seems like when I have .mkv files with multiple audio streams, I can't seem to choose anything except for the default track 2. When I try to specify with --m-atrack 3, I get incompatible audio codec found. This seems to be the case with any .mkv that has multiple tracks. Is it just me not knowing what I am doing? Also, is there a way to get the script to delete the old .mkv file after conversion? Sorry for all of the newb questions. Thank you for your help.