PDA

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.

neuron2
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.

neuron2
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, 03: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, 04: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, 13: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, 14: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, 14: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, 16: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, 18: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, 19: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
29th April 2007, 00:24
hm, whats the adress where I can send it to hali ?

wiak
4th June 2007, 14:27
this
http://nwgat.net/ts/NTV%20722000%2003-28%2022-06-42.ts
isnt working
its a Norwegian NTV h264+he-aac test clip, it wont mux sound only video :(

ninjaw
23rd October 2007, 00:43
Hello, I captured French HDTV and it's real pain in the ass, basically in the TS, I got 3 channel, 2+1+3 audio channels ac3 or not, and the video is not allways widescreen.

Elecard XMuxer is really really slow, like impossible slow, and refuse to work most of time.

Hopefully Haali seems to work fine, but EACH player I tried gave corrupted screens, only Tmpgenc Xpress 4 can convert me these file pretty fast... but only with random videos, I succesfully acceded other vidz by tweaking 5x Haali while tmpgenc opening .. but actually that gave me false screen size info.

So right now I cant do anything with my TS.

I know that one channel is 1900x1080 and another 1400x1080

madshi
23rd October 2007, 10:23
Try Haali's Media Splitter -> Haali's Matroska Muxer in GraphEdit. Does that work?

pomo
7th December 2007, 03:27
thx for this nice tool madshi.

just an idea that would benefit the lazy people (like me) ;) :

could you add the possibility that if only specifiying a source.ts, h264tsto will use the same directory and filename for the destination file and assume muxing to mkv?

like
h264tsto x:\path_to\capture.ts
would be a shorthand for
h264tsto x:\path_to\capture.ts x:\path_to\capture.mkv

that way (afaik), drag&drop onto the exe as well as a shortcut in the SendTo folder (right-click -> Send To -> ..) should work.

nothing important :D

madshi
7th December 2007, 14:58
h264tsto v1.3 released

http://madshi.net/h264tsto.zip

* you don't need to specify a destination file name, anymore
* new switch "-24p" rewrites timestamps to 23.976 by using mkvtoolnix
* switch "-24p" is automatically activated for evo/m2ts source files
* using Haali's Media Splitter for demuxing now
* added support for WMV source files
More information see first post of this thread.

Yod4z
10th December 2007, 20:19
I can't demux the m2ts file from my AVCHD camcorder, i got this error:

Demuxing source file streams. Please wait..
Getting "Video 1" Dump instance failed.

I can put in some webspace the file if you want some test file


I use the haali version from 03/06/2007

madshi
10th December 2007, 21:27
Hello, you need to get and register the "dump" filter. It ships with GraphEdit. So download GraphEdit. Then inside you'll find "dump.ax". Open the command prompt on the GraphEdit folder, then do "regsvr32 dump.ax". This will register the dump filter. Afterwards the error message you're getting from h264tsto should be gone for good.

Snowknight26
11th December 2007, 05:42
Would you be able to add the command -audioonly?

Yod4z
11th December 2007, 08:54
Hello, you need to get and register the "dump" filter. It ships with GraphEdit. So download GraphEdit. Then inside you'll find "dump.ax". Open the command prompt on the GraphEdit folder, then do "regsvr32 dump.ax". This will register the dump filter. Afterwards the error message you're getting from h264tsto should be gone for good.

thanks ;) this work

madshi
11th December 2007, 09:01
Would you be able to add the command -audioonly?
Sure.

Mitchjs
12th December 2007, 07:22
Madshi, 1.3 is GREAT!!!

really does well...

could you add some way of choosing the audio streams

for instance, i have a .m2ts that has 4 audio streams, i just want 1 of them or sometimes 2

just need some way of picking audio tracks

maybe a -list command, which just lists out what
items are in the source file too

would help

thanks!

mitch

madshi
12th December 2007, 08:04
Madshi, 1.3 is GREAT!!!

really does well...

could you add some way of choosing the audio streams

for instance, i have a .m2ts that has 4 audio streams, i just want 1 of them or sometimes 2

just need some way of picking audio tracks

maybe a -list command, which just lists out what
items are in the source file too
Unfortunately listing the items are difficult. All I could do is list the number of audio streams. But listing their type and properties is not really possible. Choosing the audio stream indexes you want to keep would probably be possible. But wouldn't it be possible to just rerun the final result through mkvtoolnix? You can easily get rid of unwanted audio streams with mkvtoolnix. So I'm not sure if this is really a functionality that h264tsto must provide?

Mitchjs
12th December 2007, 22:24
madshi, i did, rerun it through mkvtoolnix, and guess what, the new MKV didnt play!!!!!
ill try it again...

i know your tools is only as good as haalis demux
today i had it hang forever on a .evo

mitch

Atak_Snajpera
14th December 2007, 19:50
Will you be able to add -audioonly switch?

madshi
14th December 2007, 20:35
Will you be able to add -audioonly switch?
Sure.

Mitchjs
14th December 2007, 23:43
listing out the audio tracks is fine, and some way to keep the ones i want...

-audiotrack=0,1,2

maybe?

mitch

Thunderbolt8
15th December 2007, 04:53
does this tool any different when for example using graphedit and haali filters (media splitter & matroska muxer) to remux the video stream from a .m2ts or .evo file to .mkv?

Atak_Snajpera
16th December 2007, 01:55
Could you also add switch to change frame rate? My ts files are always muxed with default 25 fps instead of real 29.97.

madshi
16th December 2007, 10:19
does this tool any different when for example using graphedit and haali filters (media splitter & matroska muxer) to remux the video stream from a .m2ts or .evo file to .mkv?
This tool is identical to using "Haali Simple Media Splitter -> Haali Matroska Muxer". The "Simple" Media Splitter outputs all audio tracks, the non-Simple Media Splitter only outputs one audio track at a time.

There's some automated post processing involved for m2ts and evo files, though. Basically h264tsto automatically locates mkvtoolnix and rewrites the timestamps to 24p in a 2nd step. Of course you can do that manually yourself. h264tsto just automates it.

madshi
16th December 2007, 10:20
Could you also add switch to change frame rate? My ts files are always muxed with default 25 fps instead of real 29.97.
I'm a bit confused. Can you please let me know:

(1) Which framerate does the original ts file have?
(2) Which framerate do you get from gdsmux/GraphEdit?
(3) Which framerate do you get from h264tsto?
(4) Which framerate do you *want* to get?

musicman2311
16th December 2007, 16:09
hi - question - does this tool manipulate settings in the original bitstream ? when i usually try to create a blu ray of elementary video streams from hd-dvd i get some error by the authring tool claiming some flag is illegal.
i would intend to use this tool to make mkv and then use tsremux to make m2ts - is this possible ? thanks

Atak_Snajpera
16th December 2007, 23:33
Samples from latest Canon HG10 camcorder
http://file.meyersproduction.com/hg10/00011.MTS.zip
http://file.meyersproduction.com/hg10/00019.MTS.zip

1) 29.97
2) gdsmux also muxes to 25 fps
3) 25 fps
4) 29.97

BTW MTS = M2TS

madshi
18th December 2007, 20:58
does this tool any different when for example using graphedit and haali filters (media splitter & matroska muxer) to remux the video stream from a .m2ts or .evo file to .mkv?
Not really. Well, it uses the Haali Simple Media Splitter instead of the normal Haali Media Splitter because the "Simple" one allows muxing more than 1 audio track. Furthermore I'm doing post processing by automating another mkvtoolnix run to rewrite the timestamps. But everything h264tsto does you can also do by using GraphEdit and mkvtoolnix manually. h264tsto is just automating things...

madshi
18th December 2007, 20:59
hi - question - does this tool manipulate settings in the original bitstream ? when i usually try to create a blu ray of elementary video streams from hd-dvd i get some error by the authring tool claiming some flag is illegal.
i would intend to use this tool to make mkv and then use tsremux to make m2ts - is this possible ? thanks
This tool does not manipulate anything. So I don't think it will help in your situation.

madshi
18th December 2007, 21:00
Samples from latest Canon HG10 camcorder
http://file.meyersproduction.com/hg10/00011.MTS.zip
http://file.meyersproduction.com/hg10/00019.MTS.zip

1) 29.97
2) gdsmux also muxes to 25 fps
3) 25 fps
4) 29.97

BTW MTS = M2TS
I'll have a look at these. But please be aware that I'm only automating Haali's filters, so in the end there might not be much I can do, if Haali's filters do something wrong...

madshi
18th December 2007, 21:01
h264tsto v1.4 released

http://madshi.net/h264tsto.zip

* switch "-audioonly" option added

Atak_Snajpera
18th December 2007, 21:20
I'll have a look at these. But please be aware that I'm only automating Haali's filters, so in the end there might not be much I can do, if Haali's filters do something wrong...

I know very well how your tool works therefore I asked you for option to fix fps manually.

madshi
18th December 2007, 22:03
So an option to specify a specific fps value would do the trick?

Atak_Snajpera
18th December 2007, 22:11
exactly

madshi
18th December 2007, 22:30
h264tsto v1.5 released

http://madshi.net/h264tsto.zip

* new switch "-25p" rewrites timestamps to 25.000
* new switch "-30p" rewrites timestamps to 29.970

Mitchjs
18th December 2007, 22:44
madshi, my audio track selection option :)

-audio1,2,3

would include audio tracks 1,2,3

if a file has like 5 of them... its just the 1st 3 tracks, in the pid order... if it can be done :)

thanks!!!!!

mitch

Atak_Snajpera
19th December 2007, 00:49
Thank you for update :)

one suggestion:
if -audioonly is used output extension should be .mka

madshi
19th December 2007, 08:25
madshi, my audio track selection option :)
Didn't forget ya, your wish is just a bit more complicated than the other wishes were, so you'll need to have some more patience...

Mitchjs
19th December 2007, 08:31
No problem

thanks!!!!

mitch

Atak_Snajpera
19th December 2007, 13:18
Sorry but I have another request :)

-demuxvideoonly and -demuxaudioonly instead of demux

I would also rename -videoonly and -audioonly to -remuxvideoonly and -remuxaudioonly

madshi
19th December 2007, 13:20
Sorry but I have another request :)

-demuxvideoonly and -demuxaudioonly instead of demux

I would also rename -videoonly and -audioonly to -demuxvideoonly and -demuxaudioonly
What would that be good for? You can combine "-demux" with "-video/audioonly" right now and have the same effect! At least that's how it was intended by me. Does it not work that way?

Atak_Snajpera
19th December 2007, 13:47
ups :)

I didn't realise I can do that. I'am an idiot :) sorry

madshi
19th December 2007, 17:27
No problem, mate... :)

ACrowley
23rd December 2007, 09:32
Feature Request :

- Display Delay Values
- Joining Input Files
Short : All Features eac3to offers :)

- Framecount Value for the Video like the "calculated Framecount" in Evodemux. Its very important for HDDVD Video encoding

THX

madshi
23rd December 2007, 10:08
Feature Request :

- Display Delay Values
- Joining Input Files
Short : All Features eac3to offers :)

- Framecount Value for the Video like the "calculated Framecount" in Evodemux. Its very important for HDDVD Video encoding
Then why don't you use eac3to instead? :) Ok, eac3to doesn't support m2ts/ts yet. Is that the reason?

Anyway, h264tsto is a simple automation tool and I'm not planning to upgrade it to a full powered video application. So I don't think I will add detection for delay values and for joining input files etc. That would need a whole lot of development time which I simply don't have. Right now all h264tsto does is automating some DirectShow filters. The features you're asking for would require writing some "real" code.

amdxpdevil
13th January 2008, 11:15
Thx for the tool! it is great.

But I do have some problem with the new version 1.5.

when I try to demux a .TS file, it only output as a .mpv and .mpa file. Is there anyway I can demux as .h264, .vc1, .ac3, etc? Or is there something I did wrong?

madshi
13th January 2008, 11:17
Thx for the tool! it is great.

But I do have some problem with the new version 1.5.

when I try to demux a .TS file, it only output as a .mpv and .mpa file. Is there anyway I can demux as .h264, .vc1, .ac3, etc? Or is there something I did wrong?
Just rename the files to the correct extension. h264tsto only knows if a file is video or audio. It doesn't know which format exactly they are. That's why it uses the "mpv" and "mpa" extensions.

amdxpdevil
18th January 2008, 06:36
Just rename the files to the correct extension. h264tsto only knows if a file is video or audio. It doesn't know which format exactly they are. That's why it uses the "mpv" and "mpa" extensions.

But the problem is that all the .mpv I rename is not playable.

.h264, .mpg etc... does anyone face this issue?

Best

Atak_Snajpera
18th January 2008, 08:07
You get Elementary Stream not Program Stream.
If you want to play it use MKVMerge to mux to .mkv container. You will have to specify correct fps.

amdxpdevil
18th January 2008, 12:48
You get Elementary Stream not Program Stream.
If you want to play it use MKVMerge to mux to .mkv container. You will have to specify correct fps.

I was trying to do that, but somehow it just won't play.

Do I need to specifiy the fps when I extract the .ts file?

Best

Thunderbolt8
25th January 2008, 23:36
heres a sample which h264tsto didnt accept and for which I had to use xport to de- and remux it to .mkv (munich h264 from premiereHD)
http://www.sendspace.com/file/xh8l1q

according to xport there were some frame errors at the beginning, maybe this was causing the error. the command line was "xport 129 1 2"
might be interesting for your own .ts remuxer in the future.

Atak_Snajpera
25th January 2008, 23:53
Did you check TS file in Transport Stream Packed editor. Make sure also that your TS file starts at key frame!

madshi
26th January 2008, 09:37
heres a sample which h264tsto didnt accept and for which I had to use xport to de- and remux it to .mkv (munich h264 from premiereHD)
http://www.sendspace.com/file/xh8l1q

according to xport there were some frame errors at the beginning, maybe this was causing the error. the command line was "xport 129 1 2"
might be interesting for your own .ts remuxer in the future.
There's not much h264tsto can do about it. It's simple automating the Haali filters. So if the Haali filters don't accept the input stream, there's nothing h264tsto can do (short of adding loads of code to try to repair the stream which I'm not going to add).

See Atak_Snajpera's suggestions. Also you could use TsSplitter or a hex editor to cut of the damaged/corrupted start of the TS stream. Afterwards h264tsto should do it's job just fine.

wiak
26th January 2008, 23:11
here is a .ts file to wrap your heads around
http://www.sendspace.com/file/qyjkzf
its H.264 + HE-AAC with LATM
would be cool if h264tsto removes LATM etc :cool:
so it goes into mkv

madshi
26th January 2008, 23:54
I don't even know what LATM is... :o

wiak
27th January 2008, 00:42
I don't even know what LATM is... :o
http://www.rfc-editor.org/rfc/rfc3016.txt
:p

madshi
27th January 2008, 10:24
Ah well, as I've said in the past, h264tsto is really a simple tool which does not much more than automating Haali's filters. What Haali's filters don't accept, h264tsto will not be able to handle, either. And there's not much I can do about it. Except throwing away Haali's filters and reinvent the wheel myself - which I'm not going to do...

Snowknight26
18th February 2008, 06:25
Would you be able to add the ability to use more than one file at a time, a la eac3to?

For example:
h264tsto sourceFile[+sourceFile2] [destFile] [-options]


Also, do you have any plans to remove dependence on dump.ax, perhaps using an internal method?

madshi
18th February 2008, 09:33
Would you be able to add the ability to use more than one file at a time, a la eac3to?

For example:
h264tsto sourceFile[+sourceFile2] [destFile] [-options]
That's not possible cause there's no way for me to tell Haali's Media Splitter to handle multiple files at a time.

Also, do you have any plans to remove dependence on dump.ax, perhaps using an internal method?
What would that be good for (except for being "nicer")?

Snowknight26
18th February 2008, 14:41
Sorry, I meant remove dependence on Haali's Media Splitter in favor of an internal splitter.

madshi
18th February 2008, 14:47
Sorry, I meant remove dependence on Haali's Media Splitter in favor of an internal splitter.
No chance in hell. h264tsto is nothing but a little automation tool for Haali's filters. What you're looking for will sooner or later be implemented in eac3to.

Snowknight26
19th February 2008, 00:12
Good to hear!

ACrowley
26th February 2008, 15:28
@Madshi

An Option to select a specified AudioTrack for Remuxing would be nice

And can you add EVO Rebuilding ?

Atak_Snajpera
7th March 2008, 18:38
@Madshi
I have simple request. In order to remux *.evo for example to *.mkv you need MKVToolnix installed. How about using mkvmerge.exe located in the sample directory along with h264tsto.exe?

madshi
8th March 2008, 19:16
Why do you use h264tsto for EVO -> MKV remuxing? eac3to is the better choice for that and doesn't need mkvtoolnix.

madshi
8th March 2008, 19:17
And can you add EVO Rebuilding ?
Nope. I'm wondering why people want to use h264tsto instead of eac3to? eac3to can rebuild EVOs.

Atak_Snajpera
8th March 2008, 22:14
I'm wondering why people want to use h264tsto instead of eac3to?

Because it has weird name. How was I supposed to know that? eac3to sounds like audio conversion tool. Don't think?

madshi
9th March 2008, 20:42
Because it has weird name. How was I supposed to know that? eac3to sounds like audio conversion tool. Don't think?
You're quite right. The name is misleading. eac3to started as an audio only conversion tool but grew into an audio/video tool. The problem is that it's quite well known now under the name "eac3to", so renaming it now would be a disadvantage.

Ghitulescu
3rd September 2009, 14:14
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

Is there any plan to extend the demuxing to other types than audio/video, like teletext and subs, that normally exist in a SAT HDTV, you know like in ProjectX?

madshi
3rd September 2009, 14:24
No, eac3to does all that. h264tsto is dead.

Ghitulescu
4th September 2009, 18:01
No, eac3to does all that. h264tsto is dead.

Glad to hear that eac3to can process the subtitles (from TXT and SUB) of a HDTV stream (.TS or .M2TS), since no documentation known to me ever touched this subject.

madshi
4th September 2009, 18:05
Ehm, well, some subtitle types are supported, some are not. But that's not a topic for this thread.