Use alternative mpeg packetizer
Posted: 17 Mar 2016 10:47
Hi all
I would like to use VLC library under android for a project but I have a problem with a bug into standard mpeg packetizer. I need to use vlc for show digital TV transport stream through UDP however some channels are showed jerky. After investigation I found that these channels does't report the PTS mpeg value (set to zero) and this cause the problem. Looking into sources I found the problem "came" from this file:
\vlc\modules\packetizer\mpegvideo.c
and on top in the source header there is this note:
/*****************************************************************************
* Problem with this implementation:
*
* Although we should time-stamp each picture with a PTS, this isn't possible
* with the current implementation.
* The problem comes from the fact that for non-low-delay streams we can't
* calculate the PTS of pictures used as backward reference. Even the temporal
* reference number doesn't help here because all the pictures don't
* necessarily have the same duration (eg. 3:2 pulldown).
*
* However this doesn't really matter as far as the MPEG muxers are concerned
* because they allow having empty PTS fields. --gibalou
*****************************************************************************/
that seem exactly my case. Increase the VLC network buffer doesn't fix the issue. Now the question, is possible to compile vlc for use an alternative way (packetizer?) for show these channels in correct mode? I tried some other players like MX Player and this doesn't show the problem. Investigating around I found this player is based to ffmpeg.
Thank you for the help
I would like to use VLC library under android for a project but I have a problem with a bug into standard mpeg packetizer. I need to use vlc for show digital TV transport stream through UDP however some channels are showed jerky. After investigation I found that these channels does't report the PTS mpeg value (set to zero) and this cause the problem. Looking into sources I found the problem "came" from this file:
\vlc\modules\packetizer\mpegvideo.c
and on top in the source header there is this note:
/*****************************************************************************
* Problem with this implementation:
*
* Although we should time-stamp each picture with a PTS, this isn't possible
* with the current implementation.
* The problem comes from the fact that for non-low-delay streams we can't
* calculate the PTS of pictures used as backward reference. Even the temporal
* reference number doesn't help here because all the pictures don't
* necessarily have the same duration (eg. 3:2 pulldown).
*
* However this doesn't really matter as far as the MPEG muxers are concerned
* because they allow having empty PTS fields. --gibalou
*****************************************************************************/
that seem exactly my case. Increase the VLC network buffer doesn't fix the issue. Now the question, is possible to compile vlc for use an alternative way (packetizer?) for show these channels in correct mode? I tried some other players like MX Player and this doesn't show the problem. Investigating around I found this player is based to ffmpeg.
Thank you for the help