[bash] autsmuxer - mkv2vob for *nix.

Come up with a useful post-processing script? Share it here!
Jeegan
Newbie
Newbie
Posts: 11
Joined: November 28th, 2010, 9:13 pm

Re: [LiNUX/OSX/BSD - bash] MediaMux [v4 - MKV to TS/M2TS/BluRay/AVCHD/Demux + AVI..]

Post by Jeegan »

Sorry for the continual posting. But now I get this error when I SABNZB runs the pp_mediamux.sh script:


>> Processing: Show 720p HDTV x264~

@@ mencoder is required.

@@ Error while processing.

Any ideas? TIA.
sweetie
Full Member
Full Member
Posts: 117
Joined: May 10th, 2009, 10:47 am

Re: [LiNUX/OSX/BSD - bash] MediaMux [v4 - MKV to TS/M2TS/BluRay/AVCHD/Demux + AVI..]

Post by sweetie »

Regarding multiple audio tracks:  will investigate tomorrow. (note: a-track 2 would be second audio track, not second track overall.)



To remove MKV run with:
mediamux.sh --save-mux-input 0
Could also use
--mux-one-up 1
to move up one directory level.

And
--save-input-dir 0
to remove input dir. (Requires previous two options to be enabled.)



As for requiring mencoder, what is the output of:
type mencoder
Assuming it's not blank, you should be able to:
sudo ln -s $(type -p mencoder) /usr/bin/mencoder
Last edited by sweetie on December 3rd, 2010, 8:26 pm, edited 1 time in total.
Jeegan
Newbie
Newbie
Posts: 11
Joined: November 28th, 2010, 9:13 pm

Re: [LiNUX/OSX/BSD - bash] MediaMux [v4 - MKV to TS/M2TS/BluRay/AVCHD/Demux + AVI..]

Post by Jeegan »

Sweetie, you're freaking awesome. All of that worked perfectly. And I was just being stupid with the atrack, I thought it was based on the total tracks, so I was using the wrong track. Everything is working perfectly, SABNZB downloads, processes with the script, moves the file and deletes the old directory. Just totally awesome. Thank you again for all of your help.
Jeegan
Newbie
Newbie
Posts: 11
Joined: November 28th, 2010, 9:13 pm

Re: [LiNUX/OSX/BSD - bash] MediaMux [v4 - MKV to TS/M2TS/BluRay/AVCHD/Demux + AVI..]

Post by Jeegan »

Alright, I am back. Everything is going well. I just have a question about subtitles. How do you keep subtitles? The --m-strack doesn't seem to do anything. Is there a special way to pull subs? TIA.
sweetie
Full Member
Full Member
Posts: 117
Joined: May 10th, 2009, 10:47 am

Re: [LiNUX/OSX/BSD - bash] MediaMux [v4 - MKV to TS/M2TS/BluRay/AVCHD/Demux + AVI..]

Post by sweetie »

Very few players seem to support muxed subs in m2ts format - PS3 included (under 3.15 at least.).
To enable subs, try with AVC format:
--m-format avchd
to set format.
--m-sfont "/path/to/font"
to set font (will bypass subs extraction if font not found.).



btw. I'm glad you got it working.
iBurger
Newbie
Newbie
Posts: 1
Joined: December 17th, 2010, 6:08 pm

Re: [LiNUX/OSX/BSD - bash] MediaMux [v4 - MKV to TS/M2TS/BluRay/AVCHD/Demux + AVI..]

Post by iBurger »

Initially, I had trouble getting Sickbeard and Mediamux to work together cause sick' locked the files and moved them b4 mediamux was finished. However, if you edit pp_mediamux.sh like this here; you won't have that problem.

Code: Select all


if [ "$5" = "tv" ]; then

           bash /opt/sab-scripts/mediamux.sh --save-mux-input 0 -m "$1"
           mv /data/pms/var/var.mediamux/* /data/pms/var/var.sickbeard/
fi
This allows for moving the directories.

I really adore Mediamux, big kuddo's to Sweetie for sharing this script. It really solves so major headaches I have been having for years now with my Ps3. So big thanks! :)
Last edited by iBurger on December 18th, 2010, 7:19 am, edited 1 time in total.
tonycmoi
Newbie
Newbie
Posts: 2
Joined: November 27th, 2010, 7:41 am

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

Post by tonycmoi »

Hi all,

First, i would like to thanks the dudez creating this post, thats quite amazing and it works perfectly well for me.
I just have a question : my wish is to keep the MKV file , but replace the DTS by something else in it. ( my player doesnt read DTS sound :( )
Is it possible with the script ?

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 »

tonycmoi: https://github.com/JakeWharton/mkvdts2ac3/tree

May be what you're looking for.


(note: autsmuxer will transcode DTS audio to AC3 when remuxing unless you have options set otherwise.)
ravenous
Newbie
Newbie
Posts: 1
Joined: August 6th, 2011, 4:22 am

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

Post by ravenous »

Although this is a pretty awesome script, I had some serious startup issues getting it to work properly. Some things to keep in mind:

LANGUAGE
Because I'm in the Netherlands, my mkvinfo outputs everything in Dutch. This is problem because the script doesn't recognize the parameters it looks for. I changed the following line to get this working properly:

Code: Select all

mkvinfo=$(mkvinfo "$1")
into

Code: Select all

mkvinfo=$(mkvinfo --ui-language en_US "$1")
SUBS (ON OS X SNOW LEOPARD / LION)
With the language problem solved I was able to convert my MKV files without any trouble... but... as soon as I tried to extract some subs another problem occured. It seems that there are two Korean fonts inside the /Library/Fonts folder that cause tsMuxer to crash with a bus error. Removing both

Code: Select all

AppleMyungjo.ttf
and

Code: Select all

Gungseouche.ttf
solves the problem though.

Also I am unable to convert to AVCHD because of a bad substitution error and converting the subs gives me a timecode error, let's see what I can do about that.

Thanks for the script so far, it keeps me busy, that's for sure :)
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 »

ravenous: Thanks for pointing those out.

Have made a few mods, should sort the language and substitution errors (this issue must be OSX exclusive), however the timecode error seems to be related to tsMuxeR rather than the script. If you find the solution, please report here and I'll implement a fix, assuming it's viable.
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 »

This may be a long shot, but I'm wondering if there's any way to port this to CH3NAS systems like DNS-323 and DNS-320. They use ARM-based processors; I have the DNS-320 which has an 800 MHz processor, and it runs a very basic linux system. It is possible to setup a chrooted Debian environment - is it possible for this tool to run on such a system, and if it did, would it remux in a reasonable period of time? I'd like to use it primarily to remux standard 720p .mkv tv shows. These have h264 video streams and 99% have AC3 audio. Mkv2vob can remux such shows in about 30 seconds on my i3 laptop - even if it took 5 minutes to remux with this program I'd be very happy. I'd like a fully computerless setup to stream from my NAS to my PS3, and for some reason Showtime won't play mkv's streamed from my current DLNA server (using twonky 6.0.32).

I have a torrent client setup on the NAS (Transmission 2.32) and an automatic script to download TV shows from a tracker I am a member of. I also have a script setup to automatically unrar the release once download is complete. The next step is to make it playable on the PS3 - transcoding on the fly is out of the question, but maybe remuxing to another stream will work.

Thoughts?
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 »

dashy: You shouldn't have any problems installing/building the dependencies, with the exception of maybe tsMuxeR itself.

If it runs without seg. faults or similar, then it's almost a certainty that this script will too. As it uses the same procedures as MKV2VOB, muxing time, even on low-end processors, is well within reasonable boundaries.

As for remuxing for PS3 use, that is the reason this exists in the first place. Subtitles are a no-go, however TV releases seldom contain those anyway.


Report back if successful or have any queries.
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 »

Hm, everything works except cmake. I'm a fairly basic linux user - maybe you have an idea of how to fix this? The Debian build is Squeeze 6.0.2, but it is a very basic build. I installed all the packages through apt-get (also had to install make and bzip2) but this is what I get when I ran the code with separate commands:

Code: Select all

root@dlink-4C13E6:~/__aften/aften-0.0.8/__default# cmake .. -DCMAKE_INSTALL_PREFIX:STRING="/usr"
-- The C compiler identification is unknown
CMake Error: your C compiler: "CMAKE_C_COMPILER-NOTFOUND" was not found.   Please set CMAKE_C_COMPILER to a valid compiler path or name.
-- Performing Test CMAKE_COMPILER_IS_ICC
CMake Error at /usr/share/cmake-2.8/Modules/CMakeCInformation.cmake:35 (GET_FILENAME_COMPONENT):
  get_filename_component called with incorrect number of arguments
Call Stack (most recent call first):
  CMakeLists.txt:3 (PROJECT)


CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Performing Test CMAKE_COMPILER_IS_ICC - Failed
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
CMake Error at /usr/share/cmake-2.8/Modules/CMakeCInformation.cmake:35 (GET_FILENAME_COMPONENT):
  get_filename_component called with incorrect number of arguments
Call Stack (most recent call first):
  CMakeLists.txt:3 (PROJECT)


CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Looking for sys/types.h - not found
-- Looking for stdint.h
CMake Error at /usr/share/cmake-2.8/Modules/CMakeCInformation.cmake:35 (GET_FILENAME_COMPONENT):
  get_filename_component called with incorrect number of arguments
Call Stack (most recent call first):
  CMakeLists.txt:3 (PROJECT)


CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Looking for stdint.h - not found
-- Looking for stddef.h
CMake Error at /usr/share/cmake-2.8/Modules/CMakeCInformation.cmake:35 (GET_FILENAME_COMPONENT):
  get_filename_component called with incorrect number of arguments
Call Stack (most recent call first):
  CMakeLists.txt:3 (PROJECT)


CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Looking for stddef.h - not found
-- Check size of unsigned short
CMake Error at /usr/share/cmake-2.8/Modules/CMakeCInformation.cmake:35 (GET_FILENAME_COMPONENT):
  get_filename_component called with incorrect number of arguments
Call Stack (most recent call first):
  CMakeLists.txt:3 (PROJECT)


CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Check size of unsigned short - failed
-- Check size of unsigned int
CMake Error at /usr/share/cmake-2.8/Modules/CMakeCInformation.cmake:35 (GET_FILENAME_COMPONENT):
  get_filename_component called with incorrect number of arguments
Call Stack (most recent call first):
  CMakeLists.txt:3 (PROJECT)


CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Check size of unsigned int - failed
-- Check size of unsigned long
CMake Error at /usr/share/cmake-2.8/Modules/CMakeCInformation.cmake:35 (GET_FILENAME_COMPONENT):
  get_filename_component called with incorrect number of arguments
Call Stack (most recent call first):
  CMakeLists.txt:3 (PROJECT)


CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Check size of unsigned long - failed
CMake Error at /usr/share/cmake-2.8/Modules/TestBigEndian.cmake:44 (MESSAGE):
  no suitable type found
Call Stack (most recent call first):
  CMakeLists.txt:127 (TEST_BIG_ENDIAN)


-- Configuring incomplete, errors occurred!
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 »

Not really familiar with Debian myself. Have you installed 'build-essential' package?
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 »

sweetie wrote:Not really familiar with Debian myself. Have you installed 'build-essential' package?
haha was about to come here and say "I installed build-essential" and got:

Code: Select all

root@dlink-4C13E6:~/__aften/aften-0.0.8/__default# cmake .. -DCMAKE_INSTALL_PREFIX:STRING="/usr"
-- The C compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Performing Test HAVE_64BITS
-- Performing Test HAVE_64BITS - Failed
-- Performing Test HAVE_FLAG_STD=GNU99
-- Performing Test HAVE_FLAG_STD=GNU99 - Success
-- Performing Test HAVE_FLAG_WDISABLED_OPTIMIZATION
-- Performing Test HAVE_FLAG_WDISABLED_OPTIMIZATION - Success
-- Performing Test HAVE_FLAG_WFLOAT_EQUAL
-- Performing Test HAVE_FLAG_WFLOAT_EQUAL - Success
-- Performing Test HAVE_FLAG_WBAD_FUNCTION_CAST
-- Performing Test HAVE_FLAG_WBAD_FUNCTION_CAST - Success
-- Performing Test HAVE_FLAG_WDECLARATION_AFTER_STATEMENT
-- Performing Test HAVE_FLAG_WDECLARATION_AFTER_STATEMENT - Success
-- Performing Test HAVE_FLAG_WEXTRA
-- Performing Test HAVE_FLAG_WEXTRA - Success
-- Performing Test HAVE_FLAG_WNO_SWITCH
-- Performing Test HAVE_FLAG_WNO_SWITCH - Success
-- Performing Test HAVE_FLAG_WSTRICT_OVERFLOW
-- Performing Test HAVE_FLAG_WSTRICT_OVERFLOW - Success
-- Check if the system is big endian
-- Searching 16 bit integer
CMake Error at /usr/share/cmake-2.8/Modules/TestBigEndian.cmake:44 (MESSAGE):
  no suitable type found
Call Stack (most recent call first):
  CMakeLists.txt:127 (TEST_BIG_ENDIAN)


-- Configuring incomplete, errors occurred!
Post Reply