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

Add support for reading videos with ffmpeg/libav? #55

Closed
cosmin opened this issue Jan 2, 2017 · 8 comments
Closed

Add support for reading videos with ffmpeg/libav? #55

cosmin opened this issue Jan 2, 2017 · 8 comments

Comments

@cosmin
Copy link
Contributor

cosmin commented Jan 2, 2017

At the moment videos have to be read in raw YUV format, which requires creating huge intermediary files when attempting to compare the output of different encodes. It would be extremely more useful to be able to read encoded H264/VP9/H265,etc. video directly, without having to decode to disk for every video file to compare.

This can be done withffmpeg or libav, but doing so at the moment would involve changing both the Python code as well as the C code in several places. So perhaps this needs to wait for a refactoring in issue #42. It would be nice if as part of that refactoring an interface was developed that made it possible to swap in an alternate way of reading frames.

@li-zhi
Copy link
Collaborator

li-zhi commented Jan 2, 2017 via email

@li-zhi
Copy link
Collaborator

li-zhi commented Jan 2, 2017 via email

@cosmin
Copy link
Contributor Author

cosmin commented Jan 2, 2017

Yes, I looked through the code and saw the references for using ffmpeg for crop/scale but nothing for decoding/demuxing. Any examples of how to accomplish this would be greatly appreciated.

@li-zhi
Copy link
Collaborator

li-zhi commented Jan 6, 2017

@cosmin: I've added a shell script to pipe ffmpeg with vmaf at:
https://github.com/Netflix/vmaf/blob/master/ffmpeg2vmaf

Try if this one works for you. Note that the width and height in the command line arguments are NOT the width and height of the input video, but the width and height to scale the input video to, such that the VMAF calculation is done at that scale. Refer to the first question at:
https://github.com/Netflix/vmaf/blob/master/FAQ.md
for why the scaling may be necessary.

@cosmin
Copy link
Contributor Author

cosmin commented Jan 12, 2017

@li-zhi thanks, this is a good starting point. I'll close this issue and open up a new issue with some improvements to the script. The current one must be run from within the VMAF checkout, and it uses hardcoded paths for the named pipes which prevents it from being used concurrently for multiple comparisons. Thanks again, this will make it much easier for me to use VMAF.

@cosmin cosmin closed this as completed Jan 12, 2017
@li-zhi
Copy link
Collaborator

li-zhi commented Jan 12, 2017 via email

@li-zhi
Copy link
Collaborator

li-zhi commented Jan 12, 2017 via email

@li-zhi
Copy link
Collaborator

li-zhi commented Jan 23, 2017

@cosmin I updated the ffmpeg2vmaf script to using python. It now supports dynamically generated working directories, and thus is thread-safe.

nilfm pushed a commit that referenced this issue Dec 8, 2022
Merge in MCE/vmaf-private-lts from feature/fix-v102-name-christosb to master

* commit '38c0664dac5313a70e837aa0123faad41f1aaf8a':
  Fix naming for 4.5H v102 models.
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