Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Same number of frames should be in transcoded output #315

Closed
AlexKordic opened this issue Mar 28, 2022 · 2 comments
Closed

Same number of frames should be in transcoded output #315

AlexKordic opened this issue Mar 28, 2022 · 2 comments
Assignees

Comments

@AlexKordic
Copy link
Contributor

AlexKordic commented Mar 28, 2022

Add fix for failing test.

Input segment has 5 frames and produced output seams to repeat second frame, giving 6 frames in output.

Input:
input

Output:
encoded

@MikeIndiaAlpha MikeIndiaAlpha self-assigned this May 27, 2022
@MikeIndiaAlpha
Copy link
Contributor

Looked into that today, and I believe the 6th frame is produced by the FPS filter. The test asks for "P720p30fps16x9" profile, but the input video is 25FPS (which I checked ffprobe -show_frames -unit: frame duration is 0.04s or 40ms). Now converting from 25FPS to 30FPS requires adding 5 frames per second, or one additional frame every five original frames. This is what I believe happens here. To be more precise, these are original video timestamps:
pkt_pts_time=1.480000 s
pkt_pts_time=1.520000 s
pkt_pts_time=1.560000 s
pkt_pts_time=1.600000 s
pkt_pts_time=1.640000 s
So original video has 5 frames over 0.16s
And transcoded video timestamps:
pkt_pts_time=1.466016 s
pkt_pts_time=1.499349 s
pkt_pts_time=1.532682 s
pkt_pts_time=1.566016 s
pkt_pts_time=1.599349 s
pkt_pts_time=1.632682 s
So transcoded video has 5 frames over 0.166666s. Not sure why the timestamps are shifted (I mean why the first frame of transcoded video doesn't repeat the timestamp of the first frame of original video), but I guess this is how filter works.

I also verified my theory by invoking the test with "P720p25fps16x9" profile, thus getting rid of FPS filter. The results were as expected, 5 output frames. My conclusion is: this is not really a bug, transcoder is behaving properly.

What do you think @AlexKordic ?

@AlexKordic
Copy link
Contributor Author

Good point! This is then false report from my side

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants