How to use 'wine' and AviSynth and Avs2YUV with 'mplayer/mencoder' (or any player/encoder)

Peter.O

I have a lot of AviSynth scripts (.avs) which create a montage of text pics and video, but until yesterday I'd had no luck running AviSynth scripts in 'wine'.
I read about a 'Windows' program called Avs2YUV which, according to wineHQ, is platinum and is "intended for use under Wine to interface between Avisynth and Linux-based video tools".

I've had partial success with a couple of very simple scripts, but "partial" means I don't know how to use it properly, or the AviSynth-Avs2YUV combo doesn't work properly (or both).

Below, are 2 scripts:
The first one outputs and saves video only (as intended), but I'd like to know if it is possible to pipe Avs2YUV's stdout directly into a Linux media player... I've tried a few options, but nothing seems to work. On the other hand, the saved .264 file does play, so AviSynth and Avs2YUV are doing something right here. (A quick pre-posting EDIT: I've just corrected a typo where I had put .avi instead of .264, and I realized that I really don't know what x264 does (I'm so used to avi encoding, but I have this feeling that it may be video-only encoder???? ... so I'll mention it now, I have no particular interest in x246.. It was in the example I followed.. I just want to produce a playable video+audio .. the wrapper and codecs aren't particularly important to me.. I'm happy with avi.. actually I prefer it because it works well with AviSynth.. Catch-22...

The second one behaves very much as the first one, but it produces no audio; which it should.

AviSynth scripts are well known, and are directly playable by many players (in Windows), but with this need to use Avs2YUY, I'm somewhat in unknown territory...

I'd appreciate some pointers on these two issues, and perhaps there is an entirely different way to use AviSynth in wine, other than in conjunction with Avs2YUV... or is the idea of using AviSynth in Linux just a myth?

Here are the scripts:

# Script-1: The saved file plays fine (the source has no audio),
#            but how can I play it directly
#
cd $HOME/.wine/drive_c
echo 'version()' > version.avs
wine  avs2yuv.exe  version.avs - \
    | x264 --stdin y4m --output version.264 -
mplayer version.264
#

# Script-2: The saved file has no audio, but it should.
#        ...and like Script-1, how can I play it directly
cd $HOME/.wine/drive_c
echo 'avisource("video.avi")' > video.avs
wine  avs2yuv.exe  video.avs - \
    | x264 --stdin y4m --output video.264 -
mplayer video.264
Peter.O

I've found a reasonable working solution which allows both audio and video to be processed in a (normal) single pass of the AviSynth script...

avidemux2 and avsproxy to the rescue ...avidemux2 + avsproxy to the rescue!

It has some limitations, like not handling DirectShowSource() very well... DirectShowSource was handy, because it autodetected the type of video/audio, but there are typically other ways around that.

I've done some minor tests, and it has rendered a montage of two text panels (using .AAS subtitles format in unicode), and another panel of a subtitled picture. It seems to handle simple video without any problems... I have had to tweak a few minor things, but it seems manageable... It is certainly functional enough that I'll continue with it, to find it's quirks :)

Both avsproxy and avidemux2 have CLI and GUI interfaces... If I can get the CLI's to work together, then I'm pretty close to getting an AviSynth to play directly in a media player... avidemux2 can be set to "copy", and the resulting avi output can be piped directly into a player (hopefully)... It's looking good...

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to patch Wine and use it In playonlinux

From Dev

How do you use wine?

From Dev

How to patch Wine and use it In playonlinux

From Dev

How to use PlayOnLinux with Wine 1.7?

From Dev

How to install and use Tally ERP 9 in Wine

From Dev

How to perform unattended installation for any installer using wine?

From Dev

Any alternative to Wine

From Dev

How can I find the ProgID of a Windows program to use in Wine?

From Dev

How do I use two different versions of wine on the same installation?

From Dev

How do I use Photoshop via wine on Ubuntu 15.04?

From Dev

How to use Beyond Compare 4 on ubuntu using wine HQ?

From Dev

Wine: How to use SAPI 5 voices for TTS application “Balabolka”?

From Dev

How can I force PlayonLinux to use Wine 4?

From Dev

How to use LIKE with ANY in Postgresql?

From Dev

How to use function with Any input

From Dev

OData, Collections and how to use Any

From Dev

How to use 'Any' in AsQueryable methods?

From Dev

how to use python's any

From Dev

How to use 'Any' in AsQueryable methods?

From Dev

How to use ANY command in SQL

From Dev

How to change the directory .wine of Wine to a different directory

From Dev

How to change the directory .wine of Wine to a different directory

From Dev

How to uninstall a wine software?

From Dev

How to install and configure Wine?

From Dev

How Wine is not an emulator?

From Dev

How to install and configure Wine?

From Dev

How to uninstall a wine software?

From Dev

How to install picasa with wine

From Dev

How to tell if wine is rooted?