View Full Version : "h264tsto" automates audio/video demuxing and MKV muxing
madshi
2nd November 2006, 18:16
http://madshi.net/h264tsto.zip
h264tsto v1.5, freeware by madshi.net
This tool can either demux video/audio to separate raw files.
Or it can remux video/audio into a Matroska (*.mkv) container.
h264tsto sourceFile [destFile] [-options]
Options:
-demux demuxes video/audio streams to separate raw files
-videoonly remuxes/demuxes only the video stream, ignores audio
-audioonly remuxes/demuxes only the audio streams, ignores video
-24p rewrites the destination MKV timestamps to 23.976
-25p rewrites the destination MKV timestamps to 25.000
-30p rewrites the destination MKV timestamps to 29.970
-no24p don''t rewrite the destination MKV timestamps
Support input formats:
*.ts
*.m2ts
*.vob
*.evo
*.avi
*.wmv
*.mkv
The following software is needed:
(1) http://haali.cs.msu.ru/mkv/
(2) http://www.bunkus.org/videotools/mkvtoolnix/downloads.html#windows
Eeknay
2nd November 2006, 19:30
Just tried this and it didn't mux the audio to MKV (video worked fine), is this intentional?
bond
2nd November 2006, 19:42
well its a h.264 tool, no? ;)
giandrea
3rd November 2006, 00:41
Just being curious... where do you get TS streams with H.264 video? It seems to me they are HD channels. In the USA HD channels are encoded in MPEG2, in Europe there are just few HD channels available on satellite, they encode in H.264, but they are mostly testing channels.
just curious... :D
bob0r
3rd November 2006, 04:39
http://en.kingofsat.net/hdtv.php
madshi
3rd November 2006, 11:00
Just tried this and it didn't mux the audio to MKV (video worked fine), is this intentional?
Yes, it's intentional. The tool is about H.264 video streams, only. You can demux audio streams with Project X and mux them to the H.264 MKV with mkvmerge. Of course I could have added audio support, too, but then I didn't find a quick way to extract all audio languages. It would have been the default language, only. So I decided to handle video, only.
Just being curious... where do you get TS streams with H.264 video? It seems to me they are HD channels. In the USA HD channels are encoded in MPEG2, in Europe there are just few HD channels available on satellite, they encode in H.264, but they are mostly testing channels.
just curious...
Here in Germany there are 3 free German TV stations broadcasting (from time to time) HDTV movies in H.264. Then of course there's German pay TV, also in H.264. Finally there is UK pay TV and the free BBC HD sender.
carlo_0000
3rd November 2006, 19:41
i tested it
it convert very good to mkv
but i can't still open it in megui
it say me
Avisynth script error:
directshowsource; i can't determine the framerate of the video, you must use the "fps" parameter :confused:
friends-fan
3rd November 2006, 21:17
i tested it
it convert very good to mkv
but i can't still open it in megui
it say me
Avisynth script error:
directshowsource; i can't determine the framerate of the video, you must use the "fps" parameter :confused:
That can be fixed by adding the fps=25 (for example) option in the avs script. Still will get you an out of sync mkv after encoding most likely...
carlo_0000
4th November 2006, 02:47
That can be fixed by adding the fps=25 (for example) option in the avs script. Still will get you an out of sync mkv after encoding most likely...
stil not working but the previeuw is gray
olso gray when playing avs with mplayer clasic :scared: :confused:
must be egain filter/codec problem
i try on a other computer , i think it works
wadim
9th January 2007, 15:30
Thank you very much for this one, tried different ways and always got error format in mkvtolnix after and now it's ok :)
daWsOn_s
10th January 2007, 01:48
Here in Germany there are 3 free German TV stations broadcasting (from time to time) HDTV movies in H.264. Then of course there's German pay TV, also in H.264. Finally there is UK pay TV and the free BBC HD sender.
Where are they transmitted?:p
bob0r
10th January 2007, 03:14
http://en.kingofsat.net/hdtv.php
daWsOn_s
10th January 2007, 14:12
Ok satellite tv
wiak
28th January 2007, 20:52
In case you're interested, I was tired of having to use GraphEdit to demux the H.264 video stream from my TS recordings. So I've written a little tool which automates it:
http://madshi.net/h264tsto.zip
It's a command line tool. Here's the help output:
any eta on a version that can mux both video & audio?
its a little space of like 30GB when muxing to mkv
alsp 10GB for ts, 10GB for video tmp mkv and then 10MB for the mkv with sound
it should be easy :)
Ricey
30th January 2007, 13:29
i tested it
it convert very good to mkv
but i can't still open it in megui
it say me
Avisynth script error:
directshowsource; i can't determine the framerate of the video, you must use the "fps" parameter :confused:
Use ffdshow and it works
madshi
10th February 2007, 12:11
Hi guys,
here's version 1.1:
http://madshi.net/h264tsto.zip
Here's the help text:
h264tsto v1.1, freeware by madshi.net
Usage: h264tsto srcFilename.ts destFilename.mkv|destFilename.h264
This tool can either demux the H.264 stream to a raw *.h264 file.
Or it can mux the H.264 stream into a Matroska (*.mkv) container.
Demuxing into a raw *.h264 file needs the following filters to be installed:
(1) Elecard or Cyberlink Demuxer (empgdmx.ax/CLDemuxer.ax)
(2) Dump (dump.ax, shipping with GraphEdit)
Muxing into a Matroska container needs the following filters to be installed:
(1) Haali Media Splitter
(2) Haali Matroska Muxer
Version 1.1 now also demuxes/muxes the audio tracks, if possible.
Recommended for demuxing more than one audio track is the Elecard Demuxer.
The Cyberlink Demuxer only offers the first audio track for demuxing.
If the format is unknown, the files are demuxed as "rawaudio/rawvideo".
The Haali Media Splitter doesn't support more than one audio track at the same time, so muxing into MKV is limited to one audio track at this point in time. If Haali adds support for all audio tracks, I'll update this tool accordingly.
P.S: Supported for demuxing is now also MPEG2 video, DTS etc, as long as the Demuxer filters support these formats.
madshi
10th February 2007, 23:58
Just got note that Haali's "Simple Media Splitter" does offer all TS content as output pins in contrast to the "Media Splitter". So I've uploaded h264tsto version 1.2 already (same link as before). This version now muxes TS files to MKV with all video and audio streams.
Thanks to Haali for his great DirectShow filters!
Okraml
11th February 2007, 13:35
Hi madshi,
can you write a modified version of the tool, that takes a .vc1 file (with file source async) -> elecard mpeg demultiplexer -> Matroska Muxer ?
In graphedit they connect, but only small files result in a successfull muxing. Bigger files make problems like http://forum.doom9.org/showthread.php?t=121497.
Thanks in advance.
:-) Okraml
madshi
11th February 2007, 14:54
Do you think doing it with a tool will work better than doing it in Graphedit? I did try to mux VC-1 into MKV already via Graphedit and it didn't work for me at all. So I somehow doubt that it will work with a tool. Basically h264tsto does the same thing Graphedit does, just automated...
Okraml
11th February 2007, 15:14
Do you think doing it with a tool will work better than doing it in Graphedit? I did try to mux VC-1 into MKV already via Graphedit and it didn't work for me at all. So I somehow doubt that it will work with a tool. Basically h264tsto does the same thing Graphedit does, just automated...
I think there have been some h264-ts files that i couldn't transmux in graphedit, but with h264tsto.
With a small vc1 file i was able to mux it in graphedit, but not with larger files. In the linked thread you can also see, that with a trick i was able to mux larger files a little better (but only got 60mb files).
So i think a modified tool is worth a try (if its not to much work to implement).
:-) Okraml
madshi
11th February 2007, 18:01
I've just tried. Doing it as a tool doesn't improve things on my PC. My test "vc1tomkv" tool was able to correctly mux a 55MB vc1 file to mkv. But muxing a big file failed miserably in the same way as Graphedit fails. Tried a 15GB vc1 file and simply nothing happened. The muxing was sitting idle (but not "run through") and the mkv file stayed at 0 bytes all the time.
Okraml
11th February 2007, 18:34
I've just tried. Doing it as a tool doesn't improve things on my PC. My test "vc1tomkv" tool was able to correctly mux a 55MB vc1 file to mkv. But muxing a big file failed miserably in the same way as Graphedit fails. Tried a 15GB vc1 file and simply nothing happened. The muxing was sitting idle (but not "run through") and the mkv file stayed at 0 bytes all the time.
THX for testing anyway.
Weird that it works with small files, but not with big ones.
:-) Okraml
bob0r
18th February 2007, 21:56
Same problem here:
100mb ok
13gb bad (4.09gb once worked)
source: BBC-HD H.264 MBAFF .ts
really annoying.... as h264tsto is the ONLY tool a bit near to putting H.264 MBAFF in .mkv
Haali or other coders really have problems with big files....... why are coders always so humble? :o We need some super rich-everything-having-millionair-coder :devil:
WoRkZ
22nd February 2007, 17:37
-
Will there be a Windows util. made from this tool? I'm no programmer but I'd like to be able to extract those h264 tracks anyway... :)
-
madshi
23rd February 2007, 12:13
This *IS* a Windows utility.
madshi
28th February 2007, 22:19
Hi madshi,
can you write a modified version of the tool, that takes a .vc1 file (with file source async) -> elecard mpeg demultiplexer -> Matroska Muxer ?
In graphedit they connect, but only small files result in a successfull muxing. Bigger files make problems like http://forum.doom9.org/showthread.php?t=121497.
FWIW, with the very latest Haali Media Splitter + Haali Matroska Muxer the current version of h264tsto can mux VC-1 EVO files directly to MKV!! I didn't even have to do anything. Haali did all the magic. Just use "h264tsto some.evo some.mkv". The DD+ tracks are all getting muxed, too, but I think the DD+ tracks are not getting a good designation yet. I think Haali is going to correct that with the next version of his filters.
DaRat
3rd March 2007, 22:22
Hi! This is a awesome too, thank you for making this available for gimps like me. :D But I have a problem with the output, for some reason I have insane framedrops while playing it back on any player (no problems with TS or other 1080p mkvs). Putting the result through mkvmerge and adding in a 25 fps timecode solves the problem but kinda defeats the purpose of making it work in one step. Any idea what might cause this?
madshi
3rd March 2007, 22:29
Hmmmm... I've not had such a problem yet. With which movie did this happen? Or does it happen with all movies for you? Please give me a list of movies, so I can double check against a movie I own.
Guest
9th March 2007, 01:39
Thank you for this tool. It would be much more useful with:
1. The ability to set the transport pids. What do you do if a stream has more than one program?
2. Release of source code.
madshi
9th March 2007, 09:54
Thank you for this tool. It would be much more useful with:
1. The ability to set the transport pids. What do you do if a stream has more than one program?
I don't have such a TS file for testing. Much depends on how Haali's Simple Media Splitter behaves in such a case, cause my tool really does nothing more than to connect some DShow filters. Can you upload a little TS file (50MB should be enough) for me to test?
2. Release of source code.
No problem. I've added it to the upload. (Same link as before). It's Delphi code, btw.
Guest
9th March 2007, 15:33
Thank you for the source code. I can get you a stream next week. I am off work this week and have one there.
Atak_Snajpera
10th March 2007, 00:06
Where can I download the latest Haali Matroska Muxer?
madshi
10th March 2007, 00:18
Where can I download the latest Haali Matroska Muxer?
http://haali.cs.msu.ru/mkv/
Atak_Snajpera
10th March 2007, 00:34
Could you add "fps" option for mkv files because my movie plays to fast. BTW! How to force fps in mkvmerge?
madshi
10th March 2007, 00:42
Could you add "fps" option for mkv files because my movie plays to fast. BTW! How to force fps in mkvmerge?
Are you talking about TS files or EVO files? I could add a "fps" option, but it would mean that there'd be a second step necessary. Right now the tool creates a MKV file by using Haali's filters. Forcing fps would mean running the newly created MKV file through mkvmerge. Possible, but the whole process will take about twice as long as it takes now.
Atak_Snajpera
10th March 2007, 07:57
I mean TS
madshi
10th March 2007, 10:06
Hmmmm... That's strange. All TS files I've muxed seem to work fine for me. What kind of TS file is that? Where did you record/get it from? MPEG2 or H.264? What FPS is it supposed to have?
bob0r
22nd March 2007, 01:22
BBC-HD H.264 MBAFF 1440x1088 (AR 16:9) 25fps @ ~18mbit
These mostly fail when 5GB or more.... probably due to the Haali muxer though.
Our hope lies with Neuron2!
madshi
22nd March 2007, 09:08
BBC-HD H.264 MBAFF 1440x1088 (AR 16:9) 25fps @ ~18mbit
These mostly fail when 5GB or more.... probably due to the Haali muxer though.
In my experience BBC streams tend to have more glitches in them compared to SkyHD/PremiereHD streams. Don't know why. Maybe BBC is harder to receive. Anyway, glitches in the stream may bring Haali into problems. I've not had any problems with muxing glitch free PremiereHD streams yet. They're all about 12-25GB.
bob0r
22nd March 2007, 16:40
Yup, could be, though the streams i tried are all without stream errors.
Good news
C:\Program Files\Haali\MatroskaSplitter\gdsmux.exe now can mux MBAFF flawlessly into .mkv, even including audio, if the audio stream doesn't change (many BBC stream change from 5.1 to 2.0 vise versa, so i first cut the .ts using dd.exe)
The latest version of h264tsto, can mux video-only into .mkv? Or will it always try video+audio?
If so, an option for video (or audio) only would be nice.
madshi
22nd March 2007, 17:12
C:\Program Files\Haali\MatroskaSplitter\gdsmux.exe now can mux MBAFF flawlessly into .mkv, even including audio, if the audio stream doesn't change (many BBC stream change from 5.1 to 2.0 vise versa, so i first cut the .ts using dd.exe)
Where h264tsto fails? That's interesting. So gdsmux is internally probably not using Haali's Media Splitter + Muxer?
The latest version of h264tsto, can mux video-only into .mkv? Or will it always try video+audio?
If so, an option for video (or audio) only would be nice.
It will always do video+audio. I can add options for only video or audio muxing. No big problem.
Thunderbolt8
28th April 2007, 02:10
i have problem with demuxing the video of skyHD caps (12-22 gb of size). when demuxing to rawfile with graphedit dump.ax , I only get a file with the ending .rawvideo, but not .h264, meaning I guess the video format is unknown. as result the final muxed .mkv file is either not working properly or has some glitches at some places, which are not in the source.
cyberlink demuxer doesnt work at all for me, same for any other .ax demuxers I tried (hdtvdump), I only get a "getting dump instance failed" message then.
similar problems, when trying to demux to .mkv, the final muxed .mkv file with audio in it is also not or only hard playable or has the same glitches.
bob0r
28th April 2007, 03:06
Try mux it with: http://haali.cs.msu.ru/mkv/MatroskaSplitter.exe 27/04/2007
Haali fixed 2 .ts issues preventing muxing/seeking of .ts files.
Infact, all my .ts now play like .mkv (meaning very smooth)
Use C:\Program Files\Haali\MatroskaSplitter\gdsmux.exe to direct convert .ts to .mkv
If it fails try with a shorter sample, if that fails also, please get me the sample, or if needed the whole .ts, and ill get it to Haali. Haali LOVES .ts and he can't wait to get more corrupted .ts files! :p
Thunderbolt8
28th April 2007, 12:19
the new version of the splitter seems to be really good, it completely copied both the video and also the audio track into mkv and its playable without any problems, though the audio track contains 18 errors via projectx and gets out of sync when demuxing and remuxing it manually
still, I tried putting the .mkv file into mkvmerge and remuxed it without alternating anything, just changing the filename to see if this works, since I sometimes will have to remux, because of adding another audio track (and changing the video fps via timestamps), but the remuxed .mkv file wasnt playable again then (closes directly after opening), with mpc and haali, though it worked before when it was demuxed via gdsmux and, as already said, I didnt make any changes, just remuxed to another file name.
tried it also again with another skyHD cap, but same problem.
btw. seems you cant add dts tracks to gdsmux, though adding ac3 tracks works for me
madshi
28th April 2007, 13:27
I generally don't advice to demux h264 raw streams. Too many problems with that approach. It's better to directly mux to MKV and leave it there. Never had any serious problems that way. Of course streams with glitches can be troublesome. I usually throw such streams away and just rerecord the movie. The movies are repeated often enough to do that - at least on PremiereHD. Don't know about SkyHD, but I guess it's not much different there...
Thunderbolt8
28th April 2007, 13:45
the problem is I need to remux to add another audio track and also maybe to change the video fps according to that then :/
and, as already written, the glitches are not to be seen in the source, they only appear after the muxing with mkvmerge.
well, what can I do in then ? I mean its fine in those cases I dont need to add or alter anything. but if, I still have a problem.
madshi
28th April 2007, 15:27
the problem is I need to remux to add another audio track and also maybe to change the video fps according to that then :/
Remuxing is ok, it has always worked for me. What I meant was that I don't recommend demuxing the raw h264 stream.
well, what can I do in then ? I mean its fine in those cases I dont need to add or alter anything. but if, I still have a problem.
Even if you never ever demux the raw h264 stream? Well, then you have a problem I never experienced yet. But as I said, almost all my TS streams are 100% glitch free.
Thunderbolt8
28th April 2007, 17:05
I can also remux the way that I take the muxed .mkv file from gdsmux, that I got from the .ts source and put it then as source into mkvmerge again and then make my changes I want to have. then I dont really demux the stream, but I remux it from .mkv to .mkv. but as already said, the .mkv file of that then closes as soon as I open it again with mpc & ffdshow. with vlc, you can open it on a limited basis, at the beginning is 0,5 seconds of grey screen, then the picture comes, but you cant forward or anything, since it would close immediately.
again, the source stream is glitch free, the glitches only come when I try to demux the video (either with graphedit dump or mencoder) and then after the muxing with mkvmerge. then I got some glitches in it.
bob0r
28th April 2007, 18:58
If you can produce a sample with these issues, i am sure Haali can look at it.
Up to 12GB is doable :D
Thunderbolt8
28th April 2007, 23:24
hm, whats the adress where I can send it to hali ?
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.