Log in

View Full Version : smartLabs tsMuxeR: Transport Stream muxer


Pages : 1 2 3 4 5 6 [7] 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85

jamos
23rd February 2008, 17:48
Hopefully, it's for padding the stream for a constant transport bitrate.

what would that buy us?

Guest
23rd February 2008, 18:20
It's for live transmission environments. Set-top boxes (for receiving broadcasts such as DVB-S) want a constant transport bitrate. Buffers need to be kept from overflowing or underflowing. There is no file on disk that you can access when you need more data.

jamos
23rd February 2008, 19:28
It's for live transmission environments. Set-top boxes (for receiving broadcasts such as DVB-S) want a constant transport bitrate. Buffers need to be kept from overflowing or underflowing. There is no file on disk that you can access when you need more data.

ok cool.

Underground78
23rd February 2008, 21:28
As the program is released under GPL is the source code available? Thank you.

It doesn't seem to be released under GPL ::confused:

Freeware Licence Agreement
This licence agreement only applies to the free version of this software.

Terms and Conditions
BY DOWNLOADING, INSTALLING, USING, TRANSMITTING, DISTRIBUTING OR COPYING THIS SOFTWARE ("THE SOFTWARE"), YOU AGREE TO THE TERMS OF THIS AGREEMENT (INCLUDING THE SOFTWARE LICENCE AND DISCLAIMER OF WARRANTY) WITH SmartLabs THE OWNER OF ALL RIGHTS IN RESPECT OF THE SOFTWARE.

PLEASE READ THIS DOCUMENT CAREFULLY BEFORE USING THE SOFTWARE.

IF YOU DO NOT AGREE TO ANY OF THE TERMS OF THIS LICENCE THEN DO NOT DOWNLOAD, INSTALL, USE, TRANSMIT, DISTRIBUTE OR COPY THE SOFTWARE.

THIS DOCUMENT CONSTITUES A LICENCE TO USE THE SOFTWARE ON THE TERMS AND CONDITIONS APPEARING BELOW.

The Software is licensed to you without charge for use only upon the terms of this licence, and SmartLabs reserves all rights not expressly granted to you. SmartLabs retains ownership of all copies of the Software.

1. Licence
You may use the Software without charge.

You may distribute exact copies of the Software to anyone.

2. Restrictions
SmartLabs reserves the right to revoke the above distribution right at any time, for any or no reason.

YOU MAY NOT MODIFY, ADAPT, TRANSLATE, RENT, LEASE, LOAN, SELL, REQUEST DONATIONS OR CREATE DERIVATE WORKS BASED UPON THE SOFTWARE OR ANY PART THEREOF.

The Software contains trade secrets and to protect them you may not decompile, reverse engineer, disassemble or otherwise reduce the Software to a humanly perceivable form. You agree not to divulge, directly or indirectly, until such trade secrets cease to be confidential, for any reason not your own fault.

3. Termination
This licence is effective until terminated. The Licence will terminate automatically without notice from SmartLabs if you fail to comply with any provision of this Licence. Upon termination you must destroy the Software and all copies thereof. You may terminate this Licence at any time by destroying the Software and all copies thereof. Upon termination of this licence for any reason you shall continue to be bound by the provisions of Section 2 above. Termination will be without prejudice to any rights SmartLabs may have as a result of this agreement.

4. Disclaimer of Warranty, Limitation of Remedies
TO THE FULL EXTENT PERMITTED BY LAW, SMARTLABS HEREBY EXCLUDES ALL CONDITIONS AND WARRANTIES, WHETHER IMPOSED BY STATUTE OR BY OPERATION OF LAW OR OTHERWISE, NOT EXPRESSLY SET OUT HEREIN. THE SOFTWARE, AND ALL ACCOMPANYING FILES, DATA AND MATERIALS ARE DISTRIBUTED "AS IS" AND WITH NO WARRANTIES OF ANY KIND, WHETHER EXPRESS OR IMPLIED. SMARTLABS DOES NOT WARRANT, GUARANTEE OR MAKE ANY REPRESENTATIONS REGARDING THE USE, OR THE RESULTS OF THE USE, OF THE SOFTWARE WITH RESPECT TO ITS CORRECTNESS, ACCURACY, RELIABILITY, CURRENTNESS OR OTHERWISE. THE ENTIRE RISK OF USING THE SOFTWARE IS ASSUMED BY YOU. SMARTLABS MAKES NO EXPRESS OR IMPLIED WARRANTIES OR CONDITIONS INCLUDING, WITHOUT LIMITATION, THE WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE WITH RESPECT TO THE SOFTWARE. NO ORAL OR WRITTEN INFORMATION OR ADVICE GIVEN BY SMARTLABS, IT'S DISTRIBUTORS, AGENTS OR EMPLOYEES SHALL CREATE A WARRANTY, AND YOU MAY NOT RELY ON ANY SUCH INFORMATION OR ADVICE.

IMPORTANT NOTE: Nothing in this Agreement is intended or shall be construed as excluding or modifying any statutory rights, warranties or conditions which by virtue of any national or state Fair Trading, Trade Practices or other such consumer legislation may not be modified or excluded. If permitted by such legislation, however, SmartLabs' liability for any breach of any such warranty or condition shall be and is hereby limited to the supply of the Software licensed hereunder again as SmartLabs at its sole discretion may determine to be necessary to correct the said breach.

IN NO EVENT SHALL SMARTLABS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, AND THE LOSS OF BUSINESS INFORMATION OR COMPUTER PROGRAMS), EVEN IF SMARTLABS OR ANY SMARTLABS REPRESENTATIVE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. IN ADDITION, IN NO EVENT DOES SMARTLABS AUTHORISE YOU TO USE THE SOFTWARE IN SITUATIONS WHERE FAILURE OF THE SOFTWARE TO PERFORM CAN REASONABLY BE EXPECTED TO RESULT IN A PHYSICAL INJURY, OR IN LOSS OF LIFE. ANY SUCH USE BY YOU IS ENTIRELY AT YOUR OWN RISK, AND YOU AGREE TO HOLD SMARTLABS HARMLESS FROM ANY CLAIMS OR LOSSES RELATING TO SUCH UNAUTHORISED USE.

5. General
All rights of any kind in the Software which are not expressly granted in this Agreement are entirely and exclusively reserved to and by SmartLabs.

This agreement contains the entire Agreement between the parties hereto with respect to the subject matter hereof, and supersedes all prior agreements and/or understandings (oral or written). Failure or delay by SmartLabs in enforcing any right or provision hereof shall not be deemed a waiver of such provision or right with respect to the instant or any subsequent breach. If any provision of this Agreement shall be held by a court of competent jurisdiction to be contrary to law, that provision will be enforced to the maximum extent permissible, and the remaining provisions of this Agreement will remain in force and effect.

Guest
23rd February 2008, 22:01
It doesn't seem to be released under GPL ::confused: I opened the GUI and hit the About tab.

menlvd
23rd February 2008, 23:37
what is the Bitrate tab for??

added for getting patched ts file with constant bitrate. needed for streaming

musicman2311
24th February 2008, 00:57
question to the author of TsMuxer - can it be that vc1 is not 'fully' supported yet ?
Of course the tool recognizes and even muxes vc1, but only when 'all files' is selected rather than 'supported files'.

when muxing vc1 (regardless of 1080i or 1080p) playback is not smooth

jamos
24th February 2008, 01:15
added for getting patched ts file with constant bitrate. needed for streaming

so muxed mkvs into .ts using a CBR will play better streaming through my network to my PS3?

menlvd
24th February 2008, 02:37
so muxed mkvs into .ts using a CBR will play better streaming through my network to my PS3?
U may try that's one and give me a result, not fully tested right now! need more time for this

menlvd
24th February 2008, 02:42
question to the author of TsMuxer - can it be that vc1 is not 'fully' supported yet ?
Of course the tool recognizes and even muxes vc1, but only when 'all files' is selected rather than 'supported files'.

when muxing vc1 (regardless of 1080i or 1080p) playback is not smooth

and U may try ver 1.2.10 and 1.3.1
use vc1conv for vc1 raw and then mux again resulting vc1 raw if it's steel problem with smooth playback UL short samples of your file

musicman2311
24th February 2008, 02:49
and U may try ver 1.2.10 and 1.3.1
use vc1conv for vc1 raw and then mux again resulting vc1 raw if it's steel problem with smooth playback UL short samples of your file

Thanks, I will try again and let you know.

Guest
24th February 2008, 06:17
@menlvd

What's the story on source code? Is it GPL or not?

t1ger
24th February 2008, 10:55
Thanks for an really good tool

I have used this to remux mkv to m2ts for PS3 (only AC3 sound)

This is how I did this

I started with changing the h.264 level directly in the mkv with binreplace (from 5.1 to 4.1)

binreplace movie.mkv 640033 640029
Run this 2 times on the file
Open up the mkv in tsremuxer 1.3.1
Now you see the level 4.1 for h.264

Chose m2ts as output

Now either stream the file with tversity (change the name to movie.ts after remuxing) or burn to DVD

Fast FF works, no re encoding needed.

If you have DTS sound I believe you need to burn it as a BD, else it won’t play.
Maybe someone can describe good solution for that.

B4tm4n
24th February 2008, 11:35
Why not just change the level with tsMuxer ?
The new version (1.3.1) does it correctly now.
And you do know your posting in the tsMuxer thread and not the tsRemuxer.



Thanks for an really good tool

I have used this to remux mkv to m2ts for PS3 (only AC3 sound)

This is how I did this

I started with changing the h.264 level directly in the mkv with binreplace (from 5.1 to 4.1)

binreplace movie.mkv 640033 640029
Run this 2 times on the file
Open up the mkv in tsremuxer 1.3.1
Now you see the level 4.1 for h.264

Chose m2ts as output

Now either stream the file with tversity (change the name to movie.ts after remuxing) or burn to DVD

Fast FF works, no re encoding needed.

If you have DTS sound I believe you need to burn it as a BD, else it won’t play.
Maybe someone can describe good solution for that.

t1ger
24th February 2008, 11:48
No I did not know that you could change Level with 1.3.1
and that it worked
And yes I only used txmuxer to create m2ts file to stream (no tsremuxer).

Is there any working way to create h.264 DTS disc in few steps?

Why not just change the level with tsMuxer ?
The new version (1.3.1) does it correctly now.
And you do know your posting in the tsMuxer thread and not the tsRemuxer.

drmpeg
24th February 2008, 12:24
I did some testing of tsMuxer 1.3.1 in CBR mode. There's a couple of obvious problems right away.

1) The stream should be stuffed with stuffing packets on PID 0x1fff, not PCR packets.

2) PCR must increment in each PCR packet. In tsMuxer 1.3.1, they decrement.

pcr = 45000 @ 49
pcr = 44999 @ 55
pcr = 44998 @ 61
pcr = 44997 @ 67
pcr = 44996 @ 73
pcr = 44995 @ 79
pcr = 44994 @ 85
pcr = 44993 @ 91
pcr = 44992 @ 97
pcr = 44991 @ 103
pcr = 44990 @ 109
pcr = 44989 @ 115
pcr = 44988 @ 121
pcr = 44987 @ 127
pcr = 44986 @ 133
pcr = 44985 @ 139
pcr = 44984 @ 145
pcr = 44983 @ 151
pcr = 44982 @ 157
pcr = 44981 @ 163
pcr = 44980 @ 169
pcr = 44979 @ 175
pcr = 44978 @ 181
pcr = 44977 @ 187
pcr = 44976 @ 193
pcr = 44975 @ 199
pcr = 44974 @ 205
pcr = 44973 @ 211
pcr = 44972 @ 217
pcr = 44971 @ 223
pcr = 44970 @ 229
pcr = 44969 @ 235
pcr = 44968 @ 241
pcr = 44967 @ 247
pcr = 44966 @ 253
pcr = 44965 @ 259
pcr = 44964 @ 265
pcr = 44963 @ 271
pcr = 44962 @ 277
pcr = 44961 @ 283
pcr = 44960 @ 289
pcr = 44959 @ 295
pcr = 44958 @ 301
pcr = 44957 @ 307
pcr = 44956 @ 313
pcr = 44955 @ 319
pcr = 44954 @ 325
pcr = 44953 @ 331
pcr = 44952 @ 337
pcr = 44951 @ 343
pcr = 44950 @ 349
pcr = 44949 @ 355
pcr = 44948 @ 361
pcr = 44947 @ 367
pcr = 44946 @ 373
pcr = 44945 @ 379
pcr = 44944 @ 385
pcr = 44943 @ 391
pcr = 44942 @ 397
pcr = 44941 @ 403
pcr = 44940 @ 409
pcr = 44939 @ 415
pcr = 44938 @ 421
pcr = 44937 @ 427
pcr = 44936 @ 433
pcr = 44935 @ 439
pcr = 44934 @ 445
pcr = 44933 @ 451
pcr = 44932 @ 457
pcr = 44931 @ 463
pcr = 44930 @ 469
pcr = 44929 @ 475
pcr = 44928 @ 481
pcr = 44927 @ 487
pcr = 44926 @ 493
pcr = 44925 @ 499
pcr = 44924 @ 505
pcr = 44923 @ 511
pcr = 44922 @ 517
pcr = 44921 @ 523
pcr = 44920 @ 529
pcr = 44919 @ 535
pcr = 44918 @ 541
pcr = 44917 @ 547
pcr = 44916 @ 553
pcr = 44915 @ 559
pcr = 44914 @ 565
pcr = 44913 @ 571
pcr = 44912 @ 577
pcr = 44911 @ 583
pcr = 44910 @ 589
pcr = 44909 @ 595
pcr = 44908 @ 601
pcr = 44907 @ 607
pcr = 44906 @ 613
pcr = 44905 @ 619
pcr = 44904 @ 625
pcr = 44903 @ 631
pcr = 44902 @ 637
pcr = 44901 @ 643
pcr = 44900 @ 649
pcr = 44899 @ 655
pcr = 44898 @ 661
pcr = 44897 @ 667
pcr = 44896 @ 673
pcr = 44895 @ 679
pcr = 44894 @ 685
pcr = 44893 @ 691
pcr = 44892 @ 697
pcr = 44891 @ 703
pcr = 44890 @ 709


The PCR should be sent in the order of every 50 milliseconds. The PCR should indicate the constant TS bitrate with the following equation from MPEG-2 Systems specification:

where:

i is the index of any byte in the Transport Stream for i″ < i < i′.

i″ is the index of the byte containing the last bit of the most recent program_clock_reference_base field applicable to the program being decoded.

PCR(i″) is the time encoded in the program clock reference base and extension fields in units of the system clock.

The transport rate is given by

transport_rate(i) = ((i' – i″ ) × system_clock_frequency) PCR(i') – PCR(i'')

where i′ is the index of the byte containing the last bit of the immediately following program_clock_reference_base field applicable to the program being decoded.

Ron

B4tm4n
24th February 2008, 12:43
Is there any working way to create h.264 DTS disc in few steps?

AFAIK you either transcode the dts to ac3 or you make a avchd or blu-ray disc. There are guides in this forum to do both.
At the moment the PS3 wont play dts audio from the xbm but that could change in the future, with a firmware update.

survivant001
24th February 2008, 15:33
Find a bug in tsmuxer

I try to mux .264 + ac3.. but it doesn't reconize the audio track. (this one in particuliar) with the version 1.2.8 I have a popup, but in 1.3.1.. it try to mux.. but never start.. stall at 0%

here the description
Audio #0
Codec : AC3
Bit rate mode : CBR
Bit rate : 256 Kbps
Channel(s) : 2 channels
Channel positions : L R
Sampling rate : 44.1 KHz

http://www.mediafire.com/?1hdnyoifuls

idbirch2
24th February 2008, 15:40
The audio description says only 2 channels - is this correct? My guess is that it's a TV cap and the first few frames are 2.0 channels and it then changes to 5 channels, I get this with ShyHD caps. You should try running your ac3 file through DelayCut and see if it says that "some stream parameters changed". If so, you need to cut the 2.0 channel frames out and re-load the ac3 into TSMuxer.

jamos
24th February 2008, 16:46
Is there any working way to create h.264 DTS disc in few steps?

just use tsremux using the output from tsmuxer having bypass audio alignment unchecked to build a bd structure and burn it using udf 2.5 format.

roman76r
24th February 2008, 17:21
drmpeg

I did some testing of tsMuxer 1.3.1 in CBR mode. There's a couple of obvious problems right away.

1) The stream should be stuffed with stuffing packets on PID 0x1fff, not PCR packets.

2) PCR must increment in each PCR packet. In tsMuxer 1.3.1, they decrement.


1. tsMuxer insert NUll stuffing packets with PID 0x1fff.
2. tsMuxer do not decrement PCR values. I test CBR TS files in "cisco ts analyzer".

Atak_Snajpera
24th February 2008, 21:54
Any progress with Blu-Ray structure?

I need also somebody to translate new readme.txt

Zow
25th February 2008, 01:44
Also, here is to subtitles.

There is nothing, and I mean NOTHING, out there, which is half-way user-friendly, and which allows ripping Blu-Ray with subtitles.

Does nobody watch non-English language movies anymore?!

Anyway, thanks Roman!:thanks:

jamos
25th February 2008, 10:07
Also, here is to subtitles.

There is nothing, and I mean NOTHING, out there, which is half-way user-friendly, and which allows ripping Blu-Ray with subtitles.

Does nobody watch non-English language movies anymore?!

Anyway, thanks Roman!:thanks:

you can do it with supread. but if you cannot import them into this program then your right.

drmpeg
25th February 2008, 12:07
drmpeg
1. tsMuxer insert NUll stuffing packets with PID 0x1fff.
2. tsMuxer do not decrement PCR values. I test CBR TS files in "cisco ts analyzer".
Sorry, I'm not sure what you are saying. Are you saying that these issues have been fixed and will appear in the next version of tsMuxer? If yes, then I await that version to test.

Or are you saying that version 1.3.1 works correctly for these issues? If yes, then we are not testing the same release.

Ron

roman76r
25th February 2008, 13:08
Or are you saying that version 1.3.1 works correctly for these issues? If yes, then we are not testing the same release
Version 1.3.1 work correclty. What software are you using for detect this problems?

P.S. There can be you program wrong detect PCR values because tsMuxer do not increment CC counter for PCR packets? It is valid:
ISO/IEC 13818-1

continuity_counter -- The continuity_counter is a 4 bit field incrementing with each Transport Stream packet
with the same PID. The continuity_counter wraps around to 0 after its maximum value. The
continuity_counter shall not be incremented when the adaptation_field_control of the packet equals '00' or '10'.

VisMan
25th February 2008, 17:43
@roman76r

Thank you very much for that great program!

Would it be possible to make an option how to mux AC3/DTS in the transportstream?
My problem is that i want to play ts on a stb (kathrein ufs-910) and all streams containing ac3 can't be played at all.
I was looking at the differences between recordings made by the receiver and the ones created by muxers.
All the muxers are creating stream_type 0x81 for AC3, but the receiver needs 0x06 (private stream containing PES) and an AC3 descriptor.
I found some documents that say that 0x81 is for ATSC and 0x06 is standard for DVB.

Any chance to implement such an option to the muxer?

menlvd
25th February 2008, 18:27
new beta ver
http://www.smlabs.net/tsMuxer/tsMuxeR_1.3.5.zip
added demux
fixed ac3 2.0 bug (detection & muxing)
small mkv fixes
and etc. :)

jamos
25th February 2008, 18:29
new beta ver
http://www.smlabs.net/tsMuxer/tsMuxeR_1.3.5.zip

nice! I will check it out.

The1n
25th February 2008, 19:03
Thank you for an exellent program.

jamos
26th February 2008, 01:11
new beta ver
http://www.smlabs.net/tsMuxer/tsMuxeR_1.3.5.zip
added demux
fixed ac3 2.0 bug (detection & muxing)
small mkv fixes
and etc. :)

nice recognizing and demuxing subtitles and lpcm streams would be great too for m2ts files.

nekrosoft13
26th February 2008, 01:46
new beta ver
http://www.smlabs.net/tsMuxer/tsMuxeR_1.3.5.zip
added demux
fixed ac3 2.0 bug (detection & muxing)
small mkv fixes
and etc. :)

thank you, keep them coming ;)

adalbertoma
26th February 2008, 03:50
Thanks!

Great updates!

Still looking forward to the subtitles support.

By any chance will it be coding soft subtitles? Not hardcoded to the video?

Also, there's a problem detecting AAC audio inside MKV container for some of the NhaNc3 releases.

Here's a sample:

http://rapidshare.com/files/46131223/300.2006.nHD.720p.x264.AAC.Sample.NhaNc3.mkv

Sorry if I shouldn't post links.

If I demux the container with mkv extract and add the tracks itself, it works ok. The problem is only when importing from the mkv container.

Anyway, thanks for the great software and hard work you've put on it.

drmpeg
26th February 2008, 10:58
Version 1.3.1 work correctly. What software are you using for detect this problems?

I'm using my xport demuxing program.

http://www.w6rz.net/xport.zip

Here's the summary from xport for the original TS stream that I'm testing with:

C:\xfer>xport -p parkrun1920_18mbps.ts 1 1 1
xport Transport Stream Demuxer 1.01
program = 1, video channel = 1, audio channel = 1
Program Number = 1 (0x0001), Program Map PID = 32 (0x0020)
Video PID = 49 <0x0031>, type = 0x02
ES descriptor for stream type 0x02 = 0x52, 0x01, 0x00
Audio PID = 50 <0x0032>, type = 0x81
ES descriptor for stream type 0x81 = 0x52, 0x01, 0x10
Sequence Header found
0 frames before first Sequence Header
Horizontal size = 1920
Vertical size = 1080
Aspect ratio = 16:9
Frame rate = 29.97
Sequence header bitrate = 17600000 bps
Progressive Sequence = 0
First Video PTS = 0x00025641
Audio Bitrate = 384000, Audio Sampling Rate = 48000
Audio Mode = 2/0, bsid = 4, bsmod = 0
First Audio PTS = 0x00025ace, 1165
ts rate = 19392616, video rate = 17557463
packets for pid 0 <0x0000> = 1217, first = 1, last = 783959
packets for pid 32 <0x0020> = 1217, first = 2, last = 783960
packets for pid 48 <0x0030> = 1242, first = 3, last = 784077
packets for pid 49 <0x0031> = 723772, first = 3443, last = 784526
packets for pid 50 <0x0032> = 16934, first = 8275, last = 784521
packets for pid 8191 <0x1fff> = 40144, first = 4, last = 784513
coded pictures = 1816, video fields = 3632
Ending audio to video PTS difference = -38129 ticks, -423.655556 milliseconds

C:\xfer>


This stream can be downloaded from:

http://www.w6rz.net/parkrun1920_18mbps.ts

I then take the demuxed (with xport) elementary streams from that file (http://www.w6rz.net/bits0001.mpv and http://www.w6rz.net/bits0001.mpa) and mux them with tsMuxer. Here's the options from the Meta file window:

MUXOPT --no-pcr-on-video-pid --new-audio-pes --cbr --bitrate=19392658
V_MPEG-2, "C:\xfer\bits0001.mpv"
A_AC3, "C:\xfer\bits0001.mpa"

Here's the summary for the tsMuxer stream:

C:\xfer>xport -p bits0001.ts 1 1 1
xport Transport Stream Demuxer 1.01
program = 1, video channel = 1, audio channel = 1
Program Number = 0 (0x0000), Program Map PID = 31 (0x001f)
Program Number = 1 (0x0001), Program Map PID = 256 (0x0100)
program descriptor = 0x88, 0x04, 0x0f, 0xff, 0x84, 0xfc
program descriptor = 0x05, 0x04, 0x48, 0x44, 0x4d, 0x56
Video PID = 4113 <0x1011>, type = 0x02
Audio PID = 4352 <0x1100>, type = 0x81
ES descriptor for stream type 0x81 = 0x05, 0x04, 0x41, 0x43, 0x2d, 0x33
Sequence Header found
0 frames before first Sequence Header
Horizontal size = 1920
Vertical size = 1080
Aspect ratio = 16:9
Frame rate = 29.97
Sequence header bitrate = 17600000 bps
Progressive Sequence = 0
First Video PTS = 0x00015f90
Audio Bitrate = 384000, Audio Sampling Rate = 48000
Audio Mode = 2/0, bsid = 4, bsmod = 0
First Audio PTS = 0x00015f90, 0
ts rate = 0, video rate = 17557444
packets for pid 0 <0x0000> = 22218, first = 1, last = 923052
packets for pid 31 <0x001f> = 22218, first = 3, last = 923054
packets for pid 256 <0x0100> = 22218, first = 2, last = 923053
packets for pid 4097 <0x1001> = 116093, first = 49, last = 923399
packets for pid 4113 <0x1011> = 723725, first = 50, last = 923406
packets for pid 4352 <0x1100> = 16934, first = 2869, last = 919872
coded pictures = 1816, video fields = 3632
Ending audio to video PTS difference = -39294 ticks, -436.600000 milliseconds

C:\xfer>

Note that there are no packets on PID 0x1fff and many many packets on PID 0x1001 (the PCR PID).

I also have Manzanita MP2TSA. Here's the dump for the original TS:

http://www.w6rz.net/parkrun1920_18mbps.txt

And the dump from the tsMuxer created TS:

http://www.w6rz.net/bits0001.txt

Note that the packet number summaries match between xport and MP2TSA.

To check for the PCR value decrementing issue, I've added a new option (-r) to xport to dump PCR's. Like so:

C:\xfer>xport -psr bits0001.ts 1 1 1
xport Transport Stream Demuxer 1.01
program = 1, video channel = 1, audio channe
Program Number = 0 (0x0000), Program Map PID
Program Number = 1 (0x0001), Program Map PID
program descriptor = 0x88, 0x04, 0x0f, 0xff,
program descriptor = 0x05, 0x04, 0x48, 0x44,
Video PID = 4113 <0x1011>, type = 0x02
Audio PID = 4352 <0x1100>, type = 0x81
ES descriptor for stream type 0x81 = 0x05, 0
pcr = 45000 at packet number 49
Sequence Header found
0 frames before first Sequence Header
Horizontal size = 1920
Vertical size = 1080
Aspect ratio = 16:9
Frame rate = 29.97
Sequence header bitrate = 17600000 bps
Progressive Sequence = 0
pcr = 44999 at packet number 57
pcr = 44998 at packet number 65
pcr = 44997 at packet number 73
pcr = 44996 at packet number 81
pcr = 44995 at packet number 89
pcr = 44994 at packet number 97
pcr = 44993 at packet number 105
pcr = 44992 at packet number 113
pcr = 44991 at packet number 121
pcr = 44990 at packet number 129
pcr = 44989 at packet number 137
pcr = 44988 at packet number 145
pcr = 44987 at packet number 153
pcr = 44986 at packet number 161
pcr = 44985 at packet number 169
pcr = 44984 at packet number 177
pcr = 44983 at packet number 185
pcr = 44982 at packet number 193
pcr = 44981 at packet number 201
pcr = 44980 at packet number 209
pcr = 44979 at packet number 217
pcr = 44978 at packet number 225
pcr = 44977 at packet number 233
pcr = 44976 at packet number 241
pcr = 44975 at packet number 249
pcr = 44974 at packet number 257
pcr = 44973 at packet number 265
pcr = 44972 at packet number 273
pcr = 44971 at packet number 281
pcr = 44970 at packet number 289


-psr means parse only, suppress bitrate display and dump PCR.

Although MP2TSA is reporting many errors in the tsMuxer stream, it's not as bad as it looks. I can help you work through all of these issues, but the starting point is good PCR's and correct stuffing.

BTW, Blu-ray .m2ts streams also follow the MPEG-2 T-STD model. If you can create a T-STD regular TS stream, a T-STD .m2ts stream can be created by just adding a fixed increment TP_extra_header (based on TS bitrate) and deleting the stuffing packets. Blu-ray .m2ts files are really 48 Mbps fixed rate TS streams that have been changed to .m2ts files by the above procedure.

Ron

roman76r
26th February 2008, 12:16
drmpeg
Ok. Today I'll download this stream and rechek tsMuxer.
MUXOPT --no-pcr-on-video-pid --new-audio-pes --cbr --bitrate=19392658

tsMuxer multiplex --bitrate param to 1000. 19392658 * 1000 > 2^32. I think a problem in it.

P.S. Heh. I have calculated this value. 19392658 * 1000 = 0x483E47A50 = 10010000011111001000111101001010000. tsMuxer has getted negative Bitrate value. :-)

BoMbY
26th February 2008, 12:46
I really like tsMuxeR, specially the .TS output which works great with my KISS Media Player (which dosn't like mkv).

So i would like to ask, if it is possible for you to build a DLL-version of the tsMuxeR, with a function to get the next x muxed bytes into a memory buffer? With which i would be able to create a server program to stream the correctly muxed result over the network to the player, without the necessity to convert the mkv files into a temporary file first.

And maybe some others would also like the opportunity to integrate your nice program into their own work?

roman76r
26th February 2008, 13:13
BoMbY
So i would like to ask, if it is possible for you to build a DLL-version of the tsMuxeR, with a function to get the next x muxed bytes into a memory buffer?
This function exists in full version of smart media core (PIPE or Milticast input/output media streams), but truncated in freeware version.

drmpeg
26th February 2008, 13:52
drmpeg
Ok. Today I'll download this stream and rechek tsMuxer.

tsMuxer multiplex --bitrate param to 1000. 19392658 * 1000 > 2^32. I think a problem in it.

P.S. Heh. I have calculated this value. 19392658 * 1000 = 0x483E47A50 = 10010000011111001000111101001010000. tsMuxer has getted negative Bitrate value. :-)
My bad. I was entering the bitrate in bps, while tsMuxer wants it in kbps. After entering the TS rate properly, tsMuxer works much better.

Sorry for the confusion.

EDIT: Since you can't have decimal points in the bitrate entry, it's impossible to set the ATSC bitrate of 19.392658 Mbps.

Ron

roman76r
26th February 2008, 14:11
drmpeg
Since you can't have decimal points in the bitrate entry, it's impossible to set the ATSC bitrate of 19.392658 Mbps.
OK. I'll change --bitrate parameter to bps at nearest version.

FXsan
26th February 2008, 22:57
@Atak_Snajpera, your PM box is full ;-)
and sorry, I dont speak Polish (possible german, english, french)

@drmpeg does your xport soft analyser is available somewhere ?
I would love being able to verify the PCRs of some audio and video packets with same PID, to check AV interlacing.
In fact some players supports only 1-2 seconds max delay between audio and video when TS standards allows up to 10.

Would your soft be able to output the max delay encoutered along a whole stream ?

survivant001
26th February 2008, 23:13
@roman76r

what the error : Return code -2 mean ?

SmartLabs tsMuxeR. Version 1.3.5(b) http://www.smlabs.net
Can't create output file D:\DVD-convertion\converting\temp_\movie.m2t\movie.264


MUXOPT --no-pcr-on-video-pid --new-audio-pes --vbr
V_MPEG4/ISO/AVC, "D:\DVD-convertion\converting\temp_\movie.264", insertSEI, contSPS
A_AC3, "D:\DVD-convertion\converting\temp_\audio.ac3"


my movie is 25fps


I'm able to mux it with 1.2.10

Audioboxer
26th February 2008, 23:17
http://www.smlabs.net/tsMuxer/tsMuxeR_1.3.6.zip

survivant001
27th February 2008, 00:27
http://www.smlabs.net/tsMuxer/tsMuxeR_1.3.6.zip


thanks

can you post the changelog in your next post ?

and the mux problem is fixed . thanks

with 1.2.10 file size = 1 021 654 080 bytes
with 1.3.6 file size = 1 027 500 672 bytes

roman76r
27th February 2008, 01:06
I have started to implement subtitles. Somebody can help with the documentation on a M2TS subtitles format?

adalbertoma
27th February 2008, 03:02
Roman,

Still no go with the AAC soundtrack inside the MKV file as of 1.3.6.

Here's the sample again:

http://rapidshare.com/files/46131223/300.2006.nHD.720p.x264.AAC.Sample.NhaNc3.mkv

There are a number of movies with these AAC tracks which tsmuxer don't recognize.

It does load them if I extract them to individual files with mkvextract though.

Thanks a lot!

VisMan
27th February 2008, 09:07
@roman76r

sorry to bother you again.
did you think about my problem with ac3 stream_type 0x06 ?

background is:
i wrote a freeware application that converts almost any video-/audiofile (DivX, XviD, wmv, ...) to a TS that can be played on the kathrein ufs-910 hd stb.
for SD material this works just fine, ProjectX does the multiplexing for MPEG2 perfectly.

but if i want to create a H.264/AC3 ts this is not possible and i have to re-encode all this material to MPEG2-HDV only because there is no muxer able to create DVB compliant streams :(

if you can make an option to mutliplex ac3 with stream_type 0x06 you would make many people here in europe happy :)
if you can't or just don't want to, please let me know and i will continue searching elsewhere.

thanks in advance and greetings from austria!

Pelican9
27th February 2008, 09:14
I have started to implement subtitles. Somebody can help with the documentation on a M2TS subtitles format?

Check your PM!

drmpeg
27th February 2008, 12:08
Latest testing of CBR mode. I'm using a new test file, since it shows more problems.

http://www.w6rz.net/sbp.ts

The MP2TSA report for sbp.ts:

http://www.w6rz.net/sbp.txt

and the MP2TSA report for the elementary streams from sbp.ts muxed with tsMuxer 1.3.5:

http://www.w6rz.net/bits0002.txt

Starting with the easy issues.

1) The adaptation field for stuffing packets on PID 0x1fff should be 0x1, not 0x0. 0x0 is not a valid value (see table 2.5 in 13818-1)

2) The audio PES stream_id value is 0fd. That's really a Blu-ray only stream_id. For 188-byte TS streams, it would be better to use 0xbd for compatibility reasons.

3) The audio PES_extension_field reserved byte had the value 0x71 and the 3 reserved bits after the audio P-STD_buffer_flag had the value 0x0. Pretty minor stuff, but easy to fix.

4) There are overflows on the PAT and PMT PID's. This is just from the burst of many PAT and PMT packets at the beginning of the stream.

The more serious issues are overflows in the audio and video buffers. This is due to the access units (video and audio PES) being released into the TS stream all at once. The correct scheme is too release the audio and video packets at some rate, known as the "leak rate". The leak rate must be equal to or greater (but not too much greater) than the peak PES bitrate for each elementary stream. In the T-STD sbp.ts file, you can use xport to see the packet release schedule:

xport -psd sbp.ts 1 1 1
PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff
PID= 200 PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff
PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff
PID=1fff PID=1fff PID=1fff PID= 300 PID=1fff PID=1fff PID=1fff PID=1fff
PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff
PID= 200 PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff
PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff
PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff
PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff
PID= 200 PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff
PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff
PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff
PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff
PID= 200 PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff
PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff
PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff
PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff
PID= 200 PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff
PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff
PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff
PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff
PID= 200 PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff
PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff
PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff
PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff
PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff
PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff

In the above example, you can see audio packets on PID 0x200 being released every 32 TS packets. 19.39 Mbps / 32 is approximatly 600 kbps which is the audio leak rate selected for this stream.

Same thing is required for the video.

PID=1fff PID=1fff PID=1fff PID=1fff PID= 300 PID= 300 PID=1fff PID= 300
PID= 300 PID=1fff PID= 300 PID= 300 PID= 300 PID=1fff PID= 300 PID= 300
PID=1fff PID= 300 PID= 300 PID=1fff PID= 300 PID= 300 PID= 300 PID=1fff
PID= 300 PID= 300 PID=1fff PID= 300 PID= 300 PID=1fff PID= 300 PID= 300
PID=1fff PID= 300 PID= 300 PID= 300 PID=1fff PID= 300 PID= 300 PID=1fff
PID= 300 PID= 300 PID=1fff PID= 300 PID= 300 PID=1fff PID= 300 PID= 300
PID= 300 PID=1fff PID= 300 PID= 300 PID=1fff PID= 300 PID= 300 PID=1fff
PID= 300 PID= 300 PID= 300 PID=1fff PID= 300 PID= 300 PID=1fff PID= 300
PID= 300 PID=1fff PID= 300 PID= 300 PID=1fff PID= 300 PID= 300 PID= 300
PID=1fff PID= 300 PID= 300 PID=1fff PID= 300 PID= 300 PID=1fff PID= 300
PID= 300 PID=1fff PID= 300 PID= 300 PID= 300 PID=1fff PID= 300 PID= 300
PID=1fff PID= 300 PID= 300 PID=1fff PID= 300 PID= 300 PID= 300 PID=1fff
PID= 300 PID= 300 PID=1fff PID= 300 PID= 300 PID=1fff PID= 300 PID= 300
PID=1fff PID= 300 PID= 300 PID= 300 PID=1fff PID= 300 PID= 300 PID=1fff
PID= 300 PID= 300 PID=1fff PID= 300 PID= 300 PID=1fff PID= 300 PID= 300
PID= 300 PID=1fff PID= 300 PID= 300 PID=1fff PID= 300 PID= 300 PID=1fff
PID= 300 PID= 300 PID= 300 PID= 300 PID= 300 PID= 300 PID=1fff PID= 300
PID= 300 PID=1fff PID= 300 PID= 300 PID=1fff PID= 300 PID= 300 PID= 300
PID=1fff PID= 300 PID= 200 PID= 300 PID= 300 PID= 300 PID=1fff PID= 300
PID= 300 PID=1fff PID= 300 PID= 300 PID= 300 PID=1fff PID= 300 PID= 300
PID=1fff PID= 300 PID= 300 PID=1fff PID= 300 PID= 300 PID= 300 PID=1fff
PID= 300 PID= 300 PID=1fff PID= 300 PID= 300 PID=1fff PID= 300 PID= 300
PID=1fff PID= 300 PID= 200 PID= 300 PID=1fff PID=1fff PID=1fff PID=1fff
PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff PID=1fff

The leak rate for that segment is a little difficult to calculate, but you can see that it's less than 19.39 Mbps (the video elementary rate is 12 Mbps).

The only problem with calculating the leak rate for elementary streams is that you can't rely on the bitrate in the sequence header of the video stream. You must scan the entire video elementary stream to find the highest peak bitrate. It's a bummer, since tsMuxer is currently very fast.

For audio, the indicated bitrate will work for CBR formats (MPEG-1 Layer 2, AC3, DTS). For more exotic VBR formats, the same problem of finding the peak bitrate exists.

I'm sure some of you are saying "tsMuxer works good already, why bother with all this T-STD buffer stuff?". The bottom line on being T-STD compliant is that your stream will work with pretty much any decoder, including stand-alone players and professional decoders. Otherwise, many decoders will have video stuttering or audio dropouts with non-compliant streams.

Ron

jamos
27th February 2008, 14:00
I'm sure some of you are saying "tsMuxer works good already, why bother with all this T-STD buffer stuff?". The bottom line on being T-STD compliant is that your stream will work with pretty much any decoder, including stand-alone players and professional decoders. Otherwise, many decoders will have video stuttering or audio dropouts with non-compliant streams.

Ron

nice testing ron and yes I have noticed anomolies with the sound and certain decoders mainly the dts tracks.

sugatam
27th February 2008, 19:09
Are these compliance issues only evident in CBR mode? Is the normal (vbr) ts produced by tsMuxer ok?