Product .m2ts is bigger than that got manually from intermed

Bug report and feature request
Post Reply
kawamoto76
Advanced
Advanced
Posts: 480
Joined: Sun Dec 14, 2008 4:52 pm
Location: JAPAN

Product .m2ts is bigger than that got manually from intermed

Post by kawamoto76 » Thu Jul 03, 2014 7:07 pm

Product .m2ts is bigger than that got manually from intermediate .264 and .ac3.

I have been transcoding HDTV-captured TS files(mpeg2/aac) into .m2ts(H264/ac3).
Recently I updated Mediacoder's version from x64-0.8.15.5280 to x64-0.8.30.5622.
There, I found that product .m2ts is bigger than that is muxed from intermediate .264 and .ac3.

I had been getting a final product after conversion by mediacoder, through muxing left intermediate files with TSMuxeR manually to give langage code on it, because mediacoder does not keep(ignores) the language code of the input TS into output.
** language code is used for displaying spoken language as properties of played-back movie.
As to mediacoder upto x64-0.8.15.5280, product size is always the same as that is muxed from intermediate .264 and .ac3.
However, mediacoder became giving product which has bigger size than the manually muxed.

For comparison, the results of Mediainfo analysys as to mediacoder output and mannually muxed product are shown bellow.
When video VBR bitrate was set as 4250kbps, manually muxed .m2ts shows whose bitrate is 4250kbps at the beginning same as the set value. Whereas, mediacoder gives product .m2ts whose bitrate is 4,345kbps(at the beginning of the file).
In addition, information about encoder setting is not reported by Mediainfo as to product .m2ts by x64-0.8.30.5622.
Upto x64-0.8.15.5280, both MC output and manually muxed output have the same size, and Mediainfo reports the same result except the added language code information. I think, bad something happens at invoking built-inTSMuxeR in x64-0.8.30.5622.

Converting conditions:
video settings: H.264/x264/Mencoder(codec/encoder/source), High4.1, custom, 23.976fps, VBR 4,250kbps
audio settings: ac3/ffmpeg/auto(codec/encoder/source), 448kbps 5.1ch

The differrence between MC product .m2ts and the mannualy muxed .m2ts is observed as to all TS files, not with standing audio (mono/ stereo/5.1).

**********************************************************************************************
samplefile_output.m2ts 4,312,092,672 bytes
Mediainfo report as to video
**********************************************************************************************
ID : 4113 (0x1011)
Menu ID : 1 (0x1)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.1
Format settings, CABAC : Yes
Format settings, ReFrames : 3 frames
Codec ID : 27
Duration : 1h 54mn
Bit rate mode : Variable
Bit rate : 4 345 Kbps
Maximum bit rate : 40.0 Mbps
Width : 1 440 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 23.976 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.117
Stream size : 3.49 GiB (87%)

**********************************************************************************************
samplefile_muxed.m2ts 4,290,588,672 bytes
Mediainfo report as to video
**********************************************************************************************
ID : 4113 (0x1011)
Menu ID : 1 (0x1)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.1
Format settings, CABAC : Yes
Format settings, ReFrames : 3 frames
Codec ID : 27
Duration : 1h 54mn
Bit rate mode : Variable
Bit rate : 4 250 Kbps
Maximum bit rate : 40.0 Mbps
Width : 1 440 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 23.976 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.114
Stream size : 3.47 GiB (87%)
Writing library : x264 core 142 r2409kMod d6b4e63
Encoding settings : cabac=1 / ref=1 / deblock=1:-1:-1 / analyse=0x3:0x133 / me=hex / subme=6 / psy=1 / fade_compensate=0.00 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / fgo=0 / bframes=3 / b_pyramid=1 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=abr / mbtree=1 / bitrate=4250 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.0
Akira Kawamoto

kawamoto76
Advanced
Advanced
Posts: 480
Joined: Sun Dec 14, 2008 4:52 pm
Location: JAPAN

Re: Product .m2ts is bigger than that got manually from inte

Post by kawamoto76 » Thu Jul 03, 2014 8:54 pm

I found that this problem is depending on different versions of tsMuxeR.exe. Mediacoder had changed its built-in tsMuxer from smlabs's one to Optix's one. TsMuxeR.exe in MC-x64-0.8.30.5622 is Optix's one, whereas I used smlabs's one for manual muxing. The difference was reasonable.
There might be some reason why Optix's one became adopted for recent Mediacoder versions. However, I think smlabs's one is better, because set bitrate(VBR) is reflected into the beggining of the product. And because when with Optix's tsMuxeR, I cannot know about parameters of being encoded with Mediainfo inspecting the product.

At C:\Program Files\MediaCoder\tools, can I replace tsMuxeR.exe with its old version ?

http://www.chip.de/downloads/tsMuxeR-GUI_42591287.html
http://www.afterdawn.com/software/audio ... er_win.cfm

tsMuxeR.exe(smlabs v1.10.6): 226,816 bytes 2009/05/11 5:10
MC5280: TSMuxer.exe 226,816 bytes 2009/05/11 6:10

http://www.videohelp.com/tools/tsMuxeR
http://www.videohelp.com/tools/tsMuxeR/ ... s#download

tsMuxeR.exe(Optix v2.6.12): 262,144 bytes 2014/01/13 4:16
MC5622: TSMuxer.exe 262,144 bytes 2014/01/13 5:16
Last edited by kawamoto76 on Thu Jul 17, 2014 3:18 am, edited 2 times in total.
Akira Kawamoto

kawamoto76
Advanced
Advanced
Posts: 480
Joined: Sun Dec 14, 2008 4:52 pm
Location: JAPAN

MC should go back to tsMuxer ver1.10.6(smlabs)

Post by kawamoto76 » Fri Jul 04, 2014 3:19 am

As to tsMuxeR, Mediacoder had been adapting smlabs version(1.10.6) up to MC-x64-0.8.15.5280.
According to C:\Program Files\MediaCoder\whatsnew.txt, it continued up to MC-x64-0.8.24.5550.
After that, MC changed tsMuxeR into Optix version. In MC-x64-0.8.30.5622, tsMuxeR ver2.6.12 is used.
However, from the point of view as to beginning part of the product, tsMuxeR ver2.6.12 seems to be bad.

I made a experiment, that is,
(1)convert short TS(mpeg2/aac) into .m2ts(H264/ac3,VBR=5,000kbps) with MC-x64-0.8.30.5622 with keeping intermediate files(.264, .ac3).
(2)making .m2ts by muxing above remained .264 and .ac3, manually with tsMuxeR ver2.6.12(Optix) -- 1st mux.
(3)demuxing above 1st muxed .m2ts to get .264 and .ac3 with tsMuxeR ver2.6.12(Optix).
(4)re-muxing above .264/.ac3(from 1st mux) to get 2-nd mux with tsMuxeR ver2.6.12(Optix).
(5)demuxing above 2-nd mux with tsMuxeR ver2.6.12(Optix).
(6)do the same operation (2)-(5) by using tsMuxeR ver1.10.6(smlabs)
(7)analysing got files(.m2ts/.264/.ac3) with Mediainfo.
(8)summarize analysed result into excel sheet.

The result is shown below.

[filename] ______________________________ [size(bytes)]__[origin]_________ [aplication]_______[VIDEO kbps]
mctemp1178485e3f2d8f1f.264 _____________37,036,537___left by MC_______MC-x64-0.8.30.5622___5,000
mctemp1178485e3f2d8f1f.ac3 ______________3,308,032___left by MC_______MC-x64-0.8.30.5622___N/A
testdelay51_MC_made.m2ts_________________42,811,392___MC product_____MC-x64-0.8.30.5622___5,100

testdelay51_2612_muxed.m2ts_______________42,811,392__1st-synthesized___tsMuxeR-2.6.12______5,100
testdelay51_2612_muxed.track_4113.264______37,065,833__demuxed of 1st___tsMuxeR-2.6.12______no report
testdelay51_2612_muxed.track_4352.ac3_______3,308,032__demuxed of 1st___tsMuxeR-2.6.12______N/A
testdelay51_2612_REmuxed.m2ts_____________42,811,392__2nd-synthesized__tsMuxeR-2.6.12______5,094
testdelay51_2612_REmuxed.track_4113.264____37,065,833__demuxed of 2nd__tsMuxeR-2.6.12______no report
testdelay51_2612_REmuxed.track_4352.ac3_____3,308,032__demuxed of 2nd__tsMuxeR-2.6.12______N/A

testdelay51_1106_muxed.m2ts________________42,627,072__1st-synthesized__tsMuxeR-1.10.6______5,000
testdelay51_1106_muxed.track_4113.264_______37,066,330__demuxed of 1st__tsMuxeR-1.10.6______5,000
testdelay51_1106_muxed.track_4352.ac3________3,308,032__demuxed of 1st__tsMuxeR-1.10.6______N/A
testdelay51_1106_REmuxed.m2ts______________42,627,072__2nd-synthesized_tsMuxeR-1.10.6______5,000
testdelay51_1106_REmuxed.track_4113.264_____37,066,330__demuxed of 2nd_tsMuxeR-1.10.6______5,000
testdelay51_1106_REmuxed.track_4352.ac3______3,308,032__demuxed of 2nd_tsMuxeR-1.10.6______N/A

Mediainfo reports video bitrate by analysing the beginning several packets of the file.
For proper tsMuxeR's action, reported video vitrate is expected as 5,000kbps.
However, unexpected value(5,100kbps, 5,094kbps or none) are reported asto tsMuxeR ver2.6.12(Optix).
Because file(.264) size expansions from the original intermediate are observed at both tsMuxeR versions,
it is considered some dummy video pakets are added to adjust A/V sync.
And more, in the case of ver1.10.6(smlabs) proper packets are added, whereas improper packets are added in the case of ver2.6.12(Optix).
With tsMuxeR ver2.6.12(Optix), it is very inconvinient that bad VBR bitrate(different from set value) is reported with Mediainfo asto MC product.
MC should go back to tsMuxer ver1.10.6(smlabs) to get good product(showing proper set VBR) until the bug of Optix's tsMuxeR will be fixed.
Last edited by kawamoto76 on Sat Jul 05, 2014 4:13 pm, edited 4 times in total.
Akira Kawamoto

kawamoto76
Advanced
Advanced
Posts: 480
Joined: Sun Dec 14, 2008 4:52 pm
Location: JAPAN

tsMuxerGUI.exe(smlabs v1.10.6) is good

Post by kawamoto76 » Fri Jul 04, 2014 3:35 pm

For my MediaCoder-x64-0.8.30.5622 usage, by replacing C:\Program Files\MediaCoder\tools\tsMuxeR.exe with tsMuxeR.exe(smlabs v1.10.6), everything goes well .
If desired, also C:\Program Files\MediaCoder\tools\tsMuxerGUI.exe may be replaced with tsMuxerGUI.exe(smlabs v1.10.6).
Akira Kawamoto

stanley
Site Admin
Site Admin
Posts: 4135
Joined: Mon May 15, 2006 7:43 pm
Location: Sydney

Re: Product .m2ts is bigger than that got manually from inte

Post by stanley » Tue Jul 15, 2014 8:55 pm

MediaCoder ships with the latest version of tsmuxer is 2.6.12 obtained from here.
http://www.videohelp.com/tools/tsMuxeR
When things work together, things work.

kawamoto76
Advanced
Advanced
Posts: 480
Joined: Sun Dec 14, 2008 4:52 pm
Location: JAPAN

Re: Product .m2ts is bigger than that got manually from inte

Post by kawamoto76 » Wed Jul 16, 2014 7:25 pm

Even if it is the latest, we must not employ it when it has a fatal bug, I think.
Akira Kawamoto

stanley
Site Admin
Site Admin
Posts: 4135
Joined: Mon May 15, 2006 7:43 pm
Location: Sydney

Re: Product .m2ts is bigger than that got manually from inte

Post by stanley » Thu Jul 17, 2014 10:38 am

In next release it will be reverted to the smlabs version.
When things work together, things work.

Post Reply