Log in

View Full Version : Avisynth and Media Players?


gispos
29th August 2021, 17:15
I made a few attempts to open an Avisynth script with MPlayer or VLC Player. Unfortunately does not work.

avs2yuv can apparently only process the video, and avs2pipe cannot pass the video and audio in one call to the player?
The Win media player unfortunately does not play audio synchronous and the video always comes too late when video filters are used.

Does anyone know a way to get one of the three players to play avs with sound? And then syncronously too.
I had already thought of GraphEditNext to create a graph that makes the media player play video and audio synchronously. Is that possible?

Now please do not recommend another player, I can only use one of these three players.

poisondeathray
29th August 2021, 17:52
1) sherpya mplayer builds claim avs+ support, but I can't get it to playback .avs directly, or don't know the correct switches
https://oss.netfarm.it/mplayer/
[20210710] Updated AviSynthPlus (git)

2) You can use avfs, and it's seekable with mplayer , because avfs creates a "dummy" avi file , and a "dummy" wav file. But avfs frameserving adds additional overhead (slower)

avfs scriptwithaudio.avs

"PATH\mplayer" "PATH\scriptwithaudio.avi" -audiofile "PATH\scriptwithaudio.wav"

3) If you don't need seekability you can use ffmpeg to pipe to vlc or mplayer

ffmpeg -i scriptwithaudio.avs -f nut - | "PATH\vlc" -
ffmpeg -i scriptwithaudio.avs -f nut - | "PATH\mplayer" -


Whether or not you can get realtime playback depends on your filters and how fast your system is.

There are other players that have better optimization and direct avs playback, without the avfs overhead (slower), and seekable... but apparently you don't want to hear about it

stax76
29th August 2021, 18:37
mpv can read avs and vpy.

FranceBB
30th August 2021, 11:12
mpv can read avs and vpy.

Yep.
And also PotPlayer on Windows.

gispos
30th August 2021, 17:46
I also use the PotPlayer, the limitation of my selection on these three players has the background that there are wrapper for python available.

I tried the MPlayer from the link, I don't know why it says something about Avisynth+ Update? I can't open any avs files with it.
And the VLC had a strange way of playing avs files (plugin from the link), it regularly stops to syncrhonize the audio with the video and then plays again for 2-3 seconds and syncrhonize again.

So the whole thing won't work the way I thought it would ... so it's done.

TCmullet
26th July 2023, 03:57
Yep.
And also PotPlayer on Windows.

Can you please give some advice? I installed PotPlayer. But when I run a script, it doesn't honor the plugins folder. (The script DOES run in Virtualdub.) That is, I have LSMASHSource.dll in my plugins folder, but when I execute

video=LWLibavVideoSource(myFile)

the player says "Script error: There is no function named 'LWLibavVideoSource'.

I was hoping to get a player to play Avisynth scripts for the first time. VLC won't. I took your word that PotPlayer (which I'd never heard of) would. What are your thoughts, please?

poisondeathray
26th July 2023, 04:28
Can you please give some advice? I installed PotPlayer. But when I run a script, it doesn't honor the plugins folder. (The script DOES run in Virtualdub.) That is, I have LSMASHSource.dll in my plugins folder, but when I execute

video=LWLibavVideoSource(myFile)

the player says "Script error: There is no function named 'LWLibavVideoSource'.

I was hoping to get a player to play Avisynth scripts for the first time. VLC won't. I took your word that PotPlayer (which I'd never heard of) would. What are your thoughts, please?



Possibly a x86 vs. x64 mismatch . Potplayer is one, and your LSmash.dll is the other

MPCHC can also play avs scripts . MPCHC x86 would load /play x86 avs ; and MPCHC x64 would load/play x64 avs scripts

qyot27
26th July 2023, 05:03
As stated earlier, mpv. If you need a GUI sitting over it, use SMPlayer.

And while I generally don't even think about this anymore, anything libavformat-based needs AviSynth's plugin directories on the %PATH%. Although I can't remember if using AddAutoloadDir in the script itself can side-step that or not.

TCmullet
30th July 2023, 01:40
As stated earlier, mpv. If you need a GUI sitting over it, use SMPlayer.

Deathray,

It WAS a processor mismatch. Thanks. I uninstalled Pot64 and installed Pot32 and it worked. (I have to use Avisynth+ 32 because I need it for Vdub and I only have access to Vdub 32.)

Qyot27,

I picked Pot Player today because it was mentioned, and it seemed "more like a player" than mpv due to the name. (A lousy reason.) But my REAL desire is to play with SMplayer. Are you saying SMplayer can be made to play my scripts? Where do I get the correct "mpv" (which I never heard of) and how do I plug it into SMPlayer? I confess I've not hardly touched the zillion switches in any of these players/interfaces. I simply double-click the media file and SM plays it. Or if it won't work, I right click and pick from a couple others I have installed. I really don't like the PotPlayer but LOVE the SMPlayer. Thanks in advance for a link and your advice, Qyot27. (Again, I probably need to stick with 32bit for playing Avisynth scripts as my Vdub is limited, even though I won't be using Vdub for playing.

coolgit
30th July 2023, 06:10
Deathray,

It WAS a processor mismatch. Thanks. I uninstalled Pot64 and installed Pot32 and it worked. (I have to use Avisynth+ 32 because I need it for Vdub and I only have access to Vdub 32.)



Dl vdub2 both 32 and 64 available.

http://virtualdub2.com/

qyot27
30th July 2023, 12:34
Where do I get the correct "mpv" (which I never heard of) and how do I plug it into SMPlayer?
mpv.io (https://mpv.io)

Windows builds:
https://sourceforge.net/projects/mpv-player-windows/files


mplayer got forked into mplayer2, of which there were quite a few different developer branches. When the main mplayer2 repo slowed down/died, those other developers coalesced their efforts into a single repo and renamed it mpv to keep it distinct. All of this happened over 10 years ago.

As to how to go about using it with SMPlayer, you should be able to just go looking in the Settings and switch to it there. Either it'll give you the option to pick where mpv.exe is on your hard drive, or you can tell it to look for mpv and it'll just search the %PATH%. I don't bother with a GUI and just run it from the Terminal/Command Prompt.