Selur's Little Message Board

Full Version: DV50 mov files crash
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Trying to deinterlace and encode to mp4.
Inputting DV50 mov files, but always get a crash with exit status 0. (Other files work fine, Prores, DV25 in mxf wrappers).

Tried multiple files.

Anyone have a clue why or how to fix?

Thanks!

_________________
version: Hybrid 2022.03.20.1
OS: Windows 10 64
[attachment=1838]
Vapoursynth script fails.
Code:
# Imports
import os
import sys
import ctypes
# Loading Support Files
Dllref = ctypes.windll.LoadLibrary("C:/Program Files/Hybrid/64bit/vsfilters/Support/libfftw3f-3.dll")
import vapoursynth as vs
# getting Vapoursynth core
core = vs.core
# Import scripts folder
scriptPath = 'C:/Program Files/Hybrid/64bit/vsscripts'
sys.path.insert(0, os.path.abspath(scriptPath))
# Loading Plugins
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/GrainFilter/RemoveGrain/RemoveGrainVS.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/GrainFilter/AddGrain/AddGrain.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/DenoiseFilter/NEO_FFT3DFilter/neo-fft3d.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/DenoiseFilter/DFTTest/DFTTest.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/EEDI3m.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/ResizeFilter/nnedi3/vsznedi3.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/libmvtools.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/temporalsoften.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/scenechange.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/fmtconv.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/MiscFilter/MiscFilters/MiscFilters.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/vslsmashsource.dll")
# Import scripts
import havsfunc
# source: 'V:\Footage\Archival Footage\Capture\Press\TestFile.mov'
# current color space: YUV422P8, bit depth: 8, resolution: 720x480, fps: 29.97, color matrix: 470bg, yuv luminance scale: limited, scanorder: bottom field first
# Loading V:\Footage\Archival Footage\Capture\Press\TestFile.mov using LibavSMASHSource
clip = core.lsmas.LibavSMASHSource(source="V:/Footage/Archival Footage/Capture/Press/TestFile.mov")
# Setting color matrix to 470bg.
clip = core.std.SetFrameProps(clip, _Matrix=5)
clip = clip if not core.text.FrameProps(clip,'_Transfer') else core.std.SetFrameProps(clip, _Transfer=5)
clip = clip if not core.text.FrameProps(clip,'_Primaries') else core.std.SetFrameProps(clip, _Primaries=5)
# Setting color range to TV (limited) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
# making sure frame rate is set to 29.970
clip = core.std.AssumeFPS(clip=clip, fpsnum=30000, fpsden=1001)
# setting field order to what QTGMC should assume (bottom field first)
clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=1)
# Deinterlacing using QTGMC
clip = havsfunc.QTGMC(Input=clip, Preset="Placebo", TFF=False) # new fps: 29.97
# make sure content is preceived as frame based
clip = core.std.SetFieldBased(clip, 0)
clip = clip[::2]
# cropping the video to 720x474
clip = core.std.CropRel(clip=clip, left=0, right=0, top=0, bottom=6)
# adjusting output color from: YUV422P8 to YUV420P8 for x264Model
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8, range_s="limited")
# Output
clip.set_output()
script seems fine on first view, I would guess that the decoder has an issue with the inpu.
=> Does the Vaoursysnteh Preview show an error?

Cu Selur
Even running the VapourSynth Viewer, without opening a file, I get an error:

Quote:Failed to open the file C:/Users/USER/AppData/Local/Temp/tempPreviewVapoursynthFile09_13_24_852.vpy.



There is no such file, but also don't know why it's looking for it before I load a video....  

Thanks!
No clue how that could happen. Smile
When I start Hybrid and press the Vapoursynth Preview button I get
---------------------------
Info
---------------------------
Current source has no video!
---------------------------
OK
---------------------------
same when I open a source, press the input button to load a new source, don't select a file (thus clearing the source) and then pressing the button.

But unless you try to encode non existing files that probably has nothing to do with the error.

Cu Selur
Ah, I was trying to use the Tools/vsViewer to open (or opening vsViewer.exe directly from the folder).

Using the preview button, the video plays fine. (But I didn't know for sure it was using the VapourSynth Viewer.) Alas, it still does not deinterlace or encode.

It is crashing on the encode step:
09_video   CRASHED   encoding video to MPEG-4 AVC with x264 (2pass 1st pass)

Thanks!
The Vapoursynth Preview is under Filtering in the right lower corner.
I know where it crashes from the debut output. I crashes when calling:
Code:
"C:\Program Files\Hybrid\64bit\Vapoursynth\vspipe.exe" "C:\Users\USER\AppData\Local\Temp\encodingTempSynthSkript_2022-08-29@11_14_23_5910.vpy" - -c y4m | "C:\Program Files\Hybrid\64bit\x264.exe" --preset veryfast --pass 1 --bitrate 10000 --profile high --level 4.1 --direct auto --b-adapt 0 --sync-lookahead 15 --qcomp 0.50 --rc-lookahead 40 --qpmax 51 --aq-mode 0 --sar 8:9 --non-deterministic --range tv --stats "C:\Users\USER\AppData\Local\Temp\TestFile_2022-08-29@11_14_23_5910_09.stats" --demuxer y4m --input-range tv --fps 30000/1001 --output-depth 8 --output NUL -
x264 returns:
Quote:x264 [error]: could not open input file `-'
y4m [error]: bad sequence header magic
as error message which happens if:
a. there is a problem with the Vapoursynth script
b. the decoder can't access the Vapoursynth script properly (which usually only happens if some over reating virus scanner or similar is actively interfering)
-> I suspect there is an issue with the source filter. Try whether it helps to disable 'Filtering->Vapoursynth->Misc->Source->Prefer LSMASHSource voer LWLibAVSourcec for mp4/mov'.
(jobs&co naturally have to be recreated)

Cu Selur
Ps.: disabling 'Filtering->Vapoursynth->Misc->Source->Prefer LWLibAVSource over FFMpegSource2' might also help.
Deselecting 'Filtering->Vapoursynth->Misc->Source->Prefer LSMASHSource over LWLibAVSourcec for mp4/mov' works!

Is this a good option? I'm assuming LSMASHSource is usually better?

(I think that Windows Security is running its realtime protection, but I can't disable that.)

When I do the VapourSynth Preview with that option selected, I do get an error:

Quote:Failed to evaluate the script:
Python exception: lsmas: failed to get video track.

Traceback (most recent call last):
File "src\cython\vapoursynth.pyx", line 2832, in vapoursynth._vpy_evaluate
File "src\cython\vapoursynth.pyx", line 2833, in vapoursynth._vpy_evaluate
File "C:\Users\USER\AppData\Local\Temp\tempPreviewVapoursynthFile13_53_29_641.vpy", line 31, in
clip = core.lsmas.LibavSMASHSource(source="V:/Footage/Archival Footage/Capture/Press/TestFile.mov")
File "src\cython\vapoursynth.pyx", line 2580, in vapoursynth.Function.__call__
vapoursynth.Error: lsmas: failed to get video track.

Thanks much!
Windows Defender should cause no issues.
Qualitywise there should be no difference between the source filters, it's mainly about speed and that some filters do not suppport each content. LSMASHSource is basically a specialized version of LWLibAVSource which is meant to better deal with mov and mp4 files, but depending on the input it might fail. Whenever I find a clear relation I adjust Hybrid to not use LSMASHSource,...
-> if you can share a small sample (a few seconds is enough) I can test it here an when I can reproduce the issue I'll adjust Hybrid to automatically not use LSMASHSource for such content. Till then disabling 'Prefer LSMASHSource over LWLibAVSourcec for mp4/mov' is fine.

Cu Selur
PM'd with mov file.
Thanks will fix for the next release. Smile

Cu Selur