cdgriffith / FastFlix

FastFlix is a free GUI for H.264, HEVC and AV1 hardware and software encoding!
https://fastflix.org/
MIT License
1.15k stars 58 forks source link

qsvenc with y4m input file #442

Closed Joet73 closed 1 year ago

Joet73 commented 1 year ago

Describe the bug

  1. Encoder error with colorrange and chromaloc parameters automatically setup to auto. As per the QSVenc documentation says only avsw and avhw readers are able to use auto.
  2. When I manually set colorrange to limited & chromaloc to anything but auto (tried from 0 to 5), encoding works but color is shifted.

To Reproduce Steps to reproduce the behavior:

  1. Input .y4m file downloaded here
  2. Choose qsvenc HEVC encoder option (Using V7.34 for the test)
  3. Use icq mode. I haven't tried other mode but error should be the same.
  4. Start encoding.
  5. Using a the below command line no error but the chroma is shifted as well. QSVEncC64.exe --y4m -i input.y4m --icq 18 -c hevc -u best -o output.mp4 Using this ffmpeg piping no chroma shift ffmpeg.exe -y -i input.y4m -an -f yuv4mpegpipe - | QSVEncC64.exe --y4m -i - --icq 18 -c hevc -u best -o output.mp4 It might be a bug with Rigaya's y4m reader.
cdgriffith commented 1 year ago

Hi @Joet73 thanks for the detailed write up! As you have already stripped it down to a base command and looks to be a possible issue with QSVEnc directly, I would copy and paste your findings onto their issues page https://github.com/rigaya/QSVEnc/issues

If FastFlix is making it worse in some way please let me know! (for example I set everything to auto in most cases, if there is something wrong there or needs to be unset entirely, FastFlix might need to be updated)

Joet73 commented 1 year ago

Hi Issue reported here But i still believe that there is an issue with fastflix automatically setting chromaloc and colorrange to auto which throw an error with y4m input file. BTW, just tested eith avi file, same error.

cdgriffith commented 1 year ago

Thanks for the extra details about it trying to add stuff it can't to avi / y4m. Right now have a quick fix for qsv / nvenc that will always specify the avsw reader that should fix it, but going to be adding option to allow it to use the default y4m reader as well https://github.com/cdgriffith/FastFlix/releases/tag/5.4.1