Log in

View Full Version : AvxSynth: a Linux port of AviSynth


Pages : 1 2 3 [4] 5 6

plesken666
28th January 2013, 16:45
If I put only:


FFVideoSource("/home/plesken/Wideo/DivX/Rezerwat.2007.PL.DVDrip.XviD.avi")


It still didn't work with the same error...
Any ideas?

Guest
28th January 2013, 16:48
FFVideoSource("/home/plesken/Wideo/DivX/Rezerwat.2007.PL.DVDrip.XviD.avi")
Discussion of downloaded material is not allowed at Doom9 per forum rule 6.

@all

No further help is to be given on this issue. Thank you.

@xi@g@me
28th January 2013, 18:56
@ qyot27 :

here are the outputs :

sudo apt-cache show libffms2-dev :

Package: libffms2-dev
Priority: optional
Section: universe/libdevel
Installed-Size: 163
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian Multimedia Maintainers <pkg-multimedia-maintainers@lists.alioth.debian.org>
Architecture: amd64
Source: ffms2
Version: 2.17-1
Depends: libffms2-2 (= 2.17-1), libavformat-dev, libavcodec-dev, libswscale-dev, libpostproc-dev, libavutil-dev, zlib1g-dev
Recommends: ffmsindex
Filename: pool/universe/f/ffms2/libffms2-dev_2.17-1_amd64.deb
Size: 38170
MD5sum: bef398a6a81103c8e567aab58fafecbd
SHA1: e2b12b1bca361a5365c06266ebe1bee84bed7d4b
SHA256: aa918b245699552e50aeb564327ca1382508cb58e650d70852c7ced53edc3f8a
Description-en: Development files for libffms2
A cross platform ffmpeg wrapper library, and some additional content for
things ffmpeg doesn't handle well. A more friendly API and an easy way to
say "open and decompress this, I don't care how".
.
This package contain headers and other files needed to compile and link
against libffms2.
Homepage: http://code.google.com/p/ffmpegsource/
Description-md5: 44f41716b4c49809a59c24b888b4d800
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu





sudo apt-cache show ffms2 :

Package: ffms2
Status: install ok installed
Priority: extra
Section: checkinstall
Installed-Size: 976
Maintainer: root@axiagame-linux
Architecture: amd64
Version: 2.17-1
Provides: ffms2
Description: Package created with checkinstall 1.6.2



I have seen the posts above, so I would like to add that "video.avi" is a video I captured with DxTory on a video game. I wish to create a whole process of encoding in command line so I can relay this task to my seconday PC equiped with linux.

I need to use avxSynth as the captured video has a VFR (FFVideoSource with fps parameter set), and I also need to do the encoding on a x64 machine since the source video file is very heavy and 2GB of RAM is not enough for x264 encoder.

I had a new look and the exact error message is :
"Failed processing script from AVXSynth Editor" as it was for plesken666

thank you :)

qyot27
28th January 2013, 19:26
Are you sure that libavxffms2.so was built when you built AvxSynth itself? Do you see it in the result of
ls -R /usr/local/lib/avxsynth

If it didn't build libavxffms2, then that's the source of the issue. Also, I'd recommend trimming it down to only one copy of FFMS2: either the one from the repos, or the one you compiled yourself (preferably the latter, since it makes ffmsindex available without having to worry about installing it separately). There also might be an off-chance of needing to use 'sudo ldconfig', which would come after installing AvxSynth or anything else that uses shared libraries.

Concerning the 64-bit situation, the only thing you need to be aware of is that 64-bit compiles need --enable-pic (or equivalent) to be specified where possible so that everyone compiles cleanly. For FFmpeg, it's --enable-pic, for FFMS2 and AvxSynth, it's --with-pic (although since they both use autotools, it might be used by default on 64-bit).

@xi@g@me
28th January 2013, 20:30
here is what I got :

axiagame@axiagame-linux:~$ ls -R /usr/local/lib/avxsynth/
/usr/local/lib/avxsynth/:
libautocrop.so libavxffms2.so libavxframecapture.so libavxsubtitle.so

the plug-in seems to be present.

I did a file on each of the 4 DLLs, they are all 64 bit ELF binaries

sl1pkn07
28th January 2013, 21:29
working for me

ffmpeg 1.0.1 form repository https://projects.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/ffmpeg
ffmpegsource 2.17 https://aur.archlinux.org/packages/ff/ffmpegsource/PKGBUILD
avxsynth git https://aur.archlinux.org/packages/av/avxsynth-git/PKGBUILD

http://wstaw.org/m/2013/01/28/plasma-desktopjt3071.png

greetings

qyot27
29th January 2013, 00:02
I was really just thinking about this part:
I have seen the posts above, so I would like to add that "video.avi" is a video I captured with DxTory on a video game. I wish to create a whole process of encoding in command line so I can relay this task to my seconday PC equiped with linux.
Does opening the file with FFVideoSource under AviSynth on Windows or Wine work? I'm starting to think it's a libavcodec issue, especially depending on which release of Ubuntu you're using (as in, 12.04, 12.10, etc.) and if you just installed the 'ffmpeg' from the repositories instead of compiling it yourself.

I can almost bet that the 'ffmpeg' from the repositories doesn't support Dxtory-captured content, because it's really the fork, and the commit that specifically says it adds support for Dxtory only exists in mainline FFmpeg (where it was added in December 2011).


The solution, in any case, is very likely to be to compile FFmpeg, then recompile FFMS2, then finally recompile AvxSynth, and try again.

@xi@g@me
30th January 2013, 20:24
OK, here is the point :

I tried to open with virtual dub on windows (using an avs script with the same contents). It lags for a long time (indexing ?) then tell me : "insanity detected : empty frame returned"

I tried to directly index the video file using ffmsindex.exe (still from windows), and it tells me the index file has been correctly created, but the files is only 486 octets length... If I try to repoen with virtual dub, I still get the same problem after the same time.

(with avxsynth, the error is immediate when I try to open the file)

I removed ffms2, ffmpeg, libffms2-dev and avxsynth to try to recompile everything (and the avxsynth lib directory), but it seems that the git repository of ffmpeg provided by sl1pkn07 does nor work (git tells me the server shall call get update-server-cache because some file is missing).

I'll wait a bit, hoping the git issue will not last and try to recompile everything after that.

sl1pkn07
30th January 2013, 20:31
no need make git pull in ffmpeg tarball. if need ffmpeg from git use git://source.ffmpeg.org/ffmpeg.git. but i don't know if working with ffms2 2.17 (avx don't build with ffms2 svn)

@xi@g@me
30th January 2013, 21:00
OK, I thought there were git repositories, but if I go on the links I find some sort of script.

I'm not an expert of linux, how do I run those scripts ? I bet they are the scripts needed to build & install each package ?

sl1pkn07
30th January 2013, 21:17
my scripst is for install packages in archlinux. but the "core" ( code into "build()" and "package()" ) working in all linux (only need change $srcdir and $pkgdir by your own directory)

qyot27
30th January 2013, 23:56
As already noted, those repositories/scripts are for Arch, not Ubuntu. Don't expect 1:1 compatibility.

FFmpeg git and FFMS2 svn do work with AvxSynth, if AvxSynth is patched to not look for libpostproc at all. That's the only issue, and to that end, I have both the ignore libpostproc patch and one from 0x09's branch that corrects the header search path in a repo on my Github: https://github.com/qyot27/mpv-dep-patches

Basically, the routine is like this:
FFmpeg:
git clone git://source.ffmpeg.org/ffmpeg.git
cd ffmpeg
./configure --prefix=$HOME/ffavx_build --enable-gpl --enable-version3 --enable-avresample \
--enable-pic --disable-encoders --disable-muxers --disable-debug --disable-network \
--disable-hwaccels --disable-indevs --disable-outdevs
make
make install

FFMS2:
git clone git://github.com/tgoyne/ffms2.git
cd ffms2
git checkout master
PKG_CONFIG_PATH=$HOME/ffavx_build/lib/pkgconfig ./configure --enable-shared --enable-static --with-pic
make
sudo checkinstall --pkgname=ffms2 --pkgversion="1:$(./version.sh)-svn" --backup=no \
--deldoc=yes --fstrans=no --default
sudo ldconfig
(see JEEB's post here (http://forum.doom9.org/showthread.php?p=1610157#post1610157) for why I'm recommending this particular repo and not the svn; the unpatched svn version can't yet handle the planar audio tactics that libavcodec has switched to; with this, you can once again get audio from scripts...eventually it should get into the svn, but it just hasn't happened yet)

AvxSynth:
git clone git://github.com/qyot27/mpv-dep-patches.git
git clone git://github.com/avxsynth/avxsynth.git
cd avxsynth
git am ../mpv-dep-patches/Avx*patch
autoreconf -fiv
PKG_CONFIG_PATH=$HOME/ffavx_build/lib/pkgconfig ./configure --enable-silent-rules
make
sudo checkinstall --pkgname=avxsynth --pkgversion="1:$(grep "Version" avxsynth.pc \
| cut -f2 -d " ")+$(git rev-list HEAD | wc -l)-$(git rev-list HEAD -n 1 \
| cut -c 1-7)-$(date +%Y%m%d)" --backup=no --deldoc=yes --fstrans=no --default



And whether it really matters or not, I also have branches of x264_L-SMASH and mpv on Github that I've included AvxSynth input patches in, which makes things simpler for testing and encoding.

@xi@g@me
31st January 2013, 00:06
tested sl1pkn07 repositories, still not working.

I'll try yours tomorrow qyot27 (it's late here in France) and I tell you how it goes.

Btw thank both for your help, I hop we'll get it !

sl1pkn07
31st January 2013, 00:07
thanks for the ffms2-git qyot27

@xi@g@me
31st January 2013, 19:56
I'm about to try qyot27's solution, but...

I wonder if it can be an access right issue ?

I mean that my video file is on an NTFS partition (I can't change that, I also need the disk on windows), perhaps avxsynth does not have the rights to open the video file ? (which would explain an immediate failure)

How can I check that ?

sl1pkn07
31st January 2013, 20:04
avxsynth run in user mode, if your linux user can read/write these file in ntfs partition, avxsynth can read these files

greetings

@xi@g@me
31st January 2013, 21:16
OK. I just tested that, I am the owner of the file and I can open it with a simple media player in gdm. I have R&W permissions (only for the owner)

@xi@g@me
31st January 2013, 22:45
Still get an immediate error with your version, qyot27...

I tried to copy the video file from the NTFS partition to the / partition, but nothing better

qyot27
1st February 2013, 06:11
Then I'd start to think that maybe it's a problem with AVXEdit. I don't use specialized editors for writing scripts, just plain Notepad or Leafpad (or Gedit, but using Leafpad has gotten a bit instinctual at this point), and then test the script in a media player, VirtualDub, or encoding program directly.

If it is actually a problem with AVXEdit (I can't say; I'm not at liberty to fully test with a 64-bit system at the moment, but AvxSynth was working the last time I tried; remember, I don't use AVXEdit so I can't speak to whether it works), then you could test with the x264_L-SMASH or mpv branches I mentioned earlier. The fact it says it can't load the script is what makes it suspicious, and points more to an issue that AvxSynth isn't getting loaded or handled right - which if something is wrong with AVXEdit, it's possible (and you may not see the problem in another program). If it was a problem with FFMS2, it'd likely say either 'There is no function named FFVideoSource' or something specifically about the video file not being valid, found, or something along those lines.

sl1pkn07
1st February 2013, 06:52
@xi@g@me

is possible upload a sample?, for test in my system

qyot27
2nd February 2013, 00:17
Now that I've had time to test it, I can confirm it is an issue with AVXEdit. Not AvxSynth. So don't use AVXEdit. Like I mentioned before, the patches for x264_L-SMASH and mpv allow them to work with scripts directly, which allows you to test.

x264 (you may need to update yasm, as described on the FFmpeg wiki (https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide))
git clone git://github.com/qyot27/x264_L-SMASH.git
cd x264_L-SMASH
git checkout extra-avx (if you don't need audio from the scripts, you can checkout the master_extra branch instead)
PKG_CONFIG_PATH=$HOME/ffavx_build/lib/pkgconfig ./configure --enable-strip --enable-static
make
sudo checkinstall --pkgname=x264 --pkgversion="3:$(./version.sh | \
awk -F'[" ]' '/POINT/{print $4"+git"$5}')" --backup=no --deldoc=yes \
--fstrans=no --default
And test the script the way you'd run it on Windows.

For mpv, follow the MPlayer-centric instructions on the Ubuntu Community wiki (https://help.ubuntu.com/community/Compiling%20MPlayer#Dev_files...) to get the necessary dependencies, then build a non-stripped-down version of FFmpeg from git (if you want all of those external libs like libmp3lame or so on, you can enable them) and install it to the system. Then,
git clone git://github.com/qyot27/mpv.git
cd mpv
git checkout extra-new
./configure --disable-debug
make
sudo checkinstall --pkgname=mpv-player --pkgversion="3:$(./mpv | head -1 \
| sed 's/ /\t/g' | cut -f2 | cut -c2-)" --backup=no --deldoc=yes --fstrans=no --default
And then you can test the script in it (and seek back and forth like any normal video file). mpv also has encoding capabilities, if you'd rather encode with something other than H.264 (although if you used --enable-libx264 when building FFmpeg, mpv can use that, too).

@xi@g@me
2nd February 2013, 09:31
OK.
I also did some test on my side :

I first tried to run the command


avxFrameServer video.avs


as I read in the documentation that avxFrameServer would launch mplayer by default. It took some time, created an (very small, 596B) index file, and finished without launching anything. It took all my memory (16GB !) for the "operation"...

After that, I directly tried


mplayer video.avs


and I got this :


MPlayer svn r34540 (Ubuntu), built with gcc-4.6 (C) 2000-2012 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing video.avs.
libavformat version 53.21.1 (external)
Mismatching header version 53.19.0


Exiting... (End of file)


Version problem ?


I'll now try qyot27's solution, but there are a few things I do not understand :

Do I have to install both x264 and mpv ? Or just x264 is OK ?
Do I have to remove all dependencies and reinstall them like said in the FFmpeg wiki ? (libavcodec, .... and of course x264)
> "And test the script the way you'd run it on Windows."
You mean, like

avxFrameServer video.avs false | x264 blah blah blah -

?

Thanks for your help :)

@xi@g@me
2nd February 2013, 10:23
@xi@g@me

is possible upload a sample?, for test in my system

I'm sorry, but the video file is 10GB size, I can't upload this ! Or perhaps if you have your own FTP server, I can initiate the copy this night

qyot27
2nd February 2013, 10:33
A short sample would suffice, something like
ffmpeg -i input.avi -vcodec copy -t 00:00:30 output.avi
(which will save the first 30sec to a new file)


But anyway, no, you don't have to install both x264 and mpv, but it can be helpful (mpv will let you watch the script instead of having to encode it to an output file first). They're only *both* necessary if you want to use mpv's encoding feature and use libx264 as the encoder (libx264 goes into FFmpeg, which goes into mpv).

You probably don't *have* to remove all the dependencies for FFmpeg first, but it's probably a good idea.

When I said 'like on Windows', I meant (obviously, change the preset and crf to suit your encoding preferences):
x264 --preset ultrafast --crf 18 -o test.mkv test.avs
or
mpv test.avs

@xi@g@me
3rd February 2013, 12:44
tried x264 (with crf 19, but I do not think it matters) and here's what I get :


blahblah@ablahblah:/media/Data_1/video$ x264 --preset ultrafast --crf 19 -o video.mkv video.avs
avx [error]: FFVideoSource: Insanity detected: decoder returned an empty frame
(video.avs, line 1)
x264 [error]: could not open input file `video.avs'


EDIT : same error as virtualdub gave me. Is there something I can use to repair the video file of this first missing frame ?

qyot27
3rd February 2013, 18:25
The insanity error is coming from the way libavcodec is being accessed - it used to happen with H.264 MP4 files when multithreading, although that was fixed ~r690. Try using threads=1 with FFVideoSource:
FFVideoSource("input.avi",threads=1)

It could simply be an issue with the AVI container. If you put the stream into MKV (ffmpeg or mkvmerge can do this), it might go away.

Since the PackBit codec (I'm assuming that's the one being used here, it's what the Dxtory website links to) is lossless, you could transcode it to a different lossless format before giving it to AvxSynth. If ffmpeg can directly handle the stream, you can convert it to FFV1, Ut Video, or (depending on what colorspace is being used) ffvhuff. Not sure if doing it this way defeats the purpose you were trying to use AvxSynth for, though.

@xi@g@me
3rd February 2013, 20:28
I still get the insanity issue using the avx script you provided. I'll have a look tomorrow at ffmpeg documentation to move the video stream to an mkv container and try again.

qyot27
4th February 2013, 04:02
ffmpeg -i input.avi -vcodec copy -acodec copy output.mkv
or if you prefer some other lossless format that's more easily handled, use that for the value of -vcodec instead of 'copy'.

@xi@g@me
4th February 2013, 22:09
I tried your command, still get the insanity error...

qyot27
4th February 2013, 23:54
Then it's probably due to the format itself. Using a different lossless format is probably the only option left.

qyot27
5th February 2013, 01:25
I decided to go ahead and install the trial version of Dxtory and do direct testing with it myself. The issue is due to the Dxtory Video Codec itself - FFmpeg, while it can recognize the streams, doesn't seem to be fully able to manipulate them yet, and gave me a bunch of parsing errors when I tried converting it to another format. FFMS2's insanity issues with it likely stem from this.

The only solution that's really an option is to convert the capture to another lossless format with VirtualDub - open the .avi file directly in VirtualDub, not by trying to use the video through a script. Depending on the kind of content being captured, you can save additional space this way as well (if it's a lot of static frames of your desktop, Lagarith (http://lags.leetcode.net/codec.html) can compress it absurdly well due to its Null Frames option). FFV1 can be used if you've got ffdshow (http://sourceforge.net/projects/ffdshow-tryout/files/SVN%20builds%20by%20clsid/generic%20builds/) (and made sure to enable the VfW/Video for Windows interface when you installed it); FFV1 is native to FFmpeg and has far less risk of weird decoding but doesn't have the ability to write null frames automatically and will therefore output a larger file. If you need raw speed when converting, you can use either Ut Video (http://umezawa.dyndns.info/wordpress/?cat=28) or ffvhuff (again, through ffdshow - where it's called HuffYUV (FFmpeg variant)) - remember to use Median prediction and the Adaptive Huffman tables options. Regular HuffYUV can be used if you aren't dealing with YV12.

In VirtualDub, make sure that it is set on Fast recompress mode and select the codec to convert with. Then use the new .avi file in AviSynth and/or AvxSynth and it should be okay.

I did note, though, that Dxtory seems to be fully capable of capturing to any of the codecs in the VfW listing, so if you've got Lagarith, HuffYUV, Ut Video, or ffdshow (for FFV1 or ffvhuff), then you can skip all of this converting after-the-fact by telling Dxtory to use one of these codecs from the start.

@xi@g@me
5th February 2013, 20:11
Wow you went very far !

Yes dxtory can used provided codecs instead of it's own. The problem is it takes resources to compress the video while recording, and it becomes a great loss of performance (as I try to record at 60 FPS, on a game like UT3 I drop to 45 when I try to compress the stream at recordè time)

I'll have a try. The other problem is, virtual dub does not have a linux version, I will have to use windows for this first step :S

@xi@g@me
5th February 2013, 21:00
OK it works perfect with Lagarith, I even managed to keep my VFR and so the sound sync. I also managed to compress the video correctly using x264 (ultrafast, crf 23)

My video file size is now 87MB against 10GB :D

I now have to extract the sound trackS (yes there are multiple tracks) from the original avi and put them back in the compressed mkv.

qyot27
6th February 2013, 09:44
Wow you went very far !

Yes dxtory can used provided codecs instead of it's own. The problem is it takes resources to compress the video while recording, and it becomes a great loss of performance (as I try to record at 60 FPS, on a game like UT3 I drop to 45 when I try to compress the stream at recordè time)

I'll have a try. The other problem is, virtual dub does not have a linux version, I will have to use windows for this first step :S
VirtualDub actually works well under Wine (although you should/need to tell it not to use DirectX for display panes - that's in Options->Preferences->Display). So I would guess that as long as you've also got Dxtory installed under Wine, VirtualDub can access the Dxtory decoder as well.

mkvmerge can handle the remuxing (and it is cross-platform; project repository (http://www.bunkus.org/videotools/mkvtoolnix/downloads.html#ubuntu), although older versions are in the Ubuntu repos). With the GUI you can deselect the AVI file's video stream so that only the audio tracks get copied over to the new MKV.

@xi@g@me
6th February 2013, 21:29
I tried to install virtual dub on ubuntu using wine, and also the codecs. virtual dub fails to open the video as it requires a vfw based codec to decompress video streams.

On the other side, I found another codec which is "packbit" and provided by DxTory. With this one I can capture a lossless video with quite the same size as Lagarith. But this codec is completely unknown by ffmpeg
(I wanted to directly use x264 with avxsynth by using the packbit codec instead of the Dxtory one).

However, an interesting thing is that with the packbit codec I can directly reencode the video using VirtualDub without avisynth (I mean on windows) to the x264 format without having problems with the VFR of the input video.

verisokin
17th April 2013, 16:15
i coundt even preview a video. this error shows up:
http://thumbnails7.imagebam.com/18920/27b335189192610.jpg (http://www.imagebam.com/image/27b335189192610)
so i decided to compile and install FFMS-2.17
so after i run
./configure --enable-shared
i got the following error

any thoughts?
kudos

EDIT: plus i found this on the debian repo's
http://packages.debian.org/search?searchon=names&keywords=FFMS
FFMS-2.17
Open "configure" in a text editor and replace all occurrences of "avcodec_init();" with "avcodec_register_all();"

AdmiralJonB
18th April 2013, 15:34
I'm trying to get avxsynth working on my kubuntu 12.04 machine, but I've been having real trouble getting it the FFVideoSource to work. I've installed avxsynth and ffms2 according to the github wiki. I've since then tried following what qyot27 mentioned in an earlier post for ffmpeg and ffms2 downloading from their repo.

After looking through this thread, I've suspicious that I have other problems as well based on what others have said, so sorry if this post becomes a bit long.

The version() command works fine and in various forms, from AVXEdit to the avxFrameServer. It loads up mplayer fine and displays the version information. But when I use the following:

FFVideoSouce("video.mp4")

AVXEdit comes up with a "Failed processing script from AVXSynth Editor.", and the frameserver does, well, nothing as far as I can tell: no output, no temporary files (as far as I can tell), nothing. I've tried it in various other forms as well to no avail. I can open up the video fine in mplayer normally:

Playing video.mp4.
libavformat file format detected.
[lavf] stream 0: video (mpeg4), -vid 0
VIDEO: [MP4V] 800x600 24bpp 25.000 fps 2053.2 kbps (250.6 kbyte/s)
Clip info:
major_brand: isom
minor_version: 512
compatible_brands: isomiso2mp41
encoder: Lavf54.15.104

ffms2 has detected ffmpeg fine:

checking for LIBAV... yes
checking whether linking with FFmpeg or Libav... FFmpeg
checking whether FFmpeg works... yes


And avxsynth has detected ffms2 and libav fine:


ffms2:
CFLAGS: -I/usr/local/include
LIBS: -L/usr/local/lib -lffms2
libav:
CFLAGS: -I/usr/local/include
LIBS: -pthread -L/usr/local/lib -lavformat -lavcodec -ldl -lasound -lSDL -lbz2 -lz -lrt -lswscale -lpostproc -lavutil -lm

...

Enabled optional components:
autocrop: yes
avxframecapture: yes
avxsubtitle: yes
avxffms2: yes
AVXEdit: yes


One thing I have noticed is that I can't directly run mplayer (or mpv) with the avs files, as someone mentioned before that they were able to do. This makes me think that something hasn't quite installed right, but I can't figure out anything more. Does anyone have any ideas that could help me out?

qyot27
19th April 2013, 04:23
AVXEdit is broken as far as its preview function goes, as you've noticed. That issue was mentioned earlier in the thread. You're really better off going with leafpad, Kate, nano or whatnot to write the script and then testing it directly with mplayer2 or mpv.

There's a few things to keep in mind:
A) The build instructions on the AvxSynth Github wiki really need updating. FFmpeg 0.11.1 and FFMS2 2.17 are nearly or over a year old, and that version of FFmpeg doesn't have the rewritten AviSynth demuxer that step D needs to access AvxSynth. The postproc thing isn't relevant anymore either if you get the latest git clone of AvxSynth. Using AvxSynth with x264 by piping from avxFrameServer is also not needed anymore, because both x264's AviSynth module was extended to support AvxSynth in February, and FFmpeg's AviSynth demuxer was rewritten so that both AviSynth itself (on Windows) and AvxSynth (on Linux and OSX) could be loaded dynamically. The FFmpeg commit happened a little less than a month ago, although there have been some bug fixes applied since then (so just go with current git; the most recent of the bugfixes is from 7 days ago).

B) Get FFmpeg and FFMS2 from their official git (git clone git://source.ffmpeg.org/ffmpeg.git) and svn (svn checkout http://ffmpegsource.googlecode.com/svn/trunk ffms2) repositories, respectively; no augmenting it with devel branches or anything. When building FFmpeg, you must pass --enable-avisynth and --enable-avresample to ./configure. --enable-avisynth isn't necessary for AvxSynth itself, but it is necessary for step D to go smoothly. --enable-avresample is necessary for FFMS2 to correctly deal with audio.

C) Build AvxSynth.

D) Build mplayer2 or mpv from their official git repos. Since the FFmpeg from step B had AviSynth support enabled, you'll be able to watch the scripts directly.

AdmiralJonB
19th April 2013, 14:28
Well, the --enable-avisynth and the svn repo for ffms2 saved the day for opening the avs file. Got everything working with mpv now!

As for the other problem... well... seems I misspelt FFVideoSource (as you can see in my previous post). That was a severe :mad: moment.

Thanks for the help!

karasu
8th September 2013, 00:09
Hi,
I'm trying to compile Avxsynth on my Ubuntu 13.04 64 box. I followed the instructions here : https://github.com/avxsynth/avxsynth/wiki/System-Setup
And I have some trouble while compiling avxsynth :
http://pastebin.com/egZDP3b3

Can you help me? (is a .deb package available somwehere ? )
Thank you

qyot27
8th September 2013, 00:34
Hi,
I'm trying to compile Avxsynth on my Ubuntu 13.04 64 box. I followed the instructions here : https://github.com/avxsynth/avxsynth/wiki/System-Setup
And I have some trouble while compiling avxsynth :
http://pastebin.com/egZDP3b3

Can you help me? (is a .deb package available somwehere ? )
Thank you
Use FFmpeg and FFMS2 from git. FFmpeg 0.11.1 and FFMS2 2.17 are outdated and those instructions haven't been updated.

karasu
8th September 2013, 18:05
Thank you qyot27,
after failing to compile ffmpeg, I installed the last version from Jon severinsson's ppa (https://launchpad.net/~jon-severinsson/+archive/ffmpeg)
The compilation of FFMS2 returned me tons of warning but I think it's now installed.

Unfortunately I still can't compile Avxsynth : http://pastebin.com/viUUQAzF

Do I need to use special parameters when configuring ffms2 or Avxsynth ?

qyot27
8th September 2013, 22:08
Those errors are because there's an API mismatch somewhere in there, due to one or a couple parts being outdated.

AvxSynth expects FFMS2 2.18. And FFMS2 2.18 very likely expects a recent FFmpeg.

Prerequisites:
sudo apt-get update

sudo apt-get -y install autoconf automake build-essential git libass-dev libgpac-dev \
libsdl1.2-dev libtheora-dev libtool libva-dev libvdpau-dev libvorbis-dev libx11-dev \
libxext-dev libxfixes-dev pkg-config texi2html zlib1g-dev checkinstall yasm \
liblog4cpp5-dev liblog4cpp5 libcairo2-dev libpango1.0-dev libjpeg-dev

Compiling FFmpeg (the external libraries - libx264, libvorbis, libopus, etc. - are optional; enable them as desired, as long as you have the -dev packages for them):
git clone git://source.ffmpeg.org/ffmpeg.git
cd ffmpeg
./configure --enable-gpl --enable-version3 --enable-avresample --enable-pic --enable-avisynth
make
sudo checkinstall --pkgname=ffmpeg --pkgversion="7:$(git rev-list --count \
HEAD)-g$(git rev-parse --short HEAD)" --backup=no --deldoc=yes \
--delspec=yes --deldesc=yes --strip=yes --stripso=yes --addso=yes \
--fstrans=no --default

FFMS2:
git clone git://github.com/FFMS/ffms2.git
cd ffms2
./configure --enable-shared --with-pic
make
sudo checkinstall --pkgname=ffms2 --pkgversion="1:$(./version.sh)-git" --backup=no \
--deldoc=yes --delspec=yes --deldesc=yes --strip=yes --stripso=yes --addso=yes \
--fstrans=no --default

AvxSynth:
git clone git://github.com/avxsynth/avxsynth.git
cd avxsynth
autoreconf -fiv
./configure --disable-avxedit --enable-silent-rules --with-pic
make
sudo checkinstall --pkgname=avxsynth --pkgversion="1:$(grep "Version" avxsynth.pc | \
cut -f2 -d " ")+$(git rev-list --count HEAD)-g$(git rev-parse --short HEAD)-$(date +%Y%m%d)" \
--backup=no --deldoc=yes --delspec=yes --deldesc=yes --strip=yes --stripso=yes \
--addso=yes --fstrans=no --default

karasu
14th September 2013, 20:42
Thanks a lot, everything went well.

karasu
14th September 2013, 22:14
Hi again,

I want to save the output of my avs script. I tried the frameserver piped to x264 :
avxFrameServer test-mblur.avs false | x264 --preset slow --crf 16 -o out.264
x264 [error]: No input file. Run x264 --help for a list of options.


With AVXEdit I also tried "ImageWriter()" but I get an error when trying to execute the script.


Edit : It's ok, I compiled the latest x264 and used the script directly as input.

manma
12th October 2013, 07:58
So how exactly would one deal with a DVD source in avxsynth? I know in Windows you use dgindex to create a d2v, but I'm completely lost when it comes to doing this in Linux. I'm guessing wine isn't the answer and that there's probably a preferred native method. Any input?

qyot27
12th October 2013, 19:42
The problem is that DGMPGDec (DGIndex and DGDecode) never got ported to Linux and made to work with AvxSynth. In fact, the only source filter available for AvxSynth is FFMS2, because neither AVISource nor DirectShowSource can work under Linux, and the others never got ported (I tried to get LSMASHSource working, but it wasn't exporting its functions correctly so it could be detected as a plugin). So you'll have to rely on FFMS2, which should have gotten built when you built AvxSynth (although if not, you can also build the AvxSynth plugin from FFMS2's c_plugin branch).

However, there is a port of Decomb (http://mujintou.org.uk/avxsynth), so if there's any IVTC work needed, you can use Telecide/Decimate.

Indexing is simple, though. You can just write the script and let the indexing happen when you open the script in the target program*, or you can use ffmsindex first (add -t -1 to ffmsindex's command if you want audio):
ffmsindex input.vob
and then the script itself:
FFVideoSource("input.vob")
If audio was enabled you'll have to load the video and audio in separate variables and use AudioDub(), since FFMS2.avsi doesn't work with AvxSynth for some reason (or at least it never has for me).

*you don't have to use avxFrameServer because x264, FFmpeg, and mplayer2 or mpv can open .avs scripts through AvxSynth directly; x264 (after February 2013) automatically enables the support, FFmpeg (from git after March 2013, or 2.0 or higher) requires using --enable-avisynth during ./configure, and mplayer2 and mpv both use libavformat's support for it if they were built against an FFmpeg that has it enabled.

sl1pkn07
12th October 2013, 22:05
The problem is that DGMPGDec (DGIndex and DGDecode) never got ported to Linux

not exactly:
http://fraps.servegame.com/movie/dgindex-modoki-20100428.tar.bz2

qyot27
12th October 2013, 22:54
not exactly:
http://fraps.servegame.com/movie/dgindex-modoki-20100428.tar.bz2
I didn't mention that one because of the two responses here:
http://forum.doom9.org/showthread.php?p=1599422#post1599422

Also, because looking at the source code, that seems to be *just* DGIndex, sans DGDecode. An indexing program does no good without a plugin to read its output. Between that and possibly the various mods by maki-rxrz (https://github.com/maki-rxrz/DGMPGDec), it might provide a base to ease porting it correctly, but that's just an idea floating around in the ether.

It probably would be less of a hassle to try adding an AvxSynth plugin interface to d2vsource (or wait for AviSynth+ to jump to cross-platform and then add an interface for that) than try to port DGDecode, although it still is problematic in regard to generating the indices. But wine exists for that part.

manma
14th October 2013, 18:21
Don't take this the wrong way, but between this, Vapoursynth, and using magic to get the Windows version of Avisynth working on Linux, what's the best method to do simple anime or live action encodes? I'm all for sticking with avxsynth if nothing else is THAT much better.