justdan96 / tsMuxer

tsMuxer is a transport stream muxer for remuxing/muxing elementary streams, EVO/VOB/MPG, MKV/MKA, MP4/MOV, TS, M2TS to TS to M2TS. Supported video codecs H.264/AVC, H.265/HEVC, VC-1, MPEG2. Supported audio codecs AAC, AC3 / E-AC3(DD+), DTS/ DTS-HD.
Apache License 2.0
836 stars 141 forks source link

PAT PMT should better be placed in the beginning of the TS #688

Closed moveman closed 1 year ago

moveman commented 1 year ago

Player behaves better if PAT PMT are placed in the beginning of the TS. You can try playing the video here using VLC: https://drive.google.com/drive/folders/1KWFEYB2pt7ON9xRVikciioYirlQldnqI?usp=sharing

before.ts: mux-ed output before this change after.ts: mux-ed output after this change

This pull request included some changes from the another pull request... so let's consider this pull request later.

jcdr428 commented 1 year ago

@moveman generally seems good to me -we'll have to find another naming for the nano things. Only the comment on the 0.5 roundings: IMO these ones are still needed when using unusual fps e.g. some animes use 8 to 15 fps.

moveman commented 1 year ago

Hi @jcdr428, we don't have good solution for unusual fps. But given that 1 PTS error is an existing problem, maybe it should be okay we don't fix it for 8 to 15fps? What problem we will encounter if we don't have 0.5 roundings?

jcdr428 commented 1 year ago

@moveman is it a problem for you to leave the rounding to nearest rather than rounddown ?

jcdr428 commented 1 year ago

@moveman can you please propose a new commit taking into account that your two previous commits were merged.

moveman commented 1 year ago

hi @jcdr428 @ValZapod, I have cleaned up this commit. Actually we do not rely on VLC. I just want to say that this change could help some players and analyzers. The real problem we suffered is that some functionality of tsduck does not work well if PAT/PMT is not placed in the beginning.