(Re)Sync to an MPEG-TS stream fails!
I'm using VLC to display a simple UDP video stream of an Hauppauge HD-PVR box. I publish this stream simply by pushing 7 (cached) 188-byte TS packets over UDP. The HD-PVR box delivers a 1080i/50 MPEG-TS stream with H.264 encoded video and a stereo audio channel.
As long as VLC is up an running at the time the device is opened and the stream is started, all went fine. But if I start VLC while the stream is already running, it mostly isn't able to sync to it. The same happens if I write the transport stream to a file. To avoid the 4GB limit of FAT32 formatted USB memory sticks, I split the files somewhere with in the stream. If I try to play these snippets, 10%-20% of the snippets aren't played!
VLC shows the follwoing messages:
ts warning: TS module discarded (lost sync)
ps warning: this does not look like an MPEG PS stream, continuing anyway
ps warning: garbage at input, trying to resync...
ps warning: found sync code
ps warning: garbage at input, trying to resync...
ps warning: found sync code
....
Once VLC starts parsing PS instead of TS, it doesn't switch back to TS even if I force an new stream (with new TS headers) by reopening the HD-PVR device.
I've recorded three snippets (each 70MB) of video. The first is the stream after opening the device, and the rest are splitted somewhere within the stream (1 minute chunks). The first two parts are playable, the last not! If you are interested in these file, I can upload the file somewhere.