Thursday, July 9, 2009

HDMI extender through UTP


I got rid of my long HDMI cable! Now my video signal is integrated in the walls :)

König Electronic KN-HDMIREP20

I found out about this product when I was looking for an alternative to my long HDMI cable between the PS3 and the projector. It extends the 1080P signal up to 30m by using normal CAT-5e/6 cables.

Sunday, June 28, 2009

ps3mediaserver

Not much updates here lately re mkv remuxing. The reason is that I'm now using the excellent software called ps3mediaserver http://ps3mediaserver.blogspot.com/ which makes my mkv remuxing obsolete (at least for my needs). The code and downloads can be found at http://code.google.com/p/ps3mediaserver/

However I switched to use freeBSD on my server to make use of ZFS etc. I had to do some patches to ps3 media server to make it run perfectly on BSD. So if there are any interest re this I could post my patches and instructions.

Update:

I patched the mkfifo part. However I found out now that this issue was already submitted by someone else: http://code.google.com/p/ps3mediaserver/issues/detail?id=466

I didn't patch the mencoder part... I'm pretty much just use it with tsMuxeR anyway.

The trick to get tsMuxeR to work is to enable Linux support for freeBSD (I'm running 7.2 rel) .
See http://www.freebsd.org/doc/en/books/handbook/linuxemu-lbc-install.html

I used linux_base-fc6 instead of linux_base-fc4 . I also had to update binutils to 2.19 to make
it compile.

After this the Linux version of tsMuxeR should run perfectly.

Sunday, June 29, 2008

HOWTO: Remux .mkv to .m2ts on linux

A super fast'n'easy way to convert .mkv to a PS3 accepted format without any quality loss.

The script below can be used to remux a "standard" .mkv matroska file to a AVCHD .m2ts file which plays perfectly fine on the Sony PS3 for example. This is possible by using the great software tsmuxer by SmartLabs.


Updates:
  • changed to the native linux version of tsmuxer
  • support for muliple audio lang

Requisites

tsMuxer: http://www.videohelp.com/tools/tsMuxeR
mkvtoolnix: http://www.videohelp.com/tools/MKVtoolnix
dcadec: http://www.videolan.org/developers/libdca.html
aften: http://aften.sourceforge.net/

Installation

1. Make sure the apps above are installed, mkvtoolnix should be available from your dist repo.. i.e. apt-get
2. Copy the script below for example to /usr/local/bin/mkvtom2ts.sh and make it executable.
3. Edit the preferred default language list
4. Test it! mkvtom2ts.sh movie.mkv


#!/bin/bash
#
# mkvtom2ts.sh - a simple wrapper around the tsmuxeR
# Creates a m2ts from a "standard" mkv (assuming video is MPEG4, and sound is AC3 or DTS)
#
# v0.1 initial version
# v0.2 added DTS support
# v0.3 changed to tsmuxer linux version + added multiple audio lang support
#
# Usage: mkvtom2ts filename.mkv
#

AUDIO_LANGS="eng und swe"


BASENAME=$(basename "$1" .mkv)
DEST_FILE=$BASENAME.m2ts

MPEG4_TRACK_NO=`mkvinfo "$1" | grep V_MPEG4/ISO/AVC -B10 | grep Track\ number\:\ | awk '{ print $5 }'`

for AUDIO_LANG in $AUDIO_LANGS
do
AC3_TRACK_NO=`mkvinfo "$1" | grep A_AC3 -B10 -C3 | grep Language\:\ $AUDIO_LANG -B13 | grep Track\ number\:\ | awk '{ print $5 }'`
DTS_TRACK_NO=`mkvinfo "$1" | grep A_DTS -B10 -C3 | grep Language\:\ $AUDIO_LANG -B13 | grep Track\ number\:\ | awk '{ print $5 }'`
if [ -n "$AC3_TRACK_NO" -o -n "$DTS_TRACK_NO" ]
then
break
fi
done

echo "Video(V_MPEG4/ISO/AVC) track no : $MPEG4_TRACK_NO"
echo "Audio(A_AC3) $AUDIO_LANG track no : $AC3_TRACK_NO"
echo "Audio(A_DTS) $AUDIO_LANG track no : $DTS_TRACK_NO"

#audio ac3->direct muxing
if [[ $AC3_TRACK_NO -gt "0" ]]
then
echo "Found ac3 track, muxing directly..."
rm -f mux.meta
echo "MUXOPT --no-pcr-on-video-pid --new-audio-pes --vbr" >>mux.meta
echo "V_MPEG4/ISO/AVC, "$1", level=4.1, insertSEI, contSPS, track=$MPEG4_TRACK_NO, lang=eng" >>mux.meta
echo "A_AC3, "$1", track=$AC3_TRACK_NO, lang=eng" >>mux.meta
tsMuxeR mux.meta $DEST_FILE
rm -f mux.meta
else
if [[ $DTS_TRACK_NO -gt "0" ]]
then
echo "No ac3 but dts, converting to ac3.."
mkvextract tracks "$1" $DTS_TRACK_NO:"$BASENAME.dts" $MPEG4_TRACK_NO:"$BASENAME.mpeg4"
dcadec -r -o wavall "$BASENAME.dts" > "$BASENAME.wav"
aften "$BASENAME.wav" "$BASENAME.ac3"
echo "Muxing..."
rm -f mux.meta
echo "MUXOPT --no-pcr-on-video-pid --new-audio-pes --vbr" >>mux.meta
echo "V_MPEG4/ISO/AVC, "$BASENAME.mpeg4", level=4.1, insertSEI, contSPS, track=1, lang=eng" >>mux.meta
echo "A_AC3, "$BASENAME.ac3", track=1, lang=eng" >>mux.meta
tsMuxeR mux.meta $DEST_FILE
rm -f mux.meta $BASENAME.dts $BASENAME.wav $BASENAME.ac3 $BASENAME.mpeg4
else
echo "No ac3 or dts, exiting..."
fi
fi


Tuesday, March 25, 2008

It seems that the author of tsmuxer is working on a .srt -> sup builtin conversion, this means that we will be able to get subtitles in a much easier way than I initially thought :) Great stuff! I also noticed that txmuxer is available as a native Linux binary now! I will try to update the script soon to fix this and add some other tweaks as well.