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, 16:49   #61  |  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   #62  |  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   #63  |  Link
Wolfberry
Helenium(Easter)
 
Wolfberry's Avatar
 
Join Date: Aug 2017
Location: Hsinchu, Taiwan
Posts: 101
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   #64  |  Link
stax76
Registered User
 
Join Date: Jun 2002
Location: Germany
Posts: 5,517
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   #65  |  Link
stax76
Registered User
 
Join Date: Jun 2002
Location: Germany
Posts: 5,517
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   #66  |  Link
stax76
Registered User
 
Join Date: Jun 2002
Location: Germany
Posts: 5,517
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   #67  |  Link
stax76
Registered User
 
Join Date: Jun 2002
Location: Germany
Posts: 5,517
@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   #68  |  Link
stax76
Registered User
 
Join Date: Jun 2002
Location: Germany
Posts: 5,517
@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   #69  |  Link
Revan654
Registered User
 
Revan654's Avatar
 
Join Date: May 2004
Posts: 320
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   #70  |  Link
Revan654
Registered User
 
Revan654's Avatar
 
Join Date: May 2004
Posts: 320
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   #71  |  Link
_Al_
Registered User
 
Join Date: May 2011
Posts: 54
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   #72  |  Link
Wolfberry
Helenium(Easter)
 
Wolfberry's Avatar
 
Join Date: Aug 2017
Location: Hsinchu, Taiwan
Posts: 101
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

Last edited by Wolfberry; 28th May 2019 at 08:08.
Wolfberry is offline   Reply With Quote
Old 19th May 2019, 13:13   #73  |  Link
stax76
Registered User
 
Join Date: Jun 2002
Location: Germany
Posts: 5,517
@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 23rd May 2019, 21:16   #74  |  Link
unix
Registered User
 
Join Date: Aug 2015
Posts: 36
I tried to use Wolfberry FFmpeg Builds but I couldn't encode, did I missed something?

vpy script:

Quote:
import os
import sys
from vapoursynth import core
import vapoursynth as vs
core = vs.get_core()

src = core.ffms2.Source(source='dcr.mkv').std.AssumeFPS(fpsnum=24000,fpsden=1001).std.Trim(60,75)
src.set_output()

Quote:
ffmpeg.exe -f vapoursynth -i TEST.vpy -c:v libx264 -an test1.mkv

Last edited by unix; 25th May 2019 at 08:41.
unix is offline   Reply With Quote
Old 23rd May 2019, 22:19   #75  |  Link
stax76
Registered User
 
Join Date: Jun 2002
Location: Germany
Posts: 5,517
Try with the most simple script, meaning only the source filter, what does ffmpeg output?
stax76 is offline   Reply With Quote
Old 24th May 2019, 07:59   #76  |  Link
unix
Registered User
 
Join Date: Aug 2015
Posts: 36
But my script so simple

Quote:
from vapoursynth import core
import vapoursynth as vs
core = vs.get_core()

src = core.ffms2.Source(source='drc.mkv')
src.set_output()
Still I didn't get any output file!!!

Last edited by unix; 25th May 2019 at 08:41.
unix is offline   Reply With Quote
Old 24th May 2019, 12:26   #77  |  Link
stax76
Registered User
 
Join Date: Jun 2002
Location: Germany
Posts: 5,517
There is no output so it could be the same problem I had before. Since you are using relative paths, are you sure all files can be found? Does it work with a real input file (mkv)?
stax76 is offline   Reply With Quote
Old 24th May 2019, 17:19   #78  |  Link
unix
Registered User
 
Join Date: Aug 2015
Posts: 36
Quote:
Originally Posted by stax76 View Post
There is no output so it could be the same problem I had before. Since you are using relative paths, are you sure all files can be found? Does it work with a real input file (mkv)?
All files are in the same folder which is VapourSynth64Portable

Quote:
from vapoursynth import core
import vapoursynth as vs
core = vs.get_core()

src = core.ffms2.Source(source='C:/Users//Desktop/VapourSynth64Portable/cdl.mkv')
src.set_output()
I tried with avi as well, but there's no output, also I used ffplay but nothing happens!

Quote:
ffplay.exe -f vapoursynth -i test.vpy
unix is offline   Reply With Quote
Old 24th May 2019, 17:43   #79  |  Link
jackoneill
unsigned int
 
jackoneill's Avatar
 
Join Date: Oct 2012
Location: 🇪🇺
Posts: 711
Quote:
Originally Posted by Wolfberry View Post
VapourSynth and VSScript are now statically linked into ffmpeg.
By the way, did you need to patch VapourSynth to accomplish this?
__________________
Buy me a "coffee" and/or hire me to write code!
jackoneill is offline   Reply With Quote
Old 24th May 2019, 18:22   #80  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 831
Quote:
Originally Posted by unix View Post
All files are in the same folder which is VapourSynth64Portable



I tried with avi as well, but there's no output, also I used ffplay but nothing happens!
I think VS needs to be installed. ffmpeg & ffplay are working fine.
Tested with: ffplay.exe -f vapoursynth -i 'D:\test.vpy'
ChaosKing 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 20:25.


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