Page 1 of 2
Remuxing MKV to TS
Posted: 23 May 2007 10:39
by phunqe
I'm trying to figure out if it's possible to use VLC for MKV to TS remuxing with the MKV containing a h264 video and AC3 or DTS audio.
Basically what I need is to change the container from MKV to TS to be able to play the files on the new TVIX 4100/5100 media player. It supports h264 fully, it's just the mkv container that it doesn't support.
I've tried to Stream/Save the MKV into a TS, trying out different options (without transcoding), but I always end up with a ts file with the audio but no video. The file size match however (i.e the ts file is basically the same size as the mkv file).
Could I get a hint on how to properly do this, if possible?
Thanks in advance.
Posted: 23 May 2007 10:42
by Jean-Baptiste Kempf
Paste your command line.
Posted: 23 May 2007 11:01
by phunqe
Thanks for the quick reply.
I'm not using the command line directly, but the MRL is:
:sout=#duplicate{dst=std{access=file,mux=ts,dst="test.ts"}}
also tried with "Select all elementary streams":
:sout=#duplicate{dst=std{access=file,mux=ts,dst="test.ts"}} :sout-all
Posted: 23 May 2007 11:12
by Jean-Baptiste Kempf
Thanks for the quick reply.
I'm not using the command line directly, but the MRL is:
:sout=#duplicate{dst=std{access=file,mux=ts,dst="test.ts"}}
also tried with "Select all elementary streams":
:sout=#duplicate{dst=std{access=file,mux=ts,dst="test.ts"}} :sout-all
and if you transcode ?
Posted: 23 May 2007 11:38
by phunqe
Even if my purpose isn't to transcode, I did try this and then there is video. However the resulting video is always very blocky and there's a lot of color bleeding (some parts are even solid colors, like green).
I tried different variants, one was for example:
Code: Select all
:sout=#transcode{vcodec=mp2v,vb=3072,scale=1,acodec=a52,ab=512,channels=6}:duplicate{dst=std{access=file,mux=ts,dst="test.ts"}}
I did also try setting fps= manually just in case, no difference.
Posted: 23 May 2007 11:42
by phunqe
I realize now that the video bitrate when transcoding was quite low, since it was a 720p resolution video. That might have counted for the blockyness, but not for the color issues.
In any case, any ideas on why a direct remux does not work?
Posted: 23 May 2007 12:16
by DJ
@ j-b: As a straight copy (MKV to TS) I get this error
packetizer_h264 warning: waiting for SPS/PPS
This would be a MPEG TS error for h.264
The rest of the reporting seems correct.
I thought this was fixed. The DJ did it, as I recall!

Deja Vu, I know I have been here before.
Posted: 23 May 2007 12:55
by Jean-Baptiste Kempf
@DJ: Well, I have not read and understand the packetizers things in VLC yet.
What is the output of vlc -vvv, btw ?
Posted: 23 May 2007 13:00
by DJ
You want me to do it again? I just cleaned up and put everything away!

Ask The DJ, perhaps he will remember as it was during the tests for 0.8.6
Posted: 23 May 2007 13:18
by phunqe
Should I do something more here, like submitting some logs?
Would really be cool if this could work

Posted: 23 May 2007 13:19
by Jean-Baptiste Kempf
Nope that is fine. I know that some changes were made on the trunk version too.
Posted: 23 May 2007 13:21
by phunqe
Should I try with a trunk version or are you planning on changing things further?
Posted: 24 May 2007 15:56
by phunqe
I tried to do this with today's (24th of may) trunk, but I'm having problems even saving the file.
Select Convert/Save:
Select the file I want to convert and then Convert in the Convert/Save drop down box:
Tick the file checkbox and then blick on Browse. Here when I enter a filename to save to I get the following:
I tried to enter a filename directly (without browsing), but nothing really happens when I press Convert/Save in the second image. It just starts to play the file.
Thanks in advance.
Posted: 31 May 2007 01:11
by vostok4
Phunge have you gotten anywhere with this? I'm looking to get this done as well for my set top but there is no info anywhere on a working system, unless I transcode the AC3 audio to AAC and then remux it.... but that I hope to skip.
Posted: 31 May 2007 02:03
by Jean-Baptiste Kempf
ok. Sorry, I haven't seen that thread. The new GUI transcoding is not ready.
Use the old GUI, an old VLC, or the command line.
Posted: 31 May 2007 02:11
by vostok4
j-b, so we need the newest trunk to do this transcoding? Or how old of a version do we need to try? CLI would be ideal for me... but I am not very familiar with the VLC architecture.
Posted: 31 May 2007 02:29
by Jean-Baptiste Kempf
Well, you shouldn't need a new one, but well, this is a bit unsure.
However you can launch the old GUI with the nighlties with the -Iwx swicth
Posted: 31 May 2007 08:08
by vostok4
Interesting.
J-B, I tried the latest nightly with the old GUI, and it indeed remuxed straight from MKV but it broke the video, I have audio but no video, any way to rectify this?
Posted: 31 May 2007 10:44
by Jean-Baptiste Kempf
What is the video codec used ?
Posted: 31 May 2007 11:42
by vostok4
h264 (x264)
Posted: 31 May 2007 12:08
by Jean-Baptiste Kempf
Well, what are the messages ?
Posted: 03 Jun 2007 11:25
by vostok4
This is the call line I'm using with latest VLC nightly + -Iwx switch for the old GUI:
:sout=#duplicate{dst=std{access=file,mux=ts,dst="c:\ooo.ts"}} :sout-all
It encodes to a video ooo.ts, which has audio, but no video, however it does have a source height, width defined, FPS defined etc, but nothing is rendered. It's just black.. is there a way to find out how to fix a TS file or edit a TS file?
Posted: 03 Jun 2007 11:28
by vostok4
It also recognizes that the video codec in the .ts file is H264... but again, no video?
Posted: 03 Jun 2007 22:42
by DJ
Posted: 04 Jun 2007 05:05
by vostok4
Excellent! Thanks DJ! I'll keep an eye on that... this will make my life so much easier if it works!