Log in

View Full Version : tsMuxeR_1.7.3(b) for Linux


boissy
28th September 2008, 18:10
It seems this version of tsMuxeR for Linux works only with command lines within a Consol.
I'm trying to find a tuto for installing it and a few commands to use it

:script:

NjB

kaid
30th September 2008, 11:51
It seems this version of tsMuxeR for Linux works only with command lines within a Consol.
I'm trying to find a tuto for installing it and a few commands to use it

:script:

NjB

I wrote a simple script that generates .meta files for you if you run it with a few params. I'll post it here tomorrow when I get home! No GUI, but as close as it gets on CLI! ;-D

Beware though, it seems the BD mux feature is b0rked under Linux, at least I could not get it to work under Ubuntu (always told me something about "Can't write stream" or sth!..)

Installing it? untar it and run it, there's no rpm, deb or anything, it's just the executable!...

you might want to copy it into your /usr/local/bin or /usr/bin/ to have it in your $PATH...

boissy
30th September 2008, 14:11
Thank you for the answer,
I'm using ubuntu distro, hardy Heron, and you said it doesn't seem to work with it !

:rolleyes:

NjB

kaid
30th September 2008, 16:57
Only the BD mux option, regular m2ts muxing works fine (minor bugs which are not showstoppers though, like setting the levelflag to 4.1 sets it to 4.0, or the PS3 shows the stream as MPEG2 when it's AVC (but still plays it fine!)), as should .ts muxing and demuxing (didn't try that yet)...

kaid
10th October 2008, 19:05
Okay, here goes, as promised:


#!/bin/bash
level="level=4.1, "
if [ -z "$1" ]; then echo "Syntax: mkv2ps3 <file> <AC3/DTS/AAC> <audiotrack ID> <3-letter languagecode> <anything=don't fix level>";
exit 1; fi
if [ -z "$2" ]; then tsMuxeR "$1"; exit 1; fi
if [ ! -z "$5" ]; then echo "!!! Level unchanged !!!"; level=""; fi

moviename=`basename "$1" .mkv`

echo -e "MUXOPT --no-pcr-on-video-pid --new-audio-pes --vbr --vbv-len=500\nV_MPEG4/ISO/AVC, \""$1"\", "$level"insertSEI, contSPS, track=1, lang=und" > "$moviename".meta
echo -e "A_"$2", \""$1"\", track="$3", lang="$4 >> "$moviename".meta

tsMuxeR "$moviename".meta "$moviename".m2ts
# rm "$moviename".meta


Save this as e.g. mkv2ps3 somewhere in your $PATH and make it executable with 'chmod +x mkv2ps3'. Ofcourse, you also need to have tsMuxeR somewhere within your $PATH for it to work! ;-)

Usage: only entering 'mkv2ps3' gives you the options, if you only add the mkv and nothing else after it it analyzes it using tsMuxer (so you can see which ID the audiotrack has, which language and which codec!). Second option is the Audioformat (though anything but AC3 will result in silence when played via the PS3 XMB! So you need to convert your stuff to AC3, see further down how!). Third option is the ID of the Audiotrack, fourth the 3-letter language code. The fifth argument can be anything, the script just checks if it's zero and if it's not it does not change the level (it will tell you so!).

Example: Let's say your audiotrack is #3 in english AC3, and it needs a fix to level 4.1 (well, 4.0 in the buggy version of tsmuxer/linux, but it works anyway!), so you would enter

mkv2ps3 <file.mkv> AC3 3 eng

It will generate the .meta file, run tsmuxer and save an .m2ts file you can play on your PS3. The .meta file is kept if you want to play around with it (e.g. to find out the bluray muxing DOES NOT WORK!), if you want to automatically delete the .meta file, remove the # in the last line!

Converting DTS/AAC/PCM/MP3-Audio to multichannel AC3:
1) install mencoder
2) enter:

mencoder -channels 6 -aid <audiotrack-id> -ovc copy -oac lavc -of rawaudio -lavcopts acodec=ac3:abitrate=<desired-bitrate-in-kbits> -o <output.ac3> <input.mkv>

(Note 1: Valid bitrates the PS3 can handle in multichannel are: 128, 160, 192, 224, 256, 320, 384, 448, 512, 576, 640 - yes i confirmed each and every one of these! ;-)
(Note 2: For stereo tracks change -channels 6 to -channels 2, and lower the bitrate accordingly, valid should be: 64, 96, 112, 128, 160, 192 and 224! I suggest 192!)

This takes a few minutes, but it's rather fast...

3) Generate the .meta file with my script (you don't want the .m2ts this time around, so comment out the second line from the bottom in the script and make sure the last line is also commented out!)

4) On the third line of the .meta file change A_DTS, A_AAC or anything that is not A_AC3 to A_AC3 and the filename to the .ac3 you just generated with mencoder, you'll probably also need to change the track-ID to 1 (or 0?). Haven't done this yet by messing around with the .meta file itself, but it should work just fine! ;-). Save it.

5) enter: tsMuxeR <metafile.meta> <target.m2ts>

Copy the finished .m2ts over to the PS3, burn it onto a DVD or simply stream it from your machine with a uPnP/DLNA-Server. Ofcourse you can also copy it to the internal HD, if it's bigger than 4GB (likely) you either have to use DL-DVD-Rs and if that's not enough you can do it via network, either by copying from a uPnP/DLNA server (use triangle button!) or by setting up a local FTP- or HTTP-server on your PC and saving it using the webbrowser!

Enjoy!

P.S: By chance, i did try out the demuxing, which also works just fine! Just BD muxing is b0rked it seems...

P.S. 2: Sorry for all the PS3-geared info, i just saw you didn't say you had a PS3! ;-)

boissy
12th October 2008, 03:10
I'm gone a try

:)

NjB

kaid
12th October 2008, 16:45
btw: If you use Linux, you should also check out TsRemux, I just got it to work (http://forum.doom9.org/showthread.php?t=141855) under Mono, also for MacOS X! ;-) It can do proper BD/AVCHD muxing!...

ChuckleWorthy
11th November 2008, 09:28
Under Linux you can use Wine (http://en.wikipedia.org/wiki/Wine_(software)) to run the Windows CLI version of tsMuxer which I found works just fine.

I had made an attempt to cover this in my posting (http://forum.doom9.org/showthread.php?t=138746) a while back. May be on some relevance?