[vlc] Re: Problem playing MPEG-PS files with mpeg4video

Laurent Aimar fenrir at via.ecp.fr
Wed Jan 26 13:15:27 CET 2005


On Wed, Jan 26, 2005, Måns Rullgård wrote:
> Nico Sabbi <nsabbi at tiscali.it> writes:
> 
> > Måns Rullgård wrote:
> >
> >>Nico Sabbi <nsabbi at tiscali.it> writes:
> >>
> >>>Gildas Bazin wrote:
> >>>
> >>>>Ok, the main problem here is that we don't have access to the frame
> >>>>rate information for this kind of streams so we can't really
> >>>>interpolate the timestamps, thus we rely on each frame having at
> >>>>least a DTS.
> >>>>Do you know if there's a way to find out the frame rate info ?
> >>>>
> >>>this is what I implemented for mplayer:
> >>>
> >>>take 3 video frames and store
> >>>- from the vol header the time_resolution
> >>>- from the vop headers the 3 time_increments
> >>>
> >>>calculate the minimun difference between the 3 time_increments, say diff
> >>>fps = timeinc_resolution / diff
> >>>
> >>>This method works also when there are b-frames because they have to be
> >>>in the right order, e.g.
> >>>
> >>
> >>You could also be nice to decoder and store the frame rate in the
> >>PSM.  Have you tried whether VLC doing so makes VLC any happier?
> >>
> > VLC doesn't seem to be able to mux mpeg4 in mpeg-ps: the resululting files
> > contain only audio.
> > It would be nice to describe the framerate with a descriptor, but which?
> 
> The video stream descriptor seems suitable for this:
> 
> Syntax                                            No. of bits Mnemonic
> video_stream_descriptor(){
>           descriptor_tag                          8           uimsbf
>           descriptor_length                       8           uimsbf
>           multiple_frame_rate_flag                1           bslbf
>           frame_rate_code                         4           uimsbf
>           MPEG_1_only_flag                        1           bslbf
>           constrained_parameter_flag              1           bslbf
>           still_picture_flag                      1           bslbf
>           if (MPEG_1_only_flag = = '0'){               
>                      profile_and_level_indication 8           uimsbf
>                      chroma_format                2           uimsbf
>                      frame_rate_extension_flag    1           bslbf
>                      reserved                     5           bslbf
>           }
> }
> 
> frame_rate_code ­ This is a 4-bit field as defined in 6.3.3 of ITU-T
> Rec. H.262 | ISO/IEC 13818-2,
 Well, this descriptor can only be used for ISO/CEI 13818-2 and
ISO/CEI 11172-2 video streams, so only MPEG-I and II.
 There is a descriptor for MPEG-4 video but it doesn't have a fps field.

-- 
fenrir

-- 
This is the vlc mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://www.videolan.org/support/lists.html



More information about the vlc mailing list