Skip to content

Issue with the H.264 play from disk example #119

@RaniRaven

Description

@RaniRaven

This example is supposed to play H.264 file from disk.
The problem is the following 2 lines :
[1] h264FrameDuration = time.Millisecond * 33
[2] videoTrack.WriteSample(media.Sample{Data: nal.Data, Duration: time.Second})

On one hand the code assumes that the H.264 file is created with frames of length 33 msec (duration), on the other hand it writes the sample with a Second duration. Which means that the RTP stream created as a result is actually 30 times shorter than expected.

There is an issue with that, isn't there ?
Ain't the Duration values when writing sample supposed to be h264FrameDuration ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions