How to adjust the drawing speed of the video

windows

#1

Hi

I am using csharp-sample-apps with recorded video file(mp4).

The drawing speed of the video played on ProcessVideoForm is different from the original video.
(Depending on the video, the drawing speed of the video played on ProcessVideoForm may be faster or slower.)

Do you know the cause of this issue?
And do you know how to adjust the drawing speed of the video played on ProcessVideoForm to the original video?

Thank you.


#2

Video that makes play faster has the following properties.
· File type: MP4
· Frame width: 1280
· Frame Height: 720
· Data rate: 1999 kbps
· Total bit rate: 2190 kbps
· Frame rate: 24 frames / sec

Then, if I encode this video and set it to the following properties, the play speed slowed down.
· File type: MP4
· Frame width: 1920
· Frame Height: 1080
· Data rate: 1474 kbps
· Total bit rate: 1602 kbps
· Frame rate: 24 frames / sec

Do you think the properties of the video are influencing the play speed?


#3

Hi, that sample app displays the frames as they are processed, so the frame rate of the displayed video will reflect the processing rate. Higher-resolution frames will be processed somewhat more slowly than lower-resolutions ones, so that explains the difference you’re seeing.

If you want to implement some logic to synchronize the playback speed to the source frame rate, you would have to do that yourself.


#4

HI,

Thank you for your reply.
I understood that need to implement to some logic to synchronise the play back speed myself.
Do you have any samples of implemented that logic?

Then, I made a sample that use wait timer. It can that play back speed approach for near source frame rate. But, it’s not synchronise compleately.
Do you have any ideas for realize the synchronise logic?


#5

Hi, no, sorry we don’t have any samples that manage the rate of displayed frames. As a suggestion, you might try looking at some open source video players; maybe you could see how they manage display frame rates and leverage their techniques.


#6

Hi

Thank you for your advice.
I try to look at some open source video players.