bavc / qctools

QCTools (Quality Control Tools for Video Preservation) is a free and open source software tool that helps users analyze and understand their digitized video files through use of audiovisual analytics and filtering. QCTools is funded by the National Endowment for the Humanities and the Knight Foundation, and is developed by the Bay Area Video Coalition.
http://www.bavc.org/qctools
Other
307 stars 41 forks source link

initial aspect ratio in player #724

Open dericed opened 2 years ago

dericed commented 2 years ago

To follow up on @valbok's comment at https://github.com/bavc/qctools/pull/714#issuecomment-1054321337.

I'm using a sample from: ffmpeg -f lavfi -i testsrc2 -t 2 -aspect 16:9 16-9.mkv

When the player is initially opened it looks like: image

Then I toggle something about the player (such as enable and then disable another filter, like the waveform checkbox) and then it looks like:

image

The first is the video's aspect ratio while the second is sar as 1/1. Either is fine if consistent, as I'd like to control the aspect ratio with the filters, but here it's inconsistent depending on if it's the initial 'normal' view or reset back to 'normal' view.

ElderOrb commented 2 years ago

Seems like this approach:

    m_player->seek(m_player->position());
    m_player->pause();

doesn't work in all the cases.

valbok commented 2 years ago

Seems like this approach:

    m_player->seek(m_player->position());
    m_player->pause();

doesn't work in all the cases.

@ElderOrb, seek does not work? pause does not work? or it is related to AR?

valbok commented 2 years ago

Interesting that in linux it is not reproducible for me.

ElderOrb commented 2 years ago

Based on @dericed said filter is fully applied only after starting playback, which means using

m_player->seek(m_player->position()); m_player->pause();

for 'applying' filter doesn't work in his case

dericed commented 2 years ago

Here's a screen recording of the issue with the file mentioned above. This is from initial open of the window to toggle the second filter on then off. The first image and last should be the same but the aspect ratio is different. Screen

valbok commented 2 years ago

yep, thanks, but not reproducible on linux/windows, will try to figure out how to troubleshoot it.

dericed commented 2 years ago

https://user-images.githubusercontent.com/762604/175378374-b34a6328-8f26-4ba5-8051-fee6c4269d64.mp4

Adding another demo of this issue with a 4/3 .dv file.

valbok commented 2 years ago

https://github.com/bavc/qctools/blob/main/Source/GUI/player.cpp#L655 this changes AR. @ElderOrb could you please check what it was supposed to solve, can we remove it?

valbok commented 2 years ago

video frames are not changed, and have proper size. It could be checked by saving to files.

ElderOrb commented 1 year ago

@dericed is it still an issue?

dericed commented 1 year ago

It's still an open issue but the behavior is more consistent. At the moment, the video in the player appears with a forced 1/1 SAR, which is helpful for QC, but I need to add a method to apply the stored aspect ratio to close this ticket.