Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > VapourSynth

Reply
 
Thread Tools Search this Thread Display Modes
Old 4th May 2019, 11:12   #61  |  Link
hydra3333
Registered User
 
Join Date: Oct 2009
Location: crow-land
Posts: 522
Thanks !
hydra3333 is offline   Reply With Quote
Old 4th May 2019, 16:49   #62  |  Link
sl1pkn07
Pajas Mentales...
 
Join Date: Dec 2004
Location: Spanishtán
Posts: 452
that patch is safe to push to upstream?
__________________
[AUR] Vapoursynth Stuff
sl1pkn07 is offline   Reply With Quote
Old 4th May 2019, 23:17   #63  |  Link
Pat357
Registered User
 
Join Date: Jun 2006
Posts: 427
@Wolfberry
Your latest FFmpeg build N-93755-ga5387f983d (20190504) seems to be broken for me.

If I do "ffplay -i "d:\path.to\a.mkv", I get the normal text output on screen, but the window that should show the video is white with the typical "windows wait" icon that stays there for about 5 seconds after the window closes.
The 5 seconds seems to be interdependent from the video-length: same for a 20s fragment or a full film (90-210min).

Also Avisynth scripts or VS scripts produce the same scenario, even when I specify "ffplay -f vapoursynth -i a.vpy"

Your previous version N-93696-g45048ece81 posted from 2019-04-30 is working perfect.

I have VS R45 installed on my system (not port.)

From my Windows log I have :
Code:
Foutbucket 1498974882443012356, type 4
Naam van gebeurtenis: APPCRASH
Antwoord: Niet beschikbaar
Id van CAB-bestand: 0

Handtekening van probleem:
P1: ffplay.exe
P2: 0.0.0.0
P3: 00000000
P4: msvcrt.dll
P5: 7.0.17134.1
P6: 5cbba6fd
P7: c0000005
P8: 000000000005cc53
P9: 
P10:

Last edited by Pat357; 4th May 2019 at 23:48. Reason: attached windows-log info : appcrash
Pat357 is offline   Reply With Quote
Old 5th May 2019, 15:00   #64  |  Link
Wolfberry
Helenium(Easter)
 
Wolfberry's Avatar
 
Join Date: Aug 2017
Location: Hsinchu, Taiwan
Posts: 98
After some investigation, the culprit was LTO.

I saw there are some improvements in LTO optimizations in GCC 9, so I decided to give it a try.

It turns out that LTO was still more or less broken for ffmpeg, at least in MinGW.
__________________
Monochrome Anomaly

Last edited by Wolfberry; 12th May 2019 at 15:30.
Wolfberry is offline   Reply With Quote
Old 12th May 2019, 16:23   #65  |  Link
stax76
Registered User
 
Join Date: Jun 2002
Location: Germany
Posts: 5,442
Thanks for the built. Any idea what could be wrong here?

Code:
C:\Users\frank\Desktop>C:\Users\frank\Daten\Projekte\VB\staxrip\bin\Apps\Encoders\ffmpeg\ffmpeg.exe -i "C:\Users\frank\Daten\Misc\Video Samples\test_temp\test.vpy" -c:v libx264 -an -y -hide_banner "C:\Users\frank\Daten\Misc\Video Samples\test_temp\test_out.mkv"

C:\Users\frank\Daten\Misc\Video Samples\test_temp\test.vpy: Invalid data found when processing input
Code:
import os
import sys
ScriptPath = 'C:/Users/frank/Daten/Projekte/VB/staxrip/bin/Apps/Plugins/VS/Scripts'
sys.path.append(os.path.abspath(ScriptPath))
import vapoursynth as vs
core = vs.get_core()
core.std.LoadPlugin(r"C:\Users\frank\Daten\Projekte\VB\staxrip\bin\Apps\Plugins\vs\vslsmashsource\vslsmashsource.dll")
clip = core.lsmas.LibavSMASHSource(r"C:\Users\frank\Daten\Misc\Video Samples\test.mp4")
clip.set_output()
Code:
General

CompleteName             : C:\Users\frank\Daten\Misc\Video Samples\test.mp4
Format/String            : MPEG-4
Format_Profile           : Base Media
CodecID/String           : isom (isom/iso2/avc1/mp41)
FileSize/String          : 60.9 MiB
Duration/String          : 2 min 49 s
OverallBitRate/String    : 3 007 kb/s
Encoded_Application/String: Lavf57.19.100

Video

ID/String                : 1
Format/String            : AVC
Format/Info              : Advanced Video Codec
Format_Profile           : High@L4
Format_Settings          : CABAC / 3 Ref Frames
Format_Settings_CABAC/String: Yes
Format_Settings_RefFrames/String: 3 frames
CodecID                  : avc1
CodecID/Info             : Advanced Video Coding
Duration/String          : 2 min 49 s
BitRate/String           : 2 876 kb/s
Width/String             : 1 920 pixels
Height/String            : 1 080 pixels
DisplayAspectRatio/String: 16:9
FrameRate_Mode/String    : Variable
FrameRate/String         : 23.976 (24000/1001) FPS
FrameRate_Minimum/String : 23.974 FPS
FrameRate_Maximum/String : 23.981 FPS
ColorSpace               : YUV
ChromaSubsampling/String : 4:2:0
BitDepth/String          : 8 bits
ScanType/String          : Progressive
Bits-(Pixel*Frame)       : 0.058
StreamSize/String        : 58.2 MiB (96%)
colour_range             : Limited
colour_primaries         : BT.709
transfer_characteristics : BT.709
matrix_coefficients      : BT.709
Codec configuration box  : avcC

Audio

ID/String                : 2
Format/String            : AAC LC
Format/Info              : Advanced Audio Codec Low Complexity
CodecID                  : mp4a-40-2
Duration/String          : 2 min 49 s
BitRate_Mode/String      : Constant
BitRate/String           : 126 kb/s
Channel(s)/String        : 2 channels
ChannelLayout            : L R
SamplingRate/String      : 44.1 kHz
FrameRate/String         : 43.066 FPS (1024 SPF)
Compression_Mode/String  : Lossy
StreamSize/String        : 2.54 MiB (4%)
Default/String           : Yes
AlternateGroup/String    : 1
stax76 is offline   Reply With Quote
Old 12th May 2019, 16:25   #66  |  Link
stax76
Registered User
 
Join Date: Jun 2002
Location: Germany
Posts: 5,442
Same error using ffms2 as src filter.

edit:

I missed using : -f vapoursynth

Last edited by stax76; 12th May 2019 at 16:33.
stax76 is offline   Reply With Quote
Old 12th May 2019, 16:45   #67  |  Link
stax76
Registered User
 
Join Date: Jun 2002
Location: Germany
Posts: 5,442
The built works very well and it's really helpful being able to open vpy with ffmpeg.

I wonder if mpv can open vpy too? I tried it a few days before but couldn't get it working.
stax76 is offline   Reply With Quote
Old 14th May 2019, 20:19   #68  |  Link
stax76
Registered User
 
Join Date: Jun 2002
Location: Germany
Posts: 5,442
@Wolfberry

I would like to suggest using --enable-libmp3lame in the next built.
stax76 is offline   Reply With Quote
Old 15th May 2019, 16:55   #69  |  Link
stax76
Registered User
 
Join Date: Jun 2002
Location: Germany
Posts: 5,442
@Wolfberry

Thanks for the new built. There is an issue, I'm not able to use this command line:

ffmpeg.exe -f vapoursynth -i C:\test.vpy -c:v libx265 -an -y -hide_banner C:\test.mkv

The problem seem to be arbitrary because sometimes it works and it happens only with x265 and not with x264.
stax76 is offline   Reply With Quote
Old 16th May 2019, 19:59   #70  |  Link
Revan654
Registered User
 
Revan654's Avatar
 
Join Date: May 2004
Posts: 319
Quote:
Originally Posted by stax76 View Post
@Wolfberry

Thanks for the new built. There is an issue, I'm not able to use this command line:

ffmpeg.exe -f vapoursynth -i C:\test.vpy -c:v libx265 -an -y -hide_banner C:\test.mkv

The problem seem to be arbitrary because sometimes it works and it happens only with x265 and not with x264.
from what I read there been some changes to x265 ffmpeg encoder.

If all else fails you could just do this:

Quote:
"C:\Program Files (x86)\VapourSynth\core64\vspipe.exe" -y "to\your\VS\Script.vpy" - | "x265.exe" [Options] -
I know it defeats the purpose of using ffmpeg internal encoder, but cmd line might help come up with proper cmdline.

I know this code works with x265, NVEnc, and mpv player.
Revan654 is offline   Reply With Quote
Old 16th May 2019, 20:02   #71  |  Link
Revan654
Registered User
 
Revan654's Avatar
 
Join Date: May 2004
Posts: 319
Quote:
Originally Posted by stax76 View Post
The built works very well and it's really helpful being able to open vpy with ffmpeg.

I wonder if mpv can open vpy too? I tried it a few days before but couldn't get it working.
Unless something has changed, It's Not possible. I've tried to get it to work last year, Every single test failed. It would just refuse to open file or just crash the program.

However using the following line will play back the vpy script in mpv, It will lack the ability to properly scrub the file forward or back.

Quote:
"C:\Program Files (x86)\VapourSynth\core64\vspipe.exe" -y "to\your\VS\Script.vpy" - | "mpv.exe" [Options] -
This was the basic set to the script:

Quote:
import os
import sys
ScriptPath = 'Path/to/your/VS/Scripts/Filters'
sys.path.append(os.path.abspath(ScriptPath))
import vapoursynth as vs
core = vs.get_core()
core.std.LoadPlugin(r"SourceFilterHere|I'm Using DGIndexNV")
clip = core.dgdecodenv.DGSource(r"C:\to\your\Source\File.mkv")
clip.set_output()
However Potplayer can open vpy script and play it back.

Last edited by Revan654; 16th May 2019 at 20:08.
Revan654 is offline   Reply With Quote
Old 18th May 2019, 03:34   #72  |  Link
_Al_
Registered User
 
Join Date: May 2011
Posts: 43
clip could be output to mpv player right from script itself using output() and using subprocess modul. VSEdit might need clip.set_output() at the end.
Code:
import vapoursynth as vs
from vapoursynth import core
import subprocess

clip = core.avisource.AVISource(r'C:\video.avi')

#import shutil
#mpv = shutil.which('mpv')
mpv = r'C:\tools\mpv.exe'
mpv_cmd = [mpv, '-']
process = subprocess.Popen(mpv_cmd, stdin=subprocess.PIPE)
file_handle=process.stdin
clip.output(file_handle, y4m = True)
process.communicate()

Last edited by _Al_; 18th May 2019 at 03:42.
_Al_ is offline   Reply With Quote
Old 19th May 2019, 08:44   #73  |  Link
Wolfberry
Helenium(Easter)
 
Wolfberry's Avatar
 
Join Date: Aug 2017
Location: Hsinchu, Taiwan
Posts: 98
ffmpeg-20190519-c61d16c-win64-static

Code:
ffmpeg version N-93885-gc61d16cf3b Copyright (c) 2000-2019 the FFmpeg developers

built with gcc 9.1.1 (Built by Wolfberry) 20190518

configuration: --enable-amf --enable-avisynth --enable-bzlib --enable-cuda --enable-d3d11va --enable-ffnvcodec --enable-frei0r --enable-gray 
--enable-iconv --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libcdio --enable-libdav1d --enable-libflite 
--enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-liblensfun --enable-libmfx --enable-libmp3lame 
--enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-librubberband --enable-libsnappy --enable-libsoxr 
--enable-libsrt --enable-libssh --enable-libtesseract --enable-libvidstab --enable-libvmaf --enable-libvpx --enable-libwebp --enable-libx264 
--enable-libx265 --enable-libxml2 --enable-libzimg --enable-libzmq --enable-lzma --enable-nvdec --enable-nvenc --enable-opencl --enable-opengl 
--enable-openssl --enable-pocketsphinx --enable-pthreads --enable-sdl2 --enable-vapoursynth --enable-zlib --enable-gpl --enable-version3

libavutil      56. 28.100 / 56. 28.100
libavcodec     58. 52.101 / 58. 52.101
libavformat    58. 27.103 / 58. 27.103
libavdevice    58.  7.100 / 58.  7.100
libavfilter     7. 53.101 /  7. 53.101
libswscale      5.  4.101 /  5.  4.101
libswresample   3.  4.100 /  3.  4.100
libpostproc    55.  4.100 / 55.  4.100
Quote:
Originally Posted by stax76 View Post
The problem seem to be arbitrary because sometimes it works and it happens only with x265 and not with x264.
Yes, I am able to reproduce it.

I adjusted the LAVF patches for x265 and it seems to be better, can you confirm?
__________________
Monochrome Anomaly
Wolfberry is offline   Reply With Quote
Old 19th May 2019, 13:13   #74  |  Link
stax76
Registered User
 
Join Date: Jun 2002
Location: Germany
Posts: 5,442
@Wolfberry

It's either fixed or improved, didn't happen in a couple of test runs, much appreciated, thanks.
stax76 is offline   Reply With Quote
Old Yesterday, 06:50   #75  |  Link
Wolfberry
Helenium(Easter)
 
Wolfberry's Avatar
 
Join Date: Aug 2017
Location: Hsinchu, Taiwan
Posts: 98
ffmpeg-20190520-fbdb3aa-win64-static

Code:
ffmpeg version N-93886-gfbdb3aa179 Copyright (c) 2000-2019 the FFmpeg developers

built with gcc 9.1.1 (Built by Wolfberry) 20190518

configuration: --enable-amf --enable-avisynth --enable-bzlib --enable-cuda --enable-d3d11va --enable-ffnvcodec --enable-frei0r --enable-gray 
--enable-iconv --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libcdio --enable-libdav1d --enable-libflite 
--enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-liblensfun --enable-libmfx --enable-libmp3lame 
--enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-librubberband --enable-libsnappy --enable-libsoxr 
--enable-libsrt --enable-libssh --enable-libtesseract --enable-libvidstab --enable-libvmaf --enable-libvpx --enable-libwebp --enable-libx264 
--enable-libx265 --enable-libxml2 --enable-libzimg --enable-libzmq --enable-lzma --enable-nvdec --enable-nvenc --enable-opencl --enable-opengl 
--enable-openssl --enable-pocketsphinx --enable-pthreads --enable-sdl2 --enable-vapoursynth --enable-zlib --enable-gpl --enable-version3

libavutil      56. 28.100 / 56. 28.100
libavcodec     58. 52.101 / 58. 52.101
libavformat    58. 27.103 / 58. 27.103
libavdevice    58.  7.100 / 58.  7.100
libavfilter     7. 53.101 /  7. 53.101
libswscale      5.  4.101 /  5.  4.101
libswresample   3.  4.100 /  3.  4.100
libpostproc    55.  4.100 / 55.  4.100
VapourSynth and VSScript are now statically linked into ffmpeg.
__________________
Monochrome Anomaly

Last edited by Wolfberry; Yesterday at 09:00.
Wolfberry is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 18:43.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.