Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
I am about to come in my pants (avisynth for Linux)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Off the Wall
View previous topic :: View next topic  
Author Message
ichbinsisyphos
Guru
Guru


Joined: 08 Dec 2006
Posts: 547

PostPosted: Thu Nov 08, 2012 5:46 pm    Post subject: I am about to come in my pants (avisynth for Linux) Reply with quote

... now that's what I call a descriptive thread title.


After 5 years of waiting for avisynth-3 some guys ported avisynth-2 to linux. In March. And nobody told me.

https://github.com/avxsynth/avxsynth/wiki

Quote:
What Is AvxSynth?
AvxSynth is a Linux port of the AviSynth toolkit. The objective of the porting effort was to bring the power of AviSynth into the Linux world. In particular, we are interested in AviSynth as a frame server front-end to the encode step of our media pipeline. An overview of the AvxSynth architecture can be found here.

The AvxSynth port was based on the AviSynth 2.5.8 code base, and we are calling this version 4.0, so as to differentiate from the dead AviSynth 3.0 project.


http://www.youtube.com/watch?v=DdaQeMcE0UM

Let's see if I can get this thing to compile on Gentoo.


Last edited by ichbinsisyphos on Fri Nov 09, 2012 2:55 pm; edited 1 time in total
Back to top
View user's profile Send private message
ichbinsisyphos
Guru
Guru


Joined: 08 Dec 2006
Posts: 547

PostPosted: Thu Nov 08, 2012 6:42 pm    Post subject: Reply with quote

A first test was successful.

The least hassle you can expect with libav. ffmpeg is also possible, but needs to be patched/configured by hand.

Additional dependencies:
dev-libs/log4cpp
media-libs/ffmpegsource
media-libs/libpostproc

In ffmpegsource some things have to be changed. I have no idea how to write a proper patch, but if you put this in ffmpegsource's /files folder and add it in the ebuild's "PATCHES=", it should work.
ffmpegsource-2.17-avx.patch:
--- ffms-2.17-src/configure   2011-12-29 01:12:11.000000000 +0100
+++ ffms-2.17-src/test/neu/configure   2012-11-08 19:09:46.000000000 +0100
@@ -15716,7 +15716,7 @@
 main ()
 {
 
-                avcodec_init();
+                avcodec_register_all();
                 swscale_version();
                 #ifdef FFMS_USE_FFMPEG_COMPAT
                 int bogus = CODEC_ID_G2M;
@@ -15759,7 +15759,7 @@
 main ()
 {
 
-                avcodec_init();
+                avcodec_register_all();
                 swscale_version();
                 #ifdef FFMS_USE_FFMPEG_COMPAT
                 int bogus = CODEC_ID_G2M;
@@ -15790,7 +15790,7 @@
 main ()
 {
 
-                avcodec_init();
+                avcodec_register_all();
                 swscale_version();
                 #ifdef FFMS_USE_FFMPEG_COMPAT
                 int bogus = CODEC_ID_G2M;



The only minor problem left is that avxsynth is completely undocumented.


Last edited by ichbinsisyphos on Fri Nov 09, 2012 2:56 pm; edited 1 time in total
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1565
Location: U.S.A.

PostPosted: Fri Nov 09, 2012 12:59 am    Post subject: Reply with quote

You did it right. A "patch" is just a file containing the output of a 'diff' command. What you've got there is a "unified diff" (output of 'diff -u'), which is probably the format most commonly used for general patching.

As to documentation, since it's described as a "port" of avisynth, maybe it's a fair assumption that it uses the same language:
http://neuron2.net/www.math.berkeley.edu/benrg/avisynth.html

If you were talking about APIs for plugins and stuff, maybe scout around their github.
_________________
"We can't expect the American People to jump from Capitalism to Communism, but we can assist their elected leaders in giving them small doses of Socialism, until they awaken one day to find that they have Communism." -- Nikita Krushchev
Back to top
View user's profile Send private message
wswartzendruber
Veteran
Veteran


Joined: 23 Mar 2004
Posts: 1224
Location: Jefferson, USA

PostPosted: Fri Nov 09, 2012 3:26 am    Post subject: Reply with quote

Avisynth is out for Linux?!?!?!?!??!!?!

YYEEEEEAAAAAAAAAAAAAHHHHHHHHHHHH!!!!!!!!!!
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1565
Location: U.S.A.

PostPosted: Fri Nov 09, 2012 3:33 am    Post subject: Reply with quote

Don't you have homework to do?
_________________
"We can't expect the American People to jump from Capitalism to Communism, but we can assist their elected leaders in giving them small doses of Socialism, until they awaken one day to find that they have Communism." -- Nikita Krushchev
Back to top
View user's profile Send private message
wswartzendruber
Veteran
Veteran


Joined: 23 Mar 2004
Posts: 1224
Location: Jefferson, USA

PostPosted: Fri Nov 09, 2012 3:44 am    Post subject: Reply with quote

FUCK NO!!!
Back to top
View user's profile Send private message
ichbinsisyphos
Guru
Guru


Joined: 08 Dec 2006
Posts: 547

PostPosted: Sat Nov 10, 2012 4:43 am    Post subject: Reply with quote

Did anybody try this yet? Playback works fine, but only watching a video piped into mplayer gets old too. There's a frameserver included with which you should be able to pipe the output to a encoder which accepts stdin-input.
Only x264 seems to work more or less out of the box.
But even there I'm having problems. The playback of the resulting *.avi is too fast in mplayer and the colors are off. Avidemux and VLC don't seem to be able to get any info out of the file at all.
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1565
Location: U.S.A.

PostPosted: Sat Nov 10, 2012 5:45 am    Post subject: Reply with quote

wswartzendruber wrote:
FUCK NO!!!

Did you flunk out again, or are you just drunk again. :?
_________________
"We can't expect the American People to jump from Capitalism to Communism, but we can assist their elected leaders in giving them small doses of Socialism, until they awaken one day to find that they have Communism." -- Nikita Krushchev
Back to top
View user's profile Send private message
ichbinsisyphos
Guru
Guru


Joined: 08 Dec 2006
Posts: 547

PostPosted: Sat Nov 10, 2012 11:22 pm    Post subject: Reply with quote

Could it be that x264 is a bit of a mess? The Playback speed issue was solved with using a .mkv container, .avi seems to have some problems with x264 (and it insists that it's not compiled with .mp4-support, even though the USE flag is set).

It turned out the colors were off because x264 swaps the U- and V-channels. If I swap them before in avxsynth, the preview in mplayer is now wrong, but x264 encodes it correctly :lol:
Back to top
View user's profile Send private message
energyman76b
Advocate
Advocate


Joined: 26 Mar 2003
Posts: 2026
Location: Germany

PostPosted: Sun Nov 11, 2012 10:29 am    Post subject: Reply with quote

ichbinsisyphos wrote:
Could it be that x264 is a bit of a mess? The Playback speed issue was solved with using a .mkv container, .avi seems to have some problems with x264 (and it insists that it's not compiled with .mp4-support, even though the USE flag is set).

It turned out the colors were off because x264 swaps the U- and V-channels. If I swap them before in avxsynth, the preview in mplayer is now wrong, but x264 encodes it correctly :lol:


wow... so much work just for your home made porn.... was he a really nice looking guy or why do you invest so much time?
_________________
AidanJT wrote:

Libertardian denial of reality is wholly unimpressive and unconvincing, and simply serves to demonstrate what a bunch of delusional fools they all are.

Satan's got perfectly toned abs and rocks a c-cup.
Back to top
View user's profile Send private message
ichbinsisyphos
Guru
Guru


Joined: 08 Dec 2006
Posts: 547

PostPosted: Sun Nov 11, 2012 2:32 pm    Post subject: Reply with quote

Listen buddy, if at some point in time video on Linux should be un-fucked-up, AvxSynth will be remembered as were it all began ;)
Back to top
View user's profile Send private message
Gusar
Advocate
Advocate


Joined: 09 Apr 2005
Posts: 2643
Location: Slovenia

PostPosted: Sun Nov 11, 2012 3:10 pm    Post subject: Reply with quote

x264 doesn't output avi. It outputs either a raw avc stream, a mkv encapsulated stream, or an mp4 encapsulated stream if compiled with gpac support. I see latest versions can also output a flv encapsulated stream.

As for Avxsynth, it has this one problem: filters need to be ported to it. So the number one strong point of Avisynth - it's vast collection of filters - is missing. You still get the number two strong point - the scripting - but without the filters that's a bit limited.

PS. You might also want to look at Vapoursynth. Contrary to what the name implies, it's not vapourware :). It uses python as scripting language. Though it has the same problem regarding filters as Avxsynth. Not a problem on Windows where it can load Avisynth filters, but that obviously won't work in Linux (unless they put a dll loader into the thing, but then, why not simply use Avisynth in wine? something I already do anyway).
Back to top
View user's profile Send private message
ichbinsisyphos
Guru
Guru


Joined: 08 Dec 2006
Posts: 547

PostPosted: Sun Nov 11, 2012 3:19 pm    Post subject: Reply with quote

What is the deal with the swapped color channels? I noticed x264-encoder doesn't do it if I load a regular video file, and e.g. mplayer doesn't do it with any source, regular video file or avxsynth frameserver.
Back to top
View user's profile Send private message
erm67
Tux's lil' helper
Tux's lil' helper


Joined: 01 Nov 2005
Posts: 130
Location: somewhere in Berlusconia.

PostPosted: Mon Nov 12, 2012 9:40 am    Post subject: Reply with quote

ichbinsisyphos wrote:
, if at some point in time video on Linux should be un-fucked-up,


Well video on linux is not soo, bad ... as long as you don't have to deal with propietary formats, codecs and/or drm ......

My sources are mostly first hand (dvb-S/T, camcorder) and I don't miss anything from the Windows environment ....

Well at the moment dealing with HD mp4 (yesss, I got 3 free dvb-t hd channels atm) is not optimal but in windows is not better either .... exp precise cutting for commercials.

Too bad most of the old tools (projectx avidemux transcode ...) still has some problems with HD, but it is improving.
Well even on windows the best method to deal with HD DVB-T/S is to use mkvmerge and work on the matroska output, but I can do that even better in linux ...
_________________
Truck!!
A posse ad esse non valet consequentia
Πάντα ῥεῖ
Back to top
View user's profile Send private message
ichbinsisyphos
Guru
Guru


Joined: 08 Dec 2006
Posts: 547

PostPosted: Fri Nov 16, 2012 10:21 pm    Post subject: Reply with quote

Ok, don't hold your breath yet. ;)

I waited so long for a avisynth alternative on Linux that I completely forgot that it's 1990's software :lol: Doing stuff is sometimes unnecessarily complicated, especially if you want the script to decide what to do based on the individual characteristics of the video source.
For simply stuff like resizing, cutting, merging, framerate conversions, ... it is still better than everything I else tried on Linux.
The frameserver can't handle audio and video simultaneously. It looks like it is planned for later versions.

Vapoursynth (didn't know it existed before this thread) is a more modern approach, but is highly unstable. I downloaded the source a couple of times now and none of them compiled without corrections. It looks like most "plugins" just call windows .dlls, so it's functionality on Linux is even more restricted than avxSynth right now.
It doesn't do audio either and it looks like it isn't even planned.
Back to top
View user's profile Send private message
erm67
Tux's lil' helper
Tux's lil' helper


Joined: 01 Nov 2005
Posts: 130
Location: somewhere in Berlusconia.

PostPosted: Sat Nov 17, 2012 11:26 pm    Post subject: Reply with quote

ichbinsisyphos wrote:

For simply stuff like resizing, cutting, merging, framerate conversions, ... it is still better than everything I else tried on Linux.


You mean it can cut mpeg not at GOP boundaries without reencoding? You know cutting an mpeg2 at gop boundaries was not a big deal, gops were usually 15 frames, at worst a few frames were lost but mpeg4 is usually broadcasted with large GOPs (150 frames or more) and cutting at gop boundaries is becoming problematic.

With the current price of blue ray burners and media re-encoding is just a waste of electricity :-)
_________________
Truck!!
A posse ad esse non valet consequentia
Πάντα ῥεῖ
Back to top
View user's profile Send private message
ichbinsisyphos
Guru
Guru


Joined: 08 Dec 2006
Posts: 547

PostPosted: Sun Nov 18, 2012 12:01 am    Post subject: Reply with quote

No, only with reencoding. The frameserver - SURPRISE!!!!!!!!!!!!! - serves single frames :)
But still, the quality you can get is awesome. Reencoding x264 in avimux sucks massive ass.

If you don't need to reencode, avimux is usually good enough.

Also I don't see how you could possibly start a cut clip at a not-I-frame, without reencoding. That would require magic, the kind that works with human sacrifice.
Quote:
With the current price of blue ray burners and media re-encoding is just a waste of electricity
I don't even have a good use for it, most of the time, but I want to.
Back to top
View user's profile Send private message
Gusar
Advocate
Advocate


Joined: 09 Apr 2005
Posts: 2643
Location: Slovenia

PostPosted: Sun Nov 18, 2012 4:19 am    Post subject: Reply with quote

erm67 wrote:
but mpeg4 is usually broadcasted with large GOPs (150 frames or more)

Hell no. Broadcast has the same, if not stricter requirements than DVD. So with broadcast videos you'll see i-frames in intervals less than a second apart. Only encodes for offline use (those you made yourself, or encodes from the "scene" (the stuff you download off p2p networks)) have a large GOP - by default 10 seconds or a scene change, whichever comes first.

erm67 wrote:
With the current price of blue ray burners and media re-encoding is just a waste of electricity

I'd like to see you repeat that after you want to deal with TV shows spanning several seasons. Disk space might be cheap (well, it has gone up significantly after the floods in Taiwan last year), but nevertheless disks cost money. 178 episodes of one show, 144 of another, and 91 of yet a third one, and I guarantee you you'll want to lower the amount of space they require.

ichbinsisyphos wrote:
Also I don't see how you could possibly start a cut clip at a not-I-frame, without reencoding. That would require magic, the kind that works with human sacrifice.

Well, Avidemux is capable of something called "smart copy" with mpeg4 ASP (xvid/divx) video. The frames before the first i-frame are re-encoded, the rest is copied unmodified. So there's re-encoding involved, but only for a few frames.
Back to top
View user's profile Send private message
erm67
Tux's lil' helper
Tux's lil' helper


Joined: 01 Nov 2005
Posts: 130
Location: somewhere in Berlusconia.

PostPosted: Sun Nov 18, 2012 8:33 am    Post subject: Reply with quote

Gusar wrote:
erm67 wrote:
but mpeg4 is usually broadcasted with large GOPs (150 frames or more)

Hell no. Broadcast has the same, if not stricter requirements than DVD. So with broadcast videos you'll see i-frames in intervals less than a second apart. Only encodes for offline use (those you made yourself, or encodes from the "scene" (the stuff you download off p2p networks)) have a large GOP - by default 10 seconds or a scene change, whichever comes first.

Look my friend I get 2 HD channels with native HD content and 3 upscaled, and almost every day record movies, gops are 4-5 sec apart (150 gops/25 fps) here :-)
I am am talking about DVB-T HD mpeg4, the good thing is that, probably for technical reasons of the broadcaster, the movies almost always starts and end at a gop the problem is always with the commercials inside.

ichbinsisyphos wrote:
Also I don't see how you could possibly start a cut clip at a not-I-frame, without reencoding. That would require magic, the kind that works with human sacrifice.

Well only the last gop and audio frame at cut poit and first after the cut are reencoded, there is plenty of software for windows that does that. I am doing that with dvb-t SD since 2004 at least ...
Gusar wrote:

Well, Avidemux is capable of something called "smart copy" with mpeg4 ASP (xvid/divx) video. The frames before the first i-frame are re-encoded, the rest is copied unmodified. So there's re-encoding involved, but only for a few frames.


Only with mpeg 2 (and maybe divx, haven't tried), avidemux 2.4 cannot even read TS mpeg4 HD and the latest from git can only cut at IFrames. Currently I am saving HD movies with commercials waiting for improvements in avidemux ...

a 50GB blu ray goes for ~2€ and the average size of an HD movie (~100 minutes) without commercials is 5-8 Gb, I don't record series but usually episodes are shorter, and the price to store them uncompressed is affordable... I mean it's 2€ every couple of weeks.
_________________
Truck!!
A posse ad esse non valet consequentia
Πάντα ῥεῖ
Back to top
View user's profile Send private message
Gusar
Advocate
Advocate


Joined: 09 Apr 2005
Posts: 2643
Location: Slovenia

PostPosted: Sun Nov 18, 2012 1:04 pm    Post subject: Reply with quote

erm67 wrote:
Look my friend I get 2 HD channels with native HD content and 3 upscaled, and almost every day record movies, gops are 4-5 sec apart (150 gops/25 fps) here :-)

Interesting. I only get HD channels via cable and I don't have the appropriate hardware to record those to a computer. The non-HD DVB-T channels I get here have short GOPs.

erm67 wrote:
Only with mpeg 2 (and maybe divx, haven't tried)

It can do it for xvid/divx, and only for that.

erm67 wrote:
avidemux 2.4 cannot even read TS mpeg4 HD

2.4 is oooold, it doesn't surprise me it can't read HD streams. Proper cutting of them (just cutting, no "smart copy") was a goal for 2.6, which was released recently.

erm67 wrote:
I don't record series but usually episodes are shorter

They may be shorter, but there's a lot of them. *A lot*. And it's not just about storage space, using Blu-rays (lucky you that you can get a 50GB one for $2, the cheapest I can find here is a 10-disc spindle for 40 EUR) also brings the inconvenience of handling multiple discs.
Back to top
View user's profile Send private message
erm67
Tux's lil' helper
Tux's lil' helper


Joined: 01 Nov 2005
Posts: 130
Location: somewhere in Berlusconia.

PostPosted: Sun Nov 18, 2012 1:39 pm    Post subject: Reply with quote

Gusar wrote:
erm67 wrote:
Look my friend I get 2 HD channels with native HD content and 3 upscaled, and almost every day record movies, gops are 4-5 sec apart (150 gops/25 fps) here :-)

Interesting. I only get HD channels via cable and I don't have the appropriate hardware to record those to a computer. The non-HD DVB-T channels I get here have short GOPs.


They started broadcasting free-to-air native HD in August this year, and only some movies are not upscaled (but most commercials are already HD, bastards) ... Yesterday I recorded Yoghi bear and gops are 3 seconds apart, probably they are still adjusting, but nevertheless cutting commercials sucks :-)
Gusar wrote:

erm67 wrote:
avidemux 2.4 cannot even read TS mpeg4 HD

2.4 is oooold, it doesn't surprise me it can't read HD streams. Proper cutting of them (just cutting, no "smart copy") was a goal for 2.6, which was released recently.


I meant 2.5.6 not 2.4 ...
Avidemux 2.6 r8273 (3 days ago snapshot) can't do for HD mpeg4

EDIT: forget it, it can cut anywhere but B frames, yessssssssss

Gusar wrote:

erm67 wrote:
I don't record series but usually episodes are shorter

They may be shorter, but there's a lot of them. *A lot*. And it's not just about storage space, using Blu-rays (lucky you that you can get a 50GB one for $2, the cheapest I can find here is a 10-disc spindle for 40 EUR) also brings the inconvenience of handling multiple discs.


Try ebay ;-) To be honest I still buy 25Gb ..... But I bet a 45min episode in DVB-T HD fits into a regular DVD.
_________________
Truck!!
A posse ad esse non valet consequentia
Πάντα ῥεῖ
Back to top
View user's profile Send private message
cord
Apprentice
Apprentice


Joined: 28 Apr 2007
Posts: 204

PostPosted: Sat Apr 13, 2013 5:28 pm    Post subject: Reply with quote

Ebuild for avxsynth?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Off the Wall All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum