Kiyamou / VapourSynth-DehazingCE

Dehazing Plugin Based on Contrast Enhancement for VapourSynth
Other
11 stars 1 forks source link

No output from Dehazing? #8

Open sirnicholasevan opened 4 years ago

sirnicholasevan commented 4 years ago

Hello, I am excited to try the Dehazing function in Vapoursynth R52 on Linux. I've compiled and installed the most recent source from Github. I know the module is loading, since it gives me an error message if I don't load a video in RGB format. Here is relevant part of my test script:

import vapoursynth as vs from vapoursynth import core video = core.ffms2.Source('test.mkv') video = core.resize.Bicubic(clip=video,format=vs.RGB24, matrix_in_s="709") video = core.dhce.Dehazing(video) video = core.resize.Bicubic(clip=video, format=vs.YUV420P8, matrix_s="709") video.set_output()

The two resize functions are used to get the proper 8-bit RGB format needed. Unfortunately, the script ends with an error:

pipe:: Invalid data found when processing input

I am piping the output to ffmpeg version 4.2.4:

vspipe --y4m vapour.py - | ffmpeg -i pipe: -crf 0 -preset ultrafast video.mkv

The video info output is a follows:

vspipe -i --y4m vapour.py -

Width: 1552 Height: 1080 Frames: 150 FPS: 30000/1001 (29.970 fps) Format Name: YUV420P8 Color Family: YUV Alpha: No Sample Type: Integer Bits: 8 SubSampling W: 1 SubSampling H: 1 Core freed but 6 filter instance(s) still exist

Viewing the output directly results in a segmentation fault:

vspipe vapour2.py -

I have tried multiple videos of different sizes and framerates, but cannot figure out what the problem is. Any insight would be appreciated. Thanks in advance!

Kiyamou commented 4 years ago

I do a test, using your VapourSynth script and command. I don't occur any problem.

When you preview in vseditor, is there any problem?

Kiyamou commented 4 years ago

I'm not good at ffmpeg. I try to research the error info

Invalid data found when processing input

It seems that the problem is due to ffmpeg. Maybe your ffmpeg don't support some formats.

This is just my guess.

sirnicholasevan commented 4 years ago

Thanks for your quick response. I took ffmpeg out of the equation by viewing the output directly in the terminal:

vspipe vapour2.py -

That gave me a segmentation fault. I am wondering if the issue for me is the RGB conversion, or maybe something the source videos I am using?

Kiyamou commented 4 years ago

I test the command vspipe vapour2.py - with your script. No problems.

I don't think the problem is connected with RGB conversion. It seems to be normal. What I care about is this error info, segmentation fault. When I write the repo, the problem of out of bounds always exists, maybe it still exists.

If possible, can you provide a short clip of your source videos? I can't reproduce this problem.

sirnicholasevan commented 4 years ago

I tried some different videos and still got the segfault, unfortunately. Here is a random hazy video I pulled from Youtube with the same result (via youtube-dl script):

https://www.youtube.com/watch?v=BPzzlBVtXH0

You can also download it here:
http://nicholassolon.com/smog.mkv

I will continue to test different parameters and see if I can find a video that works. Thanks for your help.

By the way, here is the output of vspipe -v:

VapourSynth Video Processing Library Copyright (c) 2012-2020 Fredrik Mellbin Core R52 API R3.6