Skip to content
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

No output from Dehazing? #8

Open
sirnicholasevan opened this issue Oct 7, 2020 · 5 comments
Open

No output from Dehazing? #8

sirnicholasevan opened this issue Oct 7, 2020 · 5 comments

Comments

@sirnicholasevan
Copy link

sirnicholasevan commented Oct 7, 2020

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
Copy link
Owner

Kiyamou commented Oct 8, 2020

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
Copy link
Owner

Kiyamou commented Oct 8, 2020

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
Copy link
Author

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
Copy link
Owner

Kiyamou commented Oct 9, 2020

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
Copy link
Author

sirnicholasevan commented Oct 9, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants