Selur's Little Message Board
[HELP] MPEG 2 + AVI Video Files cannot encode - Printable Version

+- Selur's Little Message Board (https://forum.selur.net)
+-- Forum: Hybrid - Support (https://forum.selur.net/forum-1.html)
+--- Forum: Problems & Questions (https://forum.selur.net/forum-3.html)
+--- Thread: [HELP] MPEG 2 + AVI Video Files cannot encode (/thread-3738.html)



MPEG 2 + AVI Video Files cannot encode - badonica - 12.06.2024

Hi,

Im learning to use Hybrid and encountering a couple of issues on conversions on some archived MPEG 2 video files I captured through the Canopus DV Storm card (few years ago) and recent AVI files captured with huffyuv codec. (ATI Wonder 600 USB)

1
 Canopus Mpeg 2 files - When I load the Canopus Mpeg 2 file and try to output to MP4 - It says its crashed in the script box
If I convert the MPEG 2 Using Main Concept Reference to MP4, it works fine and encodes MP4 to MP4 no problem in Hybrid?(just a test to see if Hybrid converts on my PC)
Just seems not to encode Canopus MPEG 2?

2
AVI- files captured using huffyuv codec with PCM audio, when trying to output to MP4, it doesn't allow conversion due to HYBRID saying can't use the  PCM audio format to convert to MP4?

Hope it makes sense?

Any help appreciated

I'm using Hybrid 2020 12:13- Windows 7 64 bit

Cheers


RE: MPEG 2 + AVI Video Files cannot encode - Selur - 12.06.2024

read the sticky, provide debug output and the other details asked there,..


RE: MPEG 2 + AVI Video Files cannot encode - badonica - 12.06.2024

Hi,

Thanks for the quick reply

The program didn't crash, it just didn't encode those files , there are  no bug scripts, I set up "paths" as decribed but there are no text files

I only have a screenshot

Thanks Tom


RE: MPEG 2 + AVI Video Files cannot encode - Selur - 12.06.2024

read the sticky again and provide a debug output


RE: MPEG 2 + AVI Video Files cannot encode - badonica - 12.06.2024

Hi,

Apologies, learnt something new.

Please find attached x 2 zipped files AVI/MPEG 2

Thanks


RE: MPEG 2 + AVI Video Files cannot encode - Selur - 12.06.2024

Okay, main problem: Hybrid doesn't support Windows 7 for ages and you are using an old version.
I don't support old version, that said:

For the avi: the Error message says it all:
Quote:Format pcm is not allowed for mp4 output!
=> either convert the audio or use a container that support your streams.

For the mpeg2:
y4m [error]: bad sequence header magic
indicates that something with the Vapoursynth script.
The Vapoursynth preview should probably show a more detailed error message.
To me the Vapoursynth script looks fine:
# 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
core = vs.get_core()
# Import scripts folder
scriptPath = 'C:/Program Files/Hybrid/64bit/vsscripts'
sys.path.append(os.path.abspath(scriptPath))
# Loading Plugins
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/EEDI3.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/SourceFilter/LSmashSource/vslsmashsource.dll")
# Import scripts
import havsfunc
# source: 'F:\canopus\MPEGPRO JUNE 2024\dvs1-svhs GET CARTER 3 NO SPEAKERS PLUGGED IN.MPG'
# current color space: YUV420P8, bit depth: 8, resolution: 720x576, fps: 25, color matrix: 470bg, yuv luminance scale: limited, scanorder: top field first
# Loading F:\canopus\MPEGPRO JUNE 2024\dvs1-svhs GET CARTER 3 NO SPEAKERS PLUGGED IN.MPG using LWLibavSource
clip = core.lsmas.LWLibavSource(source="F:/canopus/MPEGPRO JUNE 2024/dvs1-svhs GET CARTER 3 NO SPEAKERS PLUGGED IN.MPG", format="YUV420P8", cache=0, prefer_hw=0)
# making sure input color matrix is set as 470bg
clip = core.resize.Point(clip, matrix_in_s="470bg",range_s="limited")
# making sure frame rate is set to 25
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
# Setting color range to TV (limited) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
# setting field order to what QTGMC should assume (top field first)
clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=2)
# Deinterlacing using QTGMC
clip = havsfunc.QTGMC(Input=clip, Preset="Fast", TFF=True)
# make sure content is preceived as frame based
clip = core.std.SetFieldBased(clip, 0)
clip = clip[::2]
# set output frame rate to 25.000fps
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
# Output
clip.set_output()
Only strange thing is that LWLibavSource is used as decoder.
Normally, DGSource is used for as source filter for mpeg input.
(does it make a difference if you change the ending from 'MPG' to 'mpg'?)

Cu Selur


RE: MPEG 2 + AVI Video Files cannot encode - badonica - 14.06.2024

Thanks for the guidance,

tried using lower case on the .MPG file extension, but it didn't change anything.

Kind regards T


RE: MPEG 2 + AVI Video Files cannot encode - Selur - 14.06.2024

If you can share a sample of the source which allows reproducing the problem, I can look into it.
Other than that, check whether the Vapoursynth Preview works or if it does show an error.

Cu Selur


RE: MPEG 2 + AVI Video Files cannot encode - badonica - 14.06.2024

Hi,

I will reduce the size of the videos and work out how to send them

Thanks


RE: MPEG 2 + AVI Video Files cannot encode - Selur - 14.06.2024

The AVI is not interesting, for that I already told you the problem and how to deal with it.