-
Notifications
You must be signed in to change notification settings - Fork 29
Description
Hello,
I wish to change the fps of a local MP4 to a desired value between 10-60. The video is recorded in 60 fps so that is the default.
Code is simple:
FFmpegFileSource mediaFileSource = new(streamPath, true, null);
mediaFileSource.RestrictFormats(x => x.Codec == VideoCodecsEnum.H264);
_peerConnection.OnVideoFormatsNegotiated += (videoFormat) => mediaFileSource.SetVideoSourceFormat(videoFormat.First());
mediaFileSource.OnVideoSourceEncodedSample += _peerConnection.SendVideo;
mediaFileSource.Start();
I saw an old issue regarding this but it was changing the framerate of a VideoTestPatternSource. I did not find how to "load" the video in this class to have access to the SetFrameRate() method.
Another idea that came to me was to add code in the OnVideoSourceEncodedSample before SendVideo(). I am not sure of the impact of delaying SendVideo() with regards to the event.
Is there an easier way of doing this?
Thank you