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 1st May 2018, 20:51   #21  |  Link
JEEB
もこたんインしたお!
 
JEEB's Avatar
 
Join Date: Jan 2008
Location: Finland / Japan
Posts: 514
Quote:
Originally Posted by jackoneill View Post
And you need to pass -lpython3.6m most likely because ffmpeg's configure doesn't call pkg-config with the --static parameter. If it did, VSScript's pkg-config file would give it -lpython3.6m already.
Code:
--pkg-config-flags=FLAGS pass additional flags to pkgconf []
In other words, adding "--static" to this will get you that.
__________________
[I'm human, no debug]
JEEB is offline   Reply With Quote
Old 5th May 2018, 03:21   #22  |  Link
hydra3333
Registered User
 
Join Date: Oct 2009
Location: crow-land
Posts: 532
Here's the ffmpeg commit
https://git.ffmpeg.org/gitweb/ffmpeg...182aa0b3778b79

Quote:
avformat: add vapoursynth wrapper

This can "demux" .vpy files. Autodetection of .vpy scripts is
intentionally not done, because it would be a major security issue. You
need to force the format, for example with "-f vapoursynth" for the
FFmpeg CLI tools.

Some minor code copied from other LGPL parts of FFmpeg.

I did not find a good way to test a few of the more obscure VS features,
like VFR nodes, compat pixel formats, or nodes with dynamic size/format
changes. These can be easily implemented on demand.
--enable-vapoursynth in the ffmpeg configure

Last edited by hydra3333; 5th May 2018 at 03:24.
hydra3333 is offline   Reply With Quote
Old 5th May 2018, 05:47   #23  |  Link
hydra3333
Registered User
 
Join Date: Oct 2009
Location: crow-land
Posts: 532
It nearly works, as reported in https://github.com/DeadSix27/python_...ript/issues/61
It seems that something may be amiss per comment https://github.com/DeadSix27/python_...ment-386771355
hydra3333 is offline   Reply With Quote
Old 20th June 2018, 14:01   #24  |  Link
ca18
Registered User
 
Join Date: Feb 2016
Posts: 5
Quote:
Originally Posted by HolyWu
By the way the patch on FFmpeg mailing list seems buggy, it gives an error when trying to open vpy file. But Stephen's patch works fine for me.
Hi HolyWu, what is "Stephen's patch" and where can we find it? Thanks!
ca18 is offline   Reply With Quote
Old 3rd July 2018, 01:18   #25  |  Link
hydra3333
Registered User
 
Join Date: Oct 2009
Location: crow-land
Posts: 532
Quote:
Originally Posted by ca18 View Post
Hi HolyWu, what is "Stephen's patch" and where can we find it? Thanks!
bump ?
hydra3333 is offline   Reply With Quote
Old 3rd July 2018, 05:10   #26  |  Link
DJATOM
Registered User
 
DJATOM's Avatar
 
Join Date: Sep 2010
Location: Ukraine, Bohuslav
Posts: 188
I still have it: https://pastebin.com/Ls1LmTyj
__________________
Me on GitHub | My Telegram
PC Specs: Ryzen 3900X (no OC with 250W Air cooling), Asus ROG Crosshair Hero VII (WiFi) @ chipset x470, 32 GB RAM @ 3333MHz OC, Gigabyte RTX 2070, Kingston A1000 @ 240 GB
DJATOM is offline   Reply With Quote
Old 4th July 2018, 00:25   #27  |  Link
ca18
Registered User
 
Join Date: Feb 2016
Posts: 5
Thank you for digging that up so it can be compared now to the "official" nonworking patch.
ca18 is offline   Reply With Quote
Old 5th July 2018, 22:10   #28  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,173
Wait a second. VapourSynth directly executes any Python script (without any restrictions?), so it's like opening Word documents without any macro restrictions?

That means that if you have vpy files associated with a program and you click on a vpy script someone sends you via email, it could execute anything directly on your computer?

I don't like this design decision... Are there at least restrictions on what the script can do?
MysteryX is offline   Reply With Quote
Old 5th July 2018, 22:37   #29  |  Link
DJATOM
Registered User
 
DJATOM's Avatar
 
Join Date: Sep 2010
Location: Ukraine, Bohuslav
Posts: 188
It can't do anything admin-related until you allow it (start with admin privileges).
__________________
Me on GitHub | My Telegram
PC Specs: Ryzen 3900X (no OC with 250W Air cooling), Asus ROG Crosshair Hero VII (WiFi) @ chipset x470, 32 GB RAM @ 3333MHz OC, Gigabyte RTX 2070, Kingston A1000 @ 240 GB
DJATOM is offline   Reply With Quote
Old 5th July 2018, 22:42   #30  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Ikea Chair
Posts: 2,035
Quote:
Originally Posted by MysteryX View Post
Wait a second. VapourSynth directly executes any Python script (without any restrictions?), so it's like opening Word documents without any macro restrictions?

That means that if you have vpy files associated with a program and you click on a vpy script someone sends you via email, it could execute anything directly on your computer?

I don't like this design decision... Are there at least restrictions on what the script can do?
I didn't see you complaining when you loaded dll files from strangers you found on the interwebs. Same thing. If you don't check or sandbox things it's your own fault.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 6th July 2018, 03:53   #31  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,173
There are indeed risks with downloading DLLs from unknown sources. However, one needs to do special work to run code in a DLL, it won't happen automatically, and most viruses within DLLs will be auto-detected by a good anti-virus.

Running a Python script by double-clicking on a file (for users who may not even know what VapourSynth is), however, can seriously limit the adaptation of VapourSynth. If that's the reason FFMPEG hasn't added native support for it, then I fully understand. In a business or production environment, have to be *VERY* careful where the scripts are coming from and where they are running. I don't think many people realize that. I also don't think Kaspersky will scan the Python raw script for malicious code.

I would say that this, combined with the lack of audio support, are the 2 things most limiting the adaptation of VapourSynth.
MysteryX is offline   Reply With Quote
Old 6th July 2018, 04:18   #32  |  Link
hydra3333
Registered User
 
Join Date: Oct 2009
Location: crow-land
Posts: 532
OK, any recommendations or hints (other than yes you should do this) on sandboxing under Win10x64 ?

My preference is to always use portable version of things, if that helps with advice.
Quote:
If you don't check or sandbox things it's your own fault
Audio support may seem to be a bit problematic if video/audio delays are involved - at one point I had to process them separately each into a separate .mp4 container to preserve a delay, although it may have changed since then and/or I was doing something wrong ... tinkered until a process worked.

Last edited by hydra3333; 6th July 2018 at 04:22.
hydra3333 is offline   Reply With Quote
Old 6th July 2018, 04:59   #33  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,173
Quote:
Originally Posted by hydra3333 View Post
My preference is to always use portable version of things, if that helps with advice.
Running a portable version won't change anything in regards to security. The script can still execute or do anything that doesn't require admin privilege.

Quote:
Audio support may seem to be a bit problematic if video/audio delays are involved - at one point I had to process them separately each into a separate .mp4 container to preserve a delay, although it may have changed since then and/or I was doing something wrong ... tinkered until a process worked.
That's for holding audio (associating it with the video track). AFAIK there's nothing in regards to audio processing.
MysteryX is offline   Reply With Quote
Old 6th July 2018, 10:01   #34  |  Link
shekh
Registered User
 
Join Date: Mar 2015
Posts: 706
Quote:
Originally Posted by MysteryX View Post
...If that's the reason FFMPEG hasn't added native support for it, then I fully understand.
How is this FFMpeg problem? It does not create file associations.
__________________
VirtualDub2
shekh is offline   Reply With Quote
Old 6th July 2018, 10:33   #35  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,042
Quote:
Originally Posted by MysteryX View Post
Wait a second. VapourSynth directly executes any Python script (without any restrictions?), so it's like opening Word documents without any macro restrictions?

That means that if you have vpy files associated with a program and you click on a vpy script someone sends you via email, it could execute anything directly on your computer?

I don't like this design decision... Are there at least restrictions on what the script can do?
The same applies to py files (blame python installer). That about bat or exe files? They have the same "power of potential destruction", I don't see why this is suddenly a problem now. Or do you click on every exe file send by email to you?

Edit:
If your vpy is associated with an editor, why would this be a bad thing? It is only executed only if you run it.
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database || https://github.com/avisynth-repository

Last edited by ChaosKing; 6th July 2018 at 10:46.
ChaosKing is offline   Reply With Quote
Old 6th July 2018, 11:01   #36  |  Link
hydra3333
Registered User
 
Join Date: Oct 2009
Location: crow-land
Posts: 532
afaik vpy is not associated in a portable vapoursynth install ? would (portable) ffmpeg not create any associations ?
An untested assumption is to pop ffmpeg into the same folder as portable vapoursynth and then run ffmpeg with the correct commandline to open a vpy that the user specifies ?
( Assuming that one has a static vapoursynth enabled build of ffmpeg which works )
hydra3333 is offline   Reply With Quote
Old 6th July 2018, 11:31   #37  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,042
I have the install version of VS and there is no auto association of vpy files.
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database || https://github.com/avisynth-repository

Last edited by ChaosKing; 6th July 2018 at 11:34.
ChaosKing is offline   Reply With Quote
Old 6th July 2018, 16:22   #38  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,173
FFMPEG doesn't create any file association. However, in a business environment, the scripts may be running in one environment while production material is being fed from employees on the network. If, for example, the server is designed to automatically batch-process all scripts in a folder, and someone manages to push a script in there, he can run anything he wants on the server. Perhaps the admins don't even know about VapourSynth and just try to read every video file in that folder thinking they are harmless.

There are lots of scenarios where we don't care about security -- but in cases where it's important, we're at a bad start.

Quote:
Originally Posted by ChaosKing View Post
That about bat or exe files? They have the same "power of potential destruction", I don't see why this is suddenly a problem now.
The danger of EXE and BAT files is very well known, and many steps have been taken to limit their damage. Browsers will give you strong warnings, EXE/BAT files are flagged as coming from the Internet and will ask you for confirmation to run them, and anti-viruses will scan them. The danger of Word files was also very well-known, prompting Microsoft to disable macros by default, and give strong warnings before executing any macro.

I'll also note that this isn't an issue in Avisynth.

In .NET, at least, there are sandboxing options where the code can run with limited privilege, which allows for Silverlight that could run within a browser (but then browsers dropped support for Silverlight anyway).

Indeed VapourSynth doesn't create any file association by default -- but I associated them with a program to preview the files, not knowing the risks that go with it. Of course it's not much of a personal issue on my laptop where I'm in control of everything, but in a business network, things aren't so simple.

Just to put things into perspective, FFMPEG is being used by all kinds of corporations. Many of them have batch-processing servers (and aren't even using VapourSynth). Adding native support for VapourSynth in FFMPEG would put all of these batch-processing servers and businesses at risk, as anyone who can push a file into the batch-processing could run anything on the server. The only way around that would be for server admin to explicitly forbid VapourSynth extensions -- essentially disabling FFMPEG's VapourSynth support. It certainly cannot be turned on by default.

Last edited by MysteryX; 6th July 2018 at 16:49.
MysteryX is offline   Reply With Quote
Old 6th July 2018, 22:59   #39  |  Link
amichaelt
Registered User
 
Join Date: Apr 2018
Posts: 63
Quote:
Just to put things into perspective, FFMPEG is being used by all kinds of corporations. Many of them have batch-processing servers (and aren't even using VapourSynth). Adding native support for VapourSynth in FFMPEG would put all of these batch-processing servers and businesses at risk, as anyone who can push a file into the batch-processing could run anything on the server. The only way around that would be for server admin to explicitly forbid VapourSynth extensions -- essentially disabling FFMPEG's VapourSynth support. It certainly cannot be turned on by default.
Interesting FUD and all, but as linked to above, native Vapoursynth script support was committed to the ffmpeg git repository back in April and it's still there today.
__________________
My project BDSup2Sub++: https://github.com/amichaeltm/BDSup2SubPlusPlus
amichaelt is offline   Reply With Quote
Old 7th July 2018, 00:18   #40  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,173
Isn't this whole conversation because it isn't enabled by default?
MysteryX 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 17:30.


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