Orange-OpenSource / AIVC

AIVC is a fully-learned video codec. It is able to code video sequences at different rates and it features tunable coding configurations.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

compressed.yuv can not open

MichaelSunEngineer opened this issue · comments

I have configured the code according to your instructions, and the code has finished running, but the final decoded file cannot be opened and played by YUV software. The original video can be played. Where is the problem
$ ./sanity_script.sh
********************************************************************************
Starting encoding
Using /home/ganzhi/.cache/torch_extensions as PyTorch extensions root...
Emitting ninja build file /home/ganzhi/.cache/torch_extensions/torchac_backend/build.ninja...
Building extension module torchac_backend...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
[1/2] c++ -MMD -MF torchac_backend.o.d -DTORCH_EXTENSION_NAME=torchac_backend -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="_gcc" -DPYBIND11_STDLIB="_libstdcpp" -DPYBIND11_BUILD_ABI="_cxxabi1011" -isystem /home/ganzhi/.local/lib/python3.8/site-packages/torch/include -isystem /home/ganzhi/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -isystem /home/ganzhi/.local/lib/python3.8/site-packages/torch/include/TH -isystem /home/ganzhi/.local/lib/python3.8/site-packages/torch/include/THC -isystem /usr/include/python3.8 -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++14 -c /home/ganzhi/.local/lib/python3.8/site-packages/torchac/backend/torchac_backend.cpp -o torchac_backend.o
[2/2] c++ torchac_backend.o -shared -L/home/ganzhi/.local/lib/python3.8/site-packages/torch/lib -lc10 -ltorch_cpu -ltorch -ltorch_python -o torchac_backend.so
Loading extension module torchac_backend...
[STATE] Start processing: yuv -> png
Input file: ../raw_videos/BlowingBubbles_416x240_50_420.yuv
Output directory: ../raw_videos/BlowingBubbles_416x240_50_420/
Number of frames in the video: 101
Frame: 101 / 101
[STATE] End processing: yuv -> png
[STATE] End processing
[INFO] | Seed | | 666
[W Context.cpp:69] Warning: torch.set_deterministic is in beta, and its design and functionality may change in the future. (function operator())
model path == ./0_model.pt
rm: 无法删除 '../tmp/3697412327659087746_0/tmp_bitstream_working_dir/': 没有那个文件或目录
rm: 无法删除 '../tmp/3697412327659087746_0/tmp_bitstream_working_dir': 没有那个文件或目录
[INFO] | Start encoding | |
[INFO] | infer_one_sequence | sequence name | BlowingBubbles_416x240_50_420
[INFO] | infer_one_sequence | GOP_struct_name | 2_GOP_16
[INFO] | infer_one_sequence | idx_rate | 0
[DEBUG] | infer_one_sequence | nb_GOP | 4
[INFO] | Encoding done | |
[INFO] | Bitstream path | | ../bitstream.bin
[INFO] | Frame resolution | [H x W] | 240 x 416
[INFO] | First coded frame | [frame] | 0
[INFO] | Last coded frame | [frame] | 100
[INFO] | Number of frames to code | [frame] | 101
[INFO] | Number of frames coded | [frame] | 132
[INFO] | Intra-period | [frame] | 33
[RESULT] | Number of frames | [frame] | 101
[RESULT] | Encoding/decoding time | [s] | 20.4
[RESULT] | Encoding/decoding FPS | [frame/s] | 5.0
[RESULT] | Estimated PSNR | [dB] | 26.7213
[RESULT] | Estimated MS-SSIM | [dB] | 11.8853
[RESULT] | Estimated rate | [byte] | 23382.6
[RESULT] | Real rate | [byte] | 28448
[RESULT] | Estimated rate overhead | [%] | 21.66
********************************************************************************
Starting decoding
Using /home/ganzhi/.cache/torch_extensions as PyTorch extensions root...
Emitting ninja build file /home/ganzhi/.cache/torch_extensions/torchac_backend/build.ninja...
Building extension module torchac_backend...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
ninja: no work to do.
Loading extension module torchac_backend...
model path == ./0_model.pt
[INFO] | | | Found CUDA device
[INFO] | Seed | | 666
[W Context.cpp:69] Warning: torch.set_deterministic is in beta, and its design and functionality may change in the future. (function operator())
[INFO] | Bitstream path | | ../bitstream.bin
[INFO] | Bitstream processing dir. | | ../tmp/3697412327659087746_0/tmp_out_bitstream/
[INFO] | Decoded frames directory | | ../compressed/
[INFO] | Number of GOPs in bitstream | | 4
[INFO] | Index first frame | | 0
[INFO] | Index last frame | | 100
[INFO] | Start decoding | |
[INFO] | Decoding done | |
[RESULT] | Number of frames | [frame] | 101
[RESULT] | Decoding time | [s] | 15.9
[RESULT] | Decoding FPS | [frame/s] | 6.4
[STATE] Starting png -> yuv conversion
[INFO] | Final decoded video | | ../compressed.yuv
********************************************************************************
Starting evaluation
PSNR [dB]: 26.72129
MS-SSIM : 0.93531
MS-SSIM [dB]: 11.89145
Size [bytes]: 28448

Oh, I see the problem. The player parameters need to be adjusted to be consistent