Log in

View Full Version : Video bitrate decreases when using tsMuxer for certain recordings


Ovaron
16th January 2015, 22:33
Hi!

I tried to use tsMuxer for cutting the ads out of a HD-TS recording.

Everything was fine but then I saw that the file size decreased much more than I expected.

For example:
Recording was 10GB with a lenght of 2:14h and 2 AC3 streams
Result after the cutting was 4.5GB with a lenght of 1:43h and 1 AC3 stream

The size/bitrate-shrink also happens if I just demux the TS-file

How is this possible?

Even stranger is the fact that this only happens for the recordings of the channel ORF-HD (Austrian TV) but not for ZDF-HD (German TV).

I also tried another programm (TS Doctor) for the cutting and instead of 4.5GB it produced a file with the size of 7.4GB, which is what I expected.

This information is given by Mediainfo for the original file:
General
ID : 1007 (0x3EF)
Complete name : C:\Users\Stefan\20141228 2010 - ORF1 HD - Happy New Year.ts
Format : MPEG-TS
File size : 9.95 GiB
Duration : 2h 14mn
Overall bit rate mode : Variable
Overall bit rate : 10.6 Mbps

Video
ID : 1920 (0x780)
Menu ID : 4911 (0x132F)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.0
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Format settings, GOP : M=4, N=24
Codec ID : 27
Duration : 2h 14mn
Bit rate : 9 128 Kbps
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Frame rate : 50.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.198
Stream size : 8.61 GiB (86%)

This information is given by Mediainfo after the cutting:

General
ID : 1 (0x1)
Complete name : U:\Aufnahmen\20141228 2010 - ORF1 HD - Happy New Year_new.ts
Format : MPEG-TS
File size : 4.54 GiB
Duration : 1h 43mn
Overall bit rate mode : Variable
Overall bit rate : 6 259 Kbps
Maximum Overall bit rate : 35.5 Mbps

Video
ID : 4113 (0x1011)
Menu ID : 1 (0x1)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.0
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Format settings, GOP : M=4, N=24
Codec ID : 27
Duration : 1h 43mn
Bit rate mode : Variable
Bit rate : 5 497 Kbps
Maximum bit rate : 40.0 Mbps
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Frame rate : 50.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.119
Stream size : 3.99 GiB (88%)

You can see that the bitrate decreased, but how is that possible?

I hope that someone in the Doom9-Forum may have an explenation for me :)

Regards

Asmodian
17th January 2015, 03:11
There must be a lot of "extra" stuff in that TS file. It would also explain why one channel shows this behavior while another doesn't. That is a lot more extra stuff than I would expect but it is possible the station is doing something odd/unintended. TS is a neat container in that you can put a lot of random extra stuff into it if you want to. What happens if you remux to matroska?

Take Mediainfo's bit rate report with some salt, it is usually simply calculated from size / time.

Ovaron
18th January 2015, 20:52
That would mean that the broadcaster is mixing useless information into the stream, but why should they do that?

If I remux the recording to matroska, the filesize is ~ 6 GB.

Is there another tool that is able to demux h264-TS Files for comparison?

frank
18th January 2015, 23:19
You can trust tsMuxeR.
In ts streams are a lot of filler bytes to maintain a constant bitrate /bandwith on the broadcast channel.

Ghitulescu
19th January 2015, 10:15
That would mean that the broadcaster is mixing useless information into the stream, but why should they do that?

You don't have to worry. tsMuxer (or any other re/muxer) does not throw away any information, neither recompress it.

Demuxing/remuxing (or remuxing on-the-fly) simply keeps only the information you choose to keep).

As for the padding bits, so-called NULL packets, there are NEEDED for the correct functioning of the transmission chain. Like also both DVDs and BDs need not to have a buffer underflow (ie they should have a minimal bitrate, even for completely black scenes).