Currently I'm playing with different ways to generate TS files. The old version worked quite well with VLC but not with some other players. After I changed a bit I got some strange behaviour in VLC 0.8.2 which I would like to understand - actually I'm sure that the TS generator is somewhat wrong and I hope that understanding the VLC behaviour will help me find my bug.
So what happens: in a TS there is one audio and one video stream. Most of the times playing it gives no audio. But sometimes (one out of five or so) the file is played normally with sound available (in total synchronisation with the video). When there is no sound a couple of received buffer in the future messages are reported. When in the correct mode I stop playing and restart again most of the time (4 out of 5 or so) the sound is gone.
Personally I think this comes from the arrangement of the video and audio streams and the PCR which is generated from the video SEQ PTS - I had to change this arrangement so that audio and video are nearly aligned. In the good old version audio was very late (sometimes about two GOPs) which made some players stop & go. I'll try to fix this but the question is: why is playing the file with VLC not deterministic - i.e. it always has sound or never has? I would have expected this...
Thanks in advance for any hint
Jochen
<Edit>Ok, fixed it: as expected the video should come somewhat early. I shifted it by 250ms and it now works (but not with HDTV). Still the question: why isn't it deterministic?</Edit>