Page 1 of 1

ReMux .MKV to .TS to preserve multi audio

PostPosted: Tue Mar 15, 2011 10:13 pm
by PeterB
Hi All,

I have had some succes in remuxing a .MKV into a .TS with tSMuxer. The end resulting .TS file played through Serviio and contained both Dolby Digital Audio Streams the original MKV had.

The streams were also selectable in the Panasonic Option Button Menu during playback of the movie.
As DTS seems not to be supported, perhaps it is possible to create a profile which will convert all possible streams ina MKV into Dolby Digital before packing it all into a .TS

I am now testing the same file with adding subtitles to it to see if the Panasonic will also allow me to select multiple subtitle streams.

If it works then we can pack MKV into .TS and preserve all DD audio streams and subttitles ;)

Cheers,

Peter

Re: ReMux .MKV to .TS to preserve multi audio

PostPosted: Tue Mar 15, 2011 11:14 pm
by zip
Serviio will currently only use the first audio stream (as defined by FFmpeg)

Re: ReMux .MKV to .TS to preserve multi audio

PostPosted: Fri Mar 18, 2011 9:32 pm
by AlD
Hi Peter,

could you provide some details on the steps you took to convert the .mkv to a file playable on a Panasonic Viera device?

I tried this script and tinkered with it, but had no success so far.

Thanks in advance!

Cheers, Daniel

Re: ReMux .MKV to .TS to preserve multi audio

PostPosted: Sat Mar 19, 2011 8:16 am
by Cerberus
AlD wrote:Hi Peter,

could you provide some details on the steps you took to convert the .mkv to a file playable on a Panasonic Viera device?

I tried this script and tinkered with it, but had no success so far.

Thanks in advance!

Cheers, Daniel


ZIP please correct me if im wrong but MKV file will play on the panasonic if they use the correct profile wont they or have we still not got enough information to make a decent working panasonic profile ???

Re: ReMux .MKV to .TS to preserve multi audio

PostPosted: Sat Mar 19, 2011 6:31 pm
by AlD
Well, I have the device profile set to "Panasonic Viera" in serviio 0.5.1, but I just get a "file type not supported" when trying to play an mkv on the TV.

Re: ReMux .MKV to .TS to preserve multi audio

PostPosted: Sat Mar 19, 2011 6:44 pm
by zip
I'm not sure to be honest ;-) post ffmpeg -i for the mkv you cannot play

Re: ReMux .MKV to .TS to preserve multi audio

PostPosted: Sat Mar 19, 2011 6:51 pm
by AlD
OK, I don't want to "hijack" the thread ;-) but here goes:

FFmpeg version SVN-r25767, Copyright (c) 2000-2010 the FFmpeg developers
built on Jan 29 2011 19:47:43 with gcc 4.5.2
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-static --enable-shared --cc=x86_64-pc-linux-gnu-gcc --enable-gpl --enable-version3 --enable-postproc --enable-avfilter --disable-stripping --disable-debug --disable-doc --disable-network --disable-vaapi --disable-static --disable-vdpau --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --disable-indev=oss --disable-indev=jack --enable-x11grab --disable-outdev=oss --enable-pthreads --enable-librtmp --enable-libschroedinger --disable-altivec --cpu=host --enable-hardcoded-tables
libavutil 50.33. 0 / 50.33. 0
libavcore 0.13. 0 / 0.13. 0
libavcodec 52.96. 0 / 52.96. 0
libavformat 52.84. 0 / 52.84. 0
libavdevice 52. 2. 2 / 52. 2. 2
libavfilter 1.62. 0 / 1.62. 0
libswscale 0.12. 0 / 0.12. 0
libpostproc 51. 2. 0 / 51. 2. 0
[matroska,webm @ 0x158c510] Estimating duration from bitrate, this may be inaccurate

Seems stream 1 codec frame rate differs from container frame rate: 47.95 (48000/1001) -> 24.00 (24/1)
Input #0, matroska,webm, from 'Bored.To.Death.S02E06.720p.HDTV.x264.mkv':
Duration: 00:26:43.55, start: 0.000000, bitrate: 384 kb/s
Stream #0.0: Audio: ac3, 48000 Hz, stereo, s16, 384 kb/s
Stream #0.1(eng): Video: h264, yuv420p, 1280x720, PAR 1:1 DAR 16:9, 23.98 fps, 24 tbr, 1k tbn, 47.95 tbc
At least one output file must be specified

Re: ReMux .MKV to .TS to preserve multi audio

PostPosted: Sun Mar 20, 2011 11:16 am
by zip
The profile specifies remuxing MKV with H264 to mpegts with ac3. Your file should be compatible, unless it's profile/level is too high (you could find that in Media Info). Do all your mkv files fail to play or is this the only one?

Re: ReMux .MKV to .TS to preserve multi audio

PostPosted: Sun Mar 20, 2011 11:41 am
by AlD
The behaviour is consistent with all of my MKVs, i.e. none of them play.

Re: ReMux .MKV to .TS to preserve multi audio

PostPosted: Sun Mar 20, 2011 12:02 pm
by zip
can you post detailed log of when you try to play the file?

Re: ReMux .MKV to .TS to preserve multi audio

PostPosted: Sun Mar 20, 2011 7:50 pm
by AlD
Sure thing.

Re: ReMux .MKV to .TS to preserve multi audio

PostPosted: Sun Mar 20, 2011 7:55 pm
by Illico
Please, could you post MediaInfo result of your file too?

Re: ReMux .MKV to .TS to preserve multi audio

PostPosted: Sun Mar 20, 2011 8:17 pm
by AlD
Sure, here you go.

For what it's worth, I'm also attaching a log excerpt of a working mpeg file.

Re: ReMux .MKV to .TS to preserve multi audio

PostPosted: Mon Mar 21, 2011 10:09 am
by Illico
Panasonic renderers only supports
- AVC/H264 with x264 core >61 revision. --> x264 core 85 r1442tw : OK
- H264 High@Level < 4.1 --> High@L3.1 : OK

Seems good, could you provide mkvinfo of you mkv file? I'll looking at header compression issue.

Re: ReMux .MKV to .TS to preserve multi audio

PostPosted: Mon Mar 21, 2011 7:04 pm
by AlD
Ok, mkvinfo, here it is:

Re: ReMux .MKV to .TS to preserve multi audio

PostPosted: Mon Mar 21, 2011 7:25 pm
by Illico
AlD wrote:Ok, mkvinfo, here it is:

Thanks, there were no header compression.

Sorry but, no more ideas...

Re: ReMux .MKV to .TS to preserve multi audio

PostPosted: Sat Mar 26, 2011 3:02 pm
by PeterB
AlD wrote:Hi Peter,

could you provide some details on the steps you took to convert the .mkv to a file playable on a Panasonic Viera device?

I tried this script and tinkered with it, but had no success so far.

Thanks in advance!

Cheers, Daniel


Daniel,

I first remuxed the MKV into a .TS ( so Servioo ) did not have to do it.
When the MKV has multiple Dolby Digital tracks in it and you convert it into a .TS then the file should allow you to play either stream.

No luck thusfar with subtitles as the subtitles used in normal .TS streams by Tv stations are ofthen way different from what we are using.

Re: ReMux .MKV to .TS to preserve multi audio

PostPosted: Tue Jan 10, 2012 9:48 pm
by klaus
If anybody is interested, I made this minimalistic ffmpeg wrapper, to support multiple audio tracks while transcoding or just remuxing:

  Code:
#!/bin/bash

argv=("$@")
argc=${#argv[@]}

j=0
map[0]="0:v:0"      # 1st map: 1st video track
map[1]="0:a"      # 2nd map: all audio tracks

for (( i=0 ; i<argc ; i++ )); do
    case "${argv[i]}" in
   "-map" ) argv[i+1]=${map[j++]} ;;
    esac
done

/opt/ffmpeg/bin/ffmpeg "${argv[@]}"

Works fine with serviio 0.6.1 & ffmpeg 0.9.1.