Hi,
I'm currently updating the softdevice plugin to work with the changes to TS format that started with vdr-1.7.1 and also current versions of ffmpeg (libavcodec does the actual decoding).
I've made some progress with vdr-1.7.19:
Old PES recordings play fine (as I'd hoped they would!)
New TS recordings play: the video looks fine. PlayTSVideo convertes to PES and passes that to PlayVideo of the output device (I assume it would be relatively straightforward to implement a proper PlayTs using avcodec but that's for a later date!). The sound is totally messed up: just lots of random buzzing noises (not looked into the audio yet).
Tranfer mode does not work at all, all I get is a black screen and silence.
Before I dig into buffers, etc., is there any difference between the streams sent to PlayTS in transfer mode and in playback? I see that transfer mode generates a PAT/PMT on the fly and passes the stream directly to PlayTs.
Does a similar thing happen to a recording, i.e. the PAT/PMT is added before writing to disk and then the stream sent during playback is identical to that which would have been sent if it had been watched in transfer mode? Does the output device ulitimately receive the same set of PES packets?
Thanks,
Laz
On 11.07.2011, at 03:21, Laz laz@club-burniston.co.uk wrote:
Hi,
I'm currently updating the softdevice plugin to work with the changes to TS format that started with vdr-1.7.1 and also current versions of ffmpeg (libavcodec does the actual decoding).
I've made some progress with vdr-1.7.19:
Old PES recordings play fine (as I'd hoped they would!)
New TS recordings play: the video looks fine. PlayTSVideo convertes to PES and passes that to PlayVideo of the output device (I assume it would be relatively straightforward to implement a proper PlayTs using avcodec but that's for a later date!). The sound is totally messed up: just lots of random buzzing noises (not looked into the audio yet).
Tranfer mode does not work at all, all I get is a black screen and silence.
Before I dig into buffers, etc., is there any difference between the streams sent to PlayTS in transfer mode and in playback? I see that transfer mode generates a PAT/PMT on the fly and passes the stream directly to PlayTs.
Does a similar thing happen to a recording, i.e. the PAT/PMT is added before writing to disk and then the stream sent during playback is identical to that which would have been sent if it had been watched in transfer mode? Does the output device ulitimately receive the same set of PES packets?
In Transfer Mode onlx one single PAT/PMT is generated at the very start of it, while a recording contains a PAT/PMT at the beginning of every GOP.
Klaus
On Monday 11 Jul 2011, Klaus Schmidinger wrote:
On 11.07.2011, at 03:21, Laz laz@club-burniston.co.uk wrote:
Hi,
I'm currently updating the softdevice plugin to work with the changes to TS format that started with vdr-1.7.1 and also current versions of ffmpeg (libavcodec does the actual decoding).
I've made some progress with vdr-1.7.19:
Old PES recordings play fine (as I'd hoped they would!)
New TS recordings play: the video looks fine. PlayTSVideo convertes to PES and passes that to PlayVideo of the output device (I assume it would be relatively straightforward to implement a proper PlayTs using avcodec but that's for a later date!). The sound is totally messed up: just lots of random buzzing noises (not looked into the audio yet).
Tranfer mode does not work at all, all I get is a black screen and silence.
Before I dig into buffers, etc., is there any difference between the streams sent to PlayTS in transfer mode and in playback? I see that transfer mode generates a PAT/PMT on the fly and passes the stream directly to PlayTs.
Does a similar thing happen to a recording, i.e. the PAT/PMT is added before writing to disk and then the stream sent during playback is identical to that which would have been sent if it had been watched in transfer mode? Does the output device ulitimately receive the same set of PES packets?
In Transfer Mode onlx one single PAT/PMT is generated at the very start of it, while a recording contains a PAT/PMT at the beginning of every GOP.
Thanks for the quick response!
:-)
In that case, I suspect my problem lies somewhere in the buffering or timing.
I will delve further...
Cheers,
Laz
Am 11.07.2011 18:12, schrieb Klaus Schmidinger:
On 11.07.2011, at 03:21, Laz laz@club-burniston.co.uk wrote:
Before I dig into buffers, etc., is there any difference between the streams sent to PlayTS in transfer mode and in playback? I see that transfer mode generates a PAT/PMT on the fly and passes the stream directly to PlayTs.
In Transfer Mode onlx one single PAT/PMT is generated at the very start of it, while a recording contains a PAT/PMT at the beginning of every GOP.
Correct me if I'm wrong, but doesn't transfer mode receive PCR clock data, while playback is without PCR clock?
Cheers,
Udo
On 11.07.2011 22:50, Udo Richter wrote:
Am 11.07.2011 18:12, schrieb Klaus Schmidinger:
On 11.07.2011, at 03:21, Lazlaz@club-burniston.co.uk wrote:
Before I dig into buffers, etc., is there any difference between the streams sent to PlayTS in transfer mode and in playback? I see that transfer mode generates a PAT/PMT on the fly and passes the stream directly to PlayTs.
In Transfer Mode onlx one single PAT/PMT is generated at the very start of it, while a recording contains a PAT/PMT at the beginning of every GOP.
Correct me if I'm wrong, but doesn't transfer mode receive PCR clock data, while playback is without PCR clock?
Since VDR version 1.7.12 the PCR packets are recorded and replayed, and also used in Transfer Mode:
2010-01-31: Version 1.7.12
... - The PCR pid is now recorded for channels where this is different from the video PID. To facilitate this, the interfaces of cTransfer, cTransferControl, cRecorder and cReceiver have been modified, so that the PIDs are no longer given in separate parameters, but rather the whole channel is handed down for processing. The old constructor of cReceiver is still available, but it is recommended to plugin authors that they switch to the new interface as soon as possible. When replaying such a recording, the PCR packets are sent to PlayTsVideo()
Klaus
On Monday 11 Jul 2011, Klaus Schmidinger wrote:
On 11.07.2011, at 03:21, Laz laz@club-burniston.co.uk wrote:
Hi,
I'm currently updating the softdevice plugin to work with the changes to TS format that started with vdr-1.7.1 and also current versions of ffmpeg (libavcodec does the actual decoding).
I've made some progress with vdr-1.7.19:
{snip}
In Transfer Mode onlx one single PAT/PMT is generated at the very start of it, while a recording contains a PAT/PMT at the beginning of every GOP.
I've made good progress with this now: it all seems to work after a bit of a shaky start-up! It will only run if run from a script to restart it multiple times.
There is something with the startup of softdevice that causes a segmentation fault: it's level of error checking in it's startup neesd improving. It can restart about five times or so before it starts properly. I need to track down the source of this.
It can also take a few seconds for the video to appear when starting up, changing channel, or starting or stopping a recording. Audio instantly changes on all of these so the streams are there and can be decoded. (The audio is used presented "as is" and the video is delayed or speeded up to keep in sync.)
Once it has managed to start up and the video has appeared, it all seems pretty stable. I can play old and new format recordings too.
Cheers,
Laz