microsoft / microsoft/FFmpegInterop

Raw H264 stream: problem with framerate

Open
#165 42 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
1.4k
Forks
319
PR merge metrics
No merged PRs in 30d

Description

Hi, I can stream out of a RPi the raw data of an H264 video.
If I want to obtain a well-formed MP4 file, I would save the video as H264 and then wrap into an MP4 container:

  • ffmpeg -r 25 -i raw_video.h264 -vcodec copy wrapped_video.mp4
    or
  • MP4Box -add raw_video.h264 wrapped_video.mp4
    It works, but this is of course not possible when streaming.

If I save the raw H264 and play it with CreateFFmpegInteropMSSFromStream, the video is super-fast. I suppose the problem is due to the missing framerate.
From the ffmpeg rtsp help I don't see any useful options to make it work.

Suggestions?
TIA

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with CreateFFmpegInteropMSSFromStream and the FFmpeg RTSP help referenced in the report. Reproduce playback of the raw H264 stream and trace how frame timing is obtained; document whether the API can receive the missing framerate and what change would be required to prevent accelerated playback.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
audio-video-rtc
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.