fraunhoferhhi / vvdec

VVdeC, the Fraunhofer Versatile Video Decoder
https://www.hhi.fraunhofer.de/en/departments/vca/technologies-and-solutions/h266-vvc.html
BSD 3-Clause Clear License
465 stars 97 forks source link

CMake error at Path #79

Closed asqarkababi closed 2 years ago

asqarkababi commented 2 years ago

Severity Code Description Project File Line Suppression State Error CMake Error at C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.20/Modules/CMakeTestCCompiler.cmake:66 (message): The C compiler

"C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: C:/Users/mmard/source/repos/vvdec/out/build/x64-Debug/CMakeFiles/CMakeTmp

Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe cmTC_d3696 && [1/2] Building C object CMakeFiles\cmTC_d3696.dir\testCCompiler.c.obj
[2/2] Linking C executable cmTC_d3696.exe
FAILED: cmTC_d3696.exe 
cmd.exe /C "cd . && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_d3696.dir --rc=rc --mt=CMAKE_MT-NOTFOUND --manifests  -- C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\link.exe /nologo CMakeFiles\cmTC_d3696.dir\testCCompiler.c.obj  /out:cmTC_d3696.exe /implib:cmTC_d3696.lib /pdb:cmTC_d3696.pdb /version:0.0 /machine:x64  /debug /INCREMENTAL /subsystem:console  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
RC Pass 1: command "rc /fo CMakeFiles\cmTC_d3696.dir/manifest.res CMakeFiles\cmTC_d3696.dir/manifest.rc" failed (exit code 0) with the following output:
Das System kann die angegebene Datei nicht finden
ninja: build stopped: subcommand failed.

CMake will not be able to correctly generate this project. C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.20/Modules/CMakeTestCCompiler.cmake 66
Hello How to solve this ?

adamjw24 commented 2 years ago

Could you please paste a full log of what it is you're doing?

Do you open a project through "Open CMake dir" or generate it with make configure or cmake ... or the CMakeGUI?

Looks like a broken MSVC installation, but cannot be sure without more info.

asqarkababi commented 2 years ago

I installed CMake on Visual Studio 2019 Community and Cloned the Git Repository Im using the Paper to install the vvdec step by step when i open the folder with the project i even cant debug like vvenc I get the following error in the error list
Severity Code Description Project File Line Suppression State Error CMake Error at C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.20/Modules/CMakeTestCCompiler.cmake:66 (message): The C compiler

"C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: C:/Users/mmard/OneDrive/Desktop/vvdec-1.2.0-1/out/build/x64-Debug/CMakeFiles/CMakeTmp

Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe cmTC_34e6f && [1/2] Building C object CMakeFiles\cmTC_34e6f.dir\testCCompiler.c.obj
[2/2] Linking C executable cmTC_34e6f.exe
FAILED: cmTC_34e6f.exe 
cmd.exe /C "cd . && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_34e6f.dir --rc=rc --mt=CMAKE_MT-NOTFOUND --manifests  -- C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\link.exe /nologo CMakeFiles\cmTC_34e6f.dir\testCCompiler.c.obj  /out:cmTC_34e6f.exe /implib:cmTC_34e6f.lib /pdb:cmTC_34e6f.pdb /version:0.0 /machine:x64  /debug /INCREMENTAL /subsystem:console  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
RC Pass 1: command "rc /fo CMakeFiles\cmTC_34e6f.dir/manifest.res CMakeFiles\cmTC_34e6f.dir/manifest.rc" failed (exit code 0) with the following output:
Das System kann die angegebene Datei nicht finden
ninja: build stopped: subcommand failed.  CMake will not be able to correctly generate this project.        C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.20/Modules/CMakeTestCCompiler.cmake  66  
Screenshot 2022-02-20 175045
adamjw24 commented 2 years ago

The problem is, your build fails before it actually starts processing VVdeC, it fails at checking your environment, which makes it hard for me to understand.

Can you download some sample C++ project (I'm sure MSVC or CMake have stuff like that) and see if you can build it?

Otherwise, I see you checked out the project to OneDrive, which as I understand is cloud storage, right? Maybe try cloning properly to local hard-disk?

Last but not least, please use the latest version of VVdeC.

asqarkababi commented 2 years ago

I build vvenc before just fine without any problems with the last builing i will try vvdec again this time with cloning it again there persist the same problem it seems that ome files are missing or something that were present in the vvenc repositor

Screenshot 2022-02-20 182526

y

adamjw24 commented 2 years ago

Strange. I'll ask around if someone has seen this problem. What if you do it from the console?

# git clone ...
# cd vvdec
# make distclean
# make install-release
asqarkababi commented 2 years ago

make functions dont work on the VS Console because of the Cmake proble

Screenshot 2022-02-20 184840

m

lehmann-c commented 2 years ago

If you want to use make/Makefiles on Windows be sure to install gnuwin32. Please have a look into the wiki to see how you can build via make or via cmake: https://github.com/fraunhoferhhi/vvdec/wiki/Build

You can also build with cmake by using e.g.: cmake -S . -B build/static -A x64 -DCMAKE_CONFIGURATION_TYPES=Release cmake --build build/static --config Release -- /maxcpucount:8 /verbosity:minimal /nr:false

asqarkababi commented 2 years ago

If you want to use make/Makefiles on Windows be sure to install gnuwin32. Please have a look into the wiki to see how you can build via make or via cmake: https://github.com/fraunhoferhhi/vvdec/wiki/Build

You can also build with cmake by using e.g.: cmake -S . -B build/static -A x64 -DCMAKE_CONFIGURATION_TYPES=Release cmake --build build/static --config Release -- /maxcpucount:8 /verbosity:minimal /nr:false

Thank you very much i installed mingw32 and in the commandline in VSS2019 i wrote instead of make mingw32-make install-release and it worked i decoded a video to yuv and watched the video on yuvplayer but it looks like this and its very small

Screenshot 2022-02-21 100848
adamjw24 commented 2 years ago

About how the video looks, did you have a look at? https://github.com/fraunhoferhhi/vvdec/discussions/50

asqarkababi commented 2 years ago

Could you give me a hint how to decode it properly i encoded it with the simple app and not with the professional app is there a difference between their results ? is it possible to decode the encoded file with the simple app with vdecapp ?

adamjw24 commented 2 years ago

You probably decoded it properly, you just need to view it properly now. Your format is yuv420p10le, and not yuv420p.

Could you do a list of the steps you did (exact command lines) as well as list the files and files sizes of all used files (input, bitstream, reconstruction)?

asqarkababi commented 2 years ago

For the vveec i made this command i found on the internet the file is 720p but i dont know if its really now converted to 1080p

Screenshot 2022-02-21 121853

And the filesizes are as follows

Screenshot 2022-02-21 122234

I hope i understood your question correct and sent you the correct files

adamjw24 commented 2 years ago

This will not work. You cannot feed an mp4-file to VVenC. You could for example use the following script to transcode an mp4-file to .266: https://github.com/fraunhoferhhi/vvenc/discussions/116

Alternatively, decode the mp4 to a YUV using: ffmpeg -i R.mp4 -f rawvideo -pix_fmt yuv420p10le R.yuv

Than, repeat the process using -i R.yuv instead of -i R.mp4 in the VVenC command-line.

asqarkababi commented 2 years ago

Thank you very much i will try it out and report you the outcome One question should i use this coomand in the vvenc : vvencapp -i R.yuv -s 1920x1080 -c yuv420 -r 30 --preset medium --qp 31 --qpa 0 -ip 64 -t 4 -o R.266 ?

adamjw24 commented 2 years ago

Wait, no. If you convert mp4 to yuv as yuv420p10le, you have to use -c yuv420_10. So: vvencapp -i R.yuv -s 1920x1080 -c yuv420_10 -r 30 --preset medium --qp 31 --qpa 0 -ip 64 -t 4 -o R.266

asqarkababi commented 2 years ago

I converted the mp4 file to yuv file but vlc player doesnt play it even in the documentation of VLC it ia compatible with it

adamjw24 commented 2 years ago

And ffplay? ffplay -f rawvideo -pix_fmt yuv420p10le -i R.yuv

I'm not an expert on VLC so don't know how to make it play.

adamjw24 commented 2 years ago

Why don't you just use YUView or other yuvplayer to play the yuv?

asqarkababi commented 2 years ago

And ffplay? ffplay -f rawvideo -pix_fmt yuv420p10le -i R.yuv

I'm not an expert on VLC so don't know how to make it play.

I will try the command

Why don't you just use YUView or other yuvplayer to play the yuv?

Screenshot 2022-02-21 141736

I used yuvplayer and i got that pixelated output i will try YUVIEW too to see how the result is

adamjw24 commented 2 years ago

Change the input format of your yuvplayer from 8 to 10 bit

adamjw24 commented 2 years ago

Or maybe actually more simply, use an 8-bit pipeline: Convert R.mp4 to R.yuv: ffmpeg -i R.mp4 -f rawvideo -pix_fmt yuv420p R.yuv Encode with VVenC, 8-bit: vvencapp -i R.yuv -s 1920x1080 -c yuv420 -r 30 --preset medium --qp 31 --qpa 0 -ip 64 -t 4 --internal-bitdepth 8 -o R.266 Decode with VVdeC: vvdecapp -b R.266 -o R2.yuv

Now both R.yuv and R2.yuv are 8-bit YUVs. I think this would be more suited for your testing.

asqarkababi commented 2 years ago

Or maybe actually more simply, use an 8-bit pipeline: Convert R.mp4 to R.yuv: ffmpeg -i R.mp4 -f rawvideo -pix_fmt yuv420p R.yuv Encode with VVenC, 8-bit: vvencapp -i R.yuv -s 1920x1080 -c yuv420 -r 30 --preset medium --qp 31 --qpa 0 -ip 64 -t 4 --internal-bitdepth 8 -o R.266 Decode with VVdeC: vvdecapp -b R.266 -o R2.yuv

Now both R.yuv and R2.yuv are 8-bit YUVs. I think this would be more suited for your testing.

Thank you very much i will try it out and will see if its working

asqarkababi commented 2 years ago

I tried it out video is not playing no pixelation anymore

Screenshot 2022-02-21 150008
adamjw24 commented 2 years ago

With the 8-bit pipeline you should be able to just use yuvplayer.

asqarkababi commented 2 years ago

With the 8-bit pipeline you should be able to just use yuvplayer.

Screenshot 2022-02-21 150514

Strange its still pixelated

adamjw24 commented 2 years ago

I don't know than. For YUView you have to set the correct size in the right pane. I don't know what yuvplayer is. Did you set the correct video size? yuv is a format that does not contain any metadata whatsoever (no width/height, nothing), so you have to tell your player explicitly how to interpret this.

Please make sure you can actually view your raw YUV input properly before we continue discussing usage of VVenC and VVdeC.

asqarkababi commented 2 years ago

So i changed the video size to the Original of the Video i had and its working and im sorry as im still a beginner My Question is : is not the video after we used ffmpeg and changed the resolution is not the display resolution changing to the desired resolution that is 1080p ?

Screenshot 2022-02-21 153300
adamjw24 commented 2 years ago

Your source it what it is. Just set the proper resolution while encoding (-s 540x360).

asqarkababi commented 2 years ago

Your source it what it is. Just set the proper resolution while encoding (-s 540x360).

Thank you very much i will add the proper resolution in vvenc the next time i will encode

asqarkababi commented 2 years ago

it seems both encoder and decoder work properly I thank you so much for your help I close this issue now