-
Notifications
You must be signed in to change notification settings - Fork 178
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
libkvazaar encoder in ffmepg produces no output #349
Comments
So I was checking on things and if I compile kvazaar + ffmpeg in msys2 it seems to work just fine: |
Hi @fador , thanks for the heads up. I am compiling kvazaar for ffmpeg with emscripten using this configuration https://github.com/wide-video/ffmpeg-wasm/blob/main/scripts/build-kvazaar.sh , and it does not work either. Any idea what to be changed? |
Well there was some problems to actually compile kvazaar with emscripten. edit: |
Hi, I'm the one who added kvazaar on BtbN build. Can you be more specific what you mean by 'no output'? You are talking about no file output or there is a file with zero byte or anything else? It works fine for me.
even your example command
|
Hi @nanake I have tested the latest BtbN build and still having issues. Following command creates out.hevc which is exactly 0 bytes.
Running my mp4 example produces 44 bytes out.mp4 (attached)
Steps to reproduce:
out.mp4 |
Okay, my bad! If this is the case which difficult to track down, I really don't know how can i help. |
Actually I figured out something with the ffmpeg-wasm
The actual function pointer signatures are slightly different from the implementation (return type |
btw the linux version of the BtbN ffmpeg build works just fine, windows version has the problems |
thanks for looking into it @fador , just wanted to confirm I am also having |
@jozefchutka I pushed a400504 to fix the problem in the wasm build, it works at least for me. |
I managed to build a400504 on top of BtbN, but the problem still persists. https://github.com/nanake/kvazaar-test/actions/runs/3234090307 |
@jozefchutka can you test the build from https://github.com/nanake/ffmpeg-tinderbox/releases/latest if it works for you. |
@nanake cool, the ffmpeg-N-108616-git-479747645f-win64-nonfree.7z from https://github.com/nanake/ffmpeg-tinderbox/releases/latest works ok. Any chance getting these changes into BtbN builds as well? |
@nanake thank you for helping with the problem! |
It builds from different toolchain. mine based on MinGW 10, GCC 10.3. |
It would not be the first time a new compiler version breaks one of our AVX2 optimizations, I might just have to debug things with the GCC 12. |
By iterating through the optimized functions I found the functions causing the problem, not just a single function unfortunately! We have a feature to override optimizations with environment variables, the following works in windows: set KVAZAAR_OVERRIDE_sao_edge_ddistortion=generic
set KVAZAAR_OVERRIDE_calc_sao_edge_dir=generic
set KVAZAAR_OVERRIDE_sao_reconstruct_color=generic
set KVAZAAR_OVERRIDE_sao_band_ddistortion=generic
set KVAZAAR_OVERRIDE_dct_4x4=generic
set KVAZAAR_OVERRIDE_idct_4x4=generic
ffmpeg -filter_complex "smptehdbars=size=400x120:rate=30:duration=10" -c:v libkvazaar -y out.mp4 |
Good findings. I would like to stay notified on related updates. Can this github issue be used for tracking or there is some other issue or system to subscribe to? |
@jozefchutka we don't have any other system in use and I think this is the only issue we have with the ffmpeg problem.. |
I pushed a fix that seems to work for the BtbN ffmpeg build issue: 589ed47 |
fixes ultravideo/kvazaar#349 kvazaar commit ultravideo/kvazaar@589ed47 doesn't seem to have had an effect Signed-off-by: nanake <nanake@users.noreply.github.com>
I'm not sure about BtbN build. Need adding |
I don't think it will work on BtbN either as CC=x86_64-w64-mingw32-gcc
that's why I have to add that flag on my end to make it work. |
weird, I did run the docker build and the resulting binary did work, but I will fix this 😅👌🏻 |
49dc5fc should fix the GCC detection with the wildcard match |
Rebuild locally, I can verify fixed on that commit. |
updated to ultravideo/kvazaar@49dc5fc as a fix ultravideo/kvazaar#349 Signed-off-by: nanake <nanake@users.noreply.github.com>
Using various ffmpeg versions (windows: master, 5.1, 4.4) downloaded from https://github.com/BtbN/FFmpeg-Builds/releases , I am not able to make libkvazaar work:
out.mp4 is 44 bytes file (empty mp4 box I guess?)
I have also tried re-ecndoing an existing video, or different kvazaar-params but with the same result.
Is there any extra argument to be used or the encoder is broken?
I have opened an ffmpeg issue as well.
Feel free to close this issue if you find it unrelated to kvazaar, but rather bug on ffmpeg side.
The text was updated successfully, but these errors were encountered: