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. |
22nd January 2017, 13:37 | #21 | Link | |
Formerly davidh*****
Join Date: Jan 2004
Posts: 2,493
|
Quote:
Perhaps worth noting though that there are some things rgba_rpn/y8_rpn can't do, or at the very least would be completely impractical to do. Also while it's fast, it is extremely unlikely to be optimal compared to a bespoke C++ filer. There is a new version coming soon with YV24 and YV12 support (the latter will come with certain necessary restrictions). |
|
22nd January 2017, 15:52 | #22 | Link |
Registered User
Join Date: Dec 2013
Location: France
Posts: 64
|
MysteryX
About AvsFilterNET : With the link, we have access to the AvsFilterNET Code (GitHub). But where is the update (7 months ago) of the file AvsFilterNET.dll ? We find that of SAPikachu dated 27 February 2011 (AvsFilterNet r62998). But where is the last ? Another question: your version is, a priori, dedicated to Avisynth+. Is it usable with Avisynth 2.6 ? Thank. |
22nd January 2017, 21:13 | #23 | Link | |
Registered User
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
|
Quote:
__________________
https://github.com/stax76/software-list https://www.youtube.com/@stax76/playlists |
|
23rd January 2017, 09:15 | #24 | Link | |
Registered User
Join Date: Dec 2013
Location: France
Posts: 64
|
stax76
Quote:
In the ZIP file, there is a Docs directory with 2 files (including 1 in French ... Ouf !!). In the ReadMe.rtf file, the following is noted: "What’s more, MS has dropped support for this solution" Unless otherwise stated, DirectShow also depends on the development of DirectX. And DirectX is no longer supported by Microsoft since June 2010. Google search : "Where is the DirectX SDK (2015 Edition) ?" "As noted on MSDN, the DirectX SDK is deprecated" But, perhaps, that is still usable, especially with Windows SDK. But, I have not tried ..... This being so, congratulations for this StaxRip. |
|
25th January 2017, 19:02 | #25 | Link | |
Soul Architect
Join Date: Apr 2014
Posts: 2,559
|
Quote:
It supports both Avisynth+ and Avisynth 2.6. It uses the headers of Avisynth+ which are compatible with both. y8_rpn might make development a bit simpler but it won't provide easy cross-process communication the way VB.NET does. |
|
29th January 2017, 05:45 | #26 | Link | |
Soul Architect
Join Date: Apr 2014
Posts: 2,559
|
Quote:
Edit: I probably won't want to do that... if I get something in .NET that plays like VirtualDub, it doesn't allow video resizing and fullscreen, and doesn't allow SVP to hook into the rendering chain. There's probably a lot of work required to get that to work like a media player.
__________________
FrameRateConverter | AvisynthShader | AvsFilterNet | Natural Grounding Player with Yin Media Encoder, 432hz Player, Powerliminals Player and Audio Video Muxer Last edited by MysteryX; 29th January 2017 at 06:11. |
|
31st January 2017, 13:47 | #27 | Link |
Registered User
Join Date: Dec 2013
Location: France
Posts: 64
|
Hello MysteryX
Yes, it's not easy to find a VB.NET Player for AVS scripts. I tried WMP. It's OK, but it is slow, and some commands are only accessible by the Focus for an AVS script. DirectX is no longer current. Too bad ! One of the few solutions I tested is the "mciSendString", but it's hyper-complicated to implement in a PictureBox (video resizing, etc..). For now, not found better than VirtualDub in terms of reactivity, but it is not possible to include in the Interface. ___________________ Film9 |
31st January 2017, 15:50 | #29 | Link |
Registered User
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
|
@GillesH
here is code for a basic DirectShow player I wrote in VB.NET: http://www.mediafire.com/file/2wba44.../StaxPlayer.7z I used SharpDevelop 4.4 to automatically convert the DirectShowNet pinvoke code from C# to VB.NET @MysteryX What kind of API has MPC? It would be cool if it had a real scripting API like MediaMonkey 5 (JS V8), Kodi (Python) or VLC (Lua), personally I would try to use the Chakra API.
__________________
https://github.com/stax76/software-list https://www.youtube.com/@stax76/playlists Last edited by stax76; 31st January 2017 at 16:02. |
3rd February 2017, 01:12 | #30 | Link | |
Soul Architect
Join Date: Apr 2014
Posts: 2,559
|
Quote:
http://forum.doom9.org/archive/index.php/t-134336.html I found some VB.NET wrapper code around this written in Italian and I customized it. I can send you the code if you're interested. I don't have the link of where I got it from. Also to save you some time, if you're going to use WMP in VB.NET, you need to register the AVS extension so that it recognizes it. Your application isn't authorized to make such changes to the registry, so you must do it during setup. If using Inno Setup, add this code Code:
[Registry] Root: "HKLM32"; Subkey: "SOFTWARE\Microsoft\Multimedia\WMPlayer\Extensions\.avs\"; ValueType: string; ValueName: "PerceivedType"; ValueData: "video"; Flags: createvalueifdoesntexist Root: "HKLM32"; Subkey: "SOFTWARE\Microsoft\Multimedia\WMPlayer\Extensions\.avs\"; ValueType: dword; ValueName: "Permissions"; ValueData: "$0000000f"; Flags: createvalueifdoesntexist Root: "HKLM32"; Subkey: "SOFTWARE\Microsoft\Multimedia\WMPlayer\Extensions\.avs\"; ValueType: dword; ValueName: "Runtime"; ValueData: "$00000007"; Flags: createvalueifdoesntexist
__________________
FrameRateConverter | AvisynthShader | AvsFilterNet | Natural Grounding Player with Yin Media Encoder, 432hz Player, Powerliminals Player and Audio Video Muxer Last edited by MysteryX; 3rd February 2017 at 01:15. |
|
3rd February 2017, 01:23 | #31 | Link | |
Soul Architect
Join Date: Apr 2014
Posts: 2,559
|
Quote:
It would be really nice if there was a cross-platform .NET player control that can be embedded into any application or platform using either the .NET Framework or MONO, and that is compatible with both SVP and madVR ... but Christmas isn't until next year
__________________
FrameRateConverter | AvisynthShader | AvsFilterNet | Natural Grounding Player with Yin Media Encoder, 432hz Player, Powerliminals Player and Audio Video Muxer Last edited by MysteryX; 3rd February 2017 at 01:26. |
|
3rd February 2017, 02:09 | #32 | Link |
Soul Architect
Join Date: Apr 2014
Posts: 2,559
|
For playing audio from Avisynth in .NET, I just found the SoundPlayer class as an alternative to WMP.
https://msdn.microsoft.com/en-gb/lib...undplayer.aspx However, it can only read a WAV file. Perhaps AVFS would allow to read it anyway? That approach seems kind of hacky for a deployed app to mount into the root folder. |
3rd February 2017, 03:01 | #33 | Link | |
Registered User
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
|
Quote:
As far as I know it's the only open source .NET DirectShow video player, MPC maybe the only other open source DirectShow video player, my C++ knowledge was and still is basic so working with MPC wasn't the most simple option for me.
__________________
https://github.com/stax76/software-list https://www.youtube.com/@stax76/playlists Last edited by stax76; 3rd February 2017 at 04:15. |
|
3rd February 2017, 04:23 | #34 | Link |
Soul Architect
Join Date: Apr 2014
Posts: 2,559
|
I compiled in x86 and I tried opening an Avisynth file in it and got:
Exception thrown: 'System.Runtime.InteropServices.COMException' in StaxPlayer.exe Additional information: The request is invalid because Shutdown() has been called. SVP also doesn't hook up into it. Would it be difficult to allow SVP and madVR to integrate? But anyway... the main issue I'm having with my setup is regular crashes, but that's not due to MPC-HC anyway. I believe it's due to a bug in ffdshow. Using yours wouldn't solve that; and I still would need to run it into a separate process to kill it when it hangs.
__________________
FrameRateConverter | AvisynthShader | AvsFilterNet | Natural Grounding Player with Yin Media Encoder, 432hz Player, Powerliminals Player and Audio Video Muxer Last edited by MysteryX; 3rd February 2017 at 04:29. |
3rd February 2017, 06:10 | #35 | Link |
Registered User
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
|
Maybe the crash is because I use x64, I looked at the code and it looks like EVR being the only filter added manually to the graph and the rest is handled by the system, by default DirectShow would use a crappy old renderer prior EVR. Custom graph building can be done but needs some knowledge about DirectShow, needed pinvoke interfaces are probably there so you just need to know how to use them, code is in the 'PlayFile' method.
__________________
https://github.com/stax76/software-list https://www.youtube.com/@stax76/playlists |
3rd February 2017, 20:56 | #36 | Link |
Soul Architect
Join Date: Apr 2014
Posts: 2,559
|
I don't know how much more time you want to put into this player but here are my thoughts. It seems you've done the hardest job already and you're proficient with DirectShow.
Windows Media Player is fine to view videos or play Avisynth scripts within an application. MPC-HC is fine to play them in a separate process. I use WMP for AVS preview, and MPC-HC for playback with SVP+madVR. The problems are... 1. It's limited to Windows x86. It won't work in x64, nor be cross-platform with MONO. 2. SVP hooking into MPC-HC via ffdshow causes regular crashes when resetting the cache (on seek). Adding support for ffdshow might be an option for you, but that would leave the same existing problems: constant crashes, and lack of support for x64 (due to other bugs in ffdshow x64). The developers of SVP are actively developing it and are looking for other ways to support x64 playback (and also work on non-Windows platforms). If you'd provide them an interface to hook into without using ffdshow, I'm sure they'd be willing to work with you to make SVP use your interface -- because they haven't solved the x64 support problem yet. Another approach, perhaps even better, is to add Windows support and these features to Banshee. It's a C# Open Source media player that is the default player on Linux, but its Windows support is still in beta. Both a stand-alone player and a control within an application are useful. http://banshee.fm/
__________________
FrameRateConverter | AvisynthShader | AvsFilterNet | Natural Grounding Player with Yin Media Encoder, 432hz Player, Powerliminals Player and Audio Video Muxer Last edited by MysteryX; 3rd February 2017 at 21:11. |
4th February 2017, 04:24 | #37 | Link |
Registered User
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
|
staxplayer is my personal only player and I don't miss features at the moment.
since there isn't much similar code around I should probably upload the code to my githup repo, and few other codes also, problem is I'm by no means proficient with git, so far I only use it far staxrip, I have git integrated in Visual Studio and use that for staxrip, I've also used the desktop app, it's a well done app, I know most use the command shell for git, my command shell knowledge is another thing I need to work on, actually it's currently a topic of interest of mine, I was learning powershell lately for instance, PS runs also on linux as far as I know just as bash runs on Windows nowadays. I heard of Banshee, GTK# and gstreamer based as far as I know, I'm a MediaMonkey user since 10 years and nowadays post much more in the MediaMonkey forums than here at doom9. Since you are interested in cross platform I can recommend you MediaMonkey 5, still alpha, v5 is a complete re-implementation of the GUI with Chromium, Linux support is probably far away but they have definitively plans for Mac, far away also but they'll get there. I notice your logo, sold a book last week (converting everything from paper to ebook), it was comic version of Tao Te Ching and since I had the last copy in amazon.de I got 40€, in the us it's only 9$, found it a lot easier to read then the original.
__________________
https://github.com/stax76/software-list https://www.youtube.com/@stax76/playlists |
4th February 2017, 12:03 | #38 | Link |
Registered User
Join Date: Dec 2013
Location: France
Posts: 64
|
Thanks to MysteryX and stax76 for their remarks and their respective skills.
I have studied their proposals and other research, but for now I do not really find a good solution. WMP is very simple to use with AVS scripts, but it is not reactive. This is very good for a simple reading. But if we want to make a freeze on image, then a return on this image after adjustment of the script, it is laborious. It takes a minimum of 4 to 5 seconds to reposition itself on the image (and with a very simple script). It's too long to make adjustments ... I studied the old mciSendString MCI API solution that still works on Visual Studio 2015. It's a bit better reactive than WMP, but you have to go through PictureBox and hundreds of lines of codes. Too complicated.... I do not question the very good development StaxPlayer, but for me, it is also very complicated to implement DirectShow. I dream of a much faster WMP with commands adapted to the scripts. But, a priori, the reality is still far ..... ___________________ Film9 |
4th February 2017, 16:02 | #39 | Link |
Soul Architect
Join Date: Apr 2014
Posts: 2,559
|
I use WMP for preview. You can send it command to freeze at a specified position. However...
1. The frame won't be exact; it will move within a 2 seconds range of the specified position 2. It takes a few seconds to display it. If you want immediate display frame by frame, you can use the approach mentioned earlier. If you want real-time playback, you can use WMP. Actually, I generally use MPC-HC for final preview because WMP requires converting to RGB and MPC-HC is the only option allowing to detect color matrix shift. If you trim your video to a single frame, WMP will probably display it much faster -- and it will display that exact frame. Or, another approach would be to call ImageWriter in the script, and then reading and displaying the image file. Or, creating a VB.NET plugin that calls a service with the frame data.
__________________
FrameRateConverter | AvisynthShader | AvsFilterNet | Natural Grounding Player with Yin Media Encoder, 432hz Player, Powerliminals Player and Audio Video Muxer Last edited by MysteryX; 4th February 2017 at 16:13. |
4th February 2017, 16:49 | #40 | Link |
Soul Architect
Join Date: Apr 2014
Posts: 2,559
|
I actually really like the idea of creating a .NET service to receive frame data. It would take 2 parameters: clip id and info, and frame data.
Then I'd create a .NET plugin to send the frame to the service. At the end of the script, I would TRIM and call this plugin. Be careful with temporal plugins: necessary frames must be available and trimmed after. This would allow quick display without needing to fill a buffer with unnecessary frames. It would display the exact image without resize or stretching. I'd be able to compare Script1, Script2, Script3 and Original side-by-side, pan/zoom on the different views at the same time, and even perform a diff on 2 versions of the script. MT would be disabled, and running 4 scripts would run on 4 cores, so the display of all 4 scripts would still be quick. Might put that on my todo list; but got a lot of other priorities. Unless there's a way of calling Avisynth directly in .NET without needing to insert a plugin within the script? Stax76, I see you inquired into this. Found any good solutions?
__________________
FrameRateConverter | AvisynthShader | AvsFilterNet | Natural Grounding Player with Yin Media Encoder, 432hz Player, Powerliminals Player and Audio Video Muxer Last edited by MysteryX; 4th February 2017 at 16:55. |
Thread Tools | Search this Thread |
Display Modes | |
|
|