AMVsimple/Zarxgui alternative for compression including avs?

If you have questions about compression/encoding/converting look here.
User avatar
Anicsi
Joined: Mon Jun 18, 2007 3:44 pm
Org Profile

AMVsimple/Zarxgui alternative for compression including avs?

Post by Anicsi » Sat Feb 07, 2015 6:27 pm

Okay, I suck at titles lol So here's the thing: I have a MacBook Pro, I edit with Adobe Premiere, and I am in need of a solution for my final compression/online distribution problems.

I have recently started using avisynth filters, using AMVpack, thanks to this guide:
http://www.animemusicvideos.org/forum/v ... 5&t=122115

It works mostly great, and I am just SO happy I can finally use avisynth for post-processing my videos (and lagarith MEP parts by others). I use AVSPmod to write my scripts and then the .avs file in amvsimple to get my final x264 mp4. And here lies the problem:
I get absolutely terrible banding, even though I just managed to get a relatively crisp any shiny footage in the AVSPmod preview.
Spoiler :
Image
(left: avspmod preview, right: video after encoding .avs file with amvsimple)

I realize that most avisynth users use zarxgui for their final encode, but I am unable to use it as it is currently not supported in the AMVpack for mac, and I have also always had problems playing those video files on my Mac.

Therefor my question: Is there any other encoding software which allows me to also use .avs scripts, besides AmvSimple on my Mac? I do have PlayOnMac, which, as I have understood, is an easier way to run WINE on Mac and thus windows applications, but not everything is supported.

Thanks in advance for any help!

User avatar
Zarxrax
Joined: Sun Apr 01, 2001 6:37 pm
Location: North Cackalacky
Contact:
Org Profile

Re: AMVsimple/Zarxgui alternative for compression including

Post by Zarxrax » Sun Feb 08, 2015 11:01 am

If you've been able to figure out avisynth, then I would just suggest using x264 of ffmpeg to encode. They are both command-line based encoders, which are really what is used behind the scenes inside of graphical user interfaces like amvsimple or zarx264gui anyways.
If I recall correctly (and my knowledge is several years old at best), x264 will only handle encoding the video stream but does not do audio. ffmpeg is a more all-around solution that handles audio too, but the syntax for writing the commands is a bit more difficult.

Here is a similar commandline to what zarx264gui uses for ffmpeg (with a few modifications):
ffmpeg.exe -y -i "inputfile.avs" -c:a libfaac -q:a 100 -c:v libx264 -crf 20 -preset slower -tune animation "outputfile.mp4"

You want to experiment with lowering the crf value, which should improve quality but make the filesize larger.
You will also want to experiment with AQ settings, but I will leave it to someone else to suggest those, or you can try looking through other posts in the forum.

User avatar
Zarxrax
Joined: Sun Apr 01, 2001 6:37 pm
Location: North Cackalacky
Contact:
Org Profile

Re: AMVsimple/Zarxgui alternative for compression including

Post by Zarxrax » Sun Feb 08, 2015 11:02 am

That first sentence should have read "x264 OR ffmpeg". Sorry.

User avatar
Qyot27
Surreptitious fluffy bunny
Joined: Fri Aug 30, 2002 12:08 pm
Status: Creepin' between the bullfrogs
Location: St. Pete, FL
Contact:
Org Profile

Re: AMVsimple/Zarxgui alternative for compression including

Post by Qyot27 » Tue Feb 10, 2015 3:02 am

There's also the possibility of encoding as 10-bit H.264, which avoids encoding-related banding in most cases, but that's a bit more advanced in both AviSynth usage (requires flash3kyuu_deband or Dither) and making sure you use the correct x264 binary.
My profile on MyAnimeList | Quasistatic Regret: yeah, yeah, I finally got a blog

User avatar
Anicsi
Joined: Mon Jun 18, 2007 3:44 pm
Org Profile

Re: AMVsimple/Zarxgui alternative for compression including

Post by Anicsi » Mon Feb 16, 2015 5:27 pm

Zarxrax wrote:If you've been able to figure out avisynth, then I would just suggest using x264 of ffmpeg to encode. They are both command-line based encoders, which are really what is used behind the scenes inside of graphical user interfaces like amvsimple or zarx264gui anyways.
If I recall correctly (and my knowledge is several years old at best), x264 will only handle encoding the video stream but does not do audio. ffmpeg is a more all-around solution that handles audio too, but the syntax for writing the commands is a bit more difficult.

Here is a similar commandline to what zarx264gui uses for ffmpeg (with a few modifications):
ffmpeg.exe -y -i "inputfile.avs" -c:a libfaac -q:a 100 -c:v libx264 -crf 20 -preset slower -tune animation "outputfile.mp4"

You want to experiment with lowering the crf value, which should improve quality but make the filesize larger.
You will also want to experiment with AQ settings, but I will leave it to someone else to suggest those, or you can try looking through other posts in the forum.

Oh wow, thank you so much, it'd be amazing if it worked. Well, unfortunately i got an error message but i'm sure I did something wrong?

Here's the code:
Spoiler :

Code: Select all

Annas-MacBook-Pro:~ annawuki$ ffmpeg -y -i "Documents/Bigbadworldanna.avs" -c:a libfaac -q:a 100 -c:v libx264 -crf 20 -preset slower -tune animation "Documents/BBWpart4.mp4"
ffmpeg version 2.5.2 Copyright (c) 2000-2014 the FFmpeg developers
  built on Dec 30 2014 11:31:18 with llvm-gcc 4.2.1 (LLVM build 2336.11.00)
  configuration: --prefix=/Volumes/Ramdisk/sw --enable-gpl --enable-pthreads --enable-version3 --enable-libspeex --enable-libvpx --disable-decoder=libvpx --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-libgsm --enable-libvidstab --enable-libx265 --arch=x86_64 --enable-runtime-cpudetect
  libavutil      54. 15.100 / 54. 15.100
  libavcodec     56. 13.100 / 56. 13.100
  libavformat    56. 15.102 / 56. 15.102
  libavdevice    56.  3.100 / 56.  3.100
  libavfilter     5.  2.103 /  5.  2.103
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
[b]Documents/Bigbadworldanna.avs: Invalid data found when processing input[/b]
My source file is UTvideo Codec ULY and audio is uncompressed.

My avs script looks like this:
Spoiler :

Code: Select all

AVISource("Z:\Users\annawuki\Desktop\temporary\avisynth encodes\Bigbadworldanna.avi")
Deblock(quant=25, aOffset=0, bOffset=0, mmx=true, isse=true)
FFT3DFilter(sigma=2.0, plane=4)
Deen(mode="a2d", rad=2, thrY=5, thrUV=7, min=0.3)
flash3kyuu_deband()
Any ideas?
Qyot27 wrote:There's also the possibility of encoding as 10-bit H.264, which avoids encoding-related banding in most cases, but that's a bit more advanced in both AviSynth usage (requires flash3kyuu_deband or Dither) and making sure you use the correct x264 binary.
welllll, about that, 10-bit and my mac? Not a good combination. Whenever I try to view 10bit videos, i have to watch on MplayerX because quicktime doesnt show it properly. I also cannot convert the video into another 8-bit codec (with MPEGstreamclip or avidemux), it will still have the same distorted visuals and colors. :(

User avatar
Qyot27
Surreptitious fluffy bunny
Joined: Fri Aug 30, 2002 12:08 pm
Status: Creepin' between the bullfrogs
Location: St. Pete, FL
Contact:
Org Profile

Re: AMVsimple/Zarxgui alternative for compression including

Post by Qyot27 » Thu Feb 19, 2015 12:51 pm

That build of FFmpeg doesn't have FAAC support, you'd need to change -c:a libfaac to -c:a aac (although you'd probably get better results if you used MP3, -c:a libmp3lame).

The error you did get is because the build of FFmpeg you're using wasn't compiled with AviSynth support (well, AvxSynth*, because you're using a native OSX version of FFmpeg there). You'd need to use the FFmpeg installed under Wine. If you don't see --enable-avisynth in that list of options next to configuration: (or the more nicely-formatted output of the -buildconf option), then you can't use .avs scripts with it.

*also, that script wouldn't work with AvxSynth because none of those filters (unless Deblock is one of the internal filters; I can't remember) were ported to work with AvxSynth - or work correctly, in the case of fft3dfilter.


And yeah, 10-bit isn't supported out of the box by some things (the reason MplayerX does is because it's based on libavcodec, one of the FFmpeg libraries). Converting from 10-bit to 8-bit is doable with FFmpeg, though (the builds of MPEGstreamclip and avidemux are probably just too old to support that).

I'd actually suggest mpv rather than MplayerX, but that's just me. The OSX binary is near the bottom of that page.
My profile on MyAnimeList | Quasistatic Regret: yeah, yeah, I finally got a blog

User avatar
Anicsi
Joined: Mon Jun 18, 2007 3:44 pm
Org Profile

Re: AMVsimple/Zarxgui alternative for compression including

Post by Anicsi » Sun Mar 01, 2015 5:45 pm

Qyot27 wrote:That build of FFmpeg doesn't have FAAC support, you'd need to change -c:a libfaac to -c:a aac (although you'd probably get better results if you used MP3, -c:a libmp3lame).

The error you did get is because the build of FFmpeg you're using wasn't compiled with AviSynth support (well, AvxSynth*, because you're using a native OSX version of FFmpeg there). You'd need to use the FFmpeg installed under Wine. If you don't see --enable-avisynth in that list of options next to configuration: (or the more nicely-formatted output of the -buildconf option), then you can't use .avs scripts with it.

*also, that script wouldn't work with AvxSynth because none of those filters (unless Deblock is one of the internal filters; I can't remember) were ported to work with AvxSynth - or work correctly, in the case of fft3dfilter.
Well mp3 isn't that nice for distribution, right? :? Thanks for the reply by the way; I read through this like five times, though, and i've still got questionmarks in my head lol

Ooookay, so I need a different build of ffmpeg (not Mac version) under wine (which in my case means PlayOnMac), it should have been installed already with the amvpack? I tried finding it, but no such luck... If it is not installed, which build should I install to make sure it has avisynth support?

Thanks again!

User avatar
Qyot27
Surreptitious fluffy bunny
Joined: Fri Aug 30, 2002 12:08 pm
Status: Creepin' between the bullfrogs
Location: St. Pete, FL
Contact:
Org Profile

Re: AMVsimple/Zarxgui alternative for compression including

Post by Qyot27 » Mon Mar 02, 2015 3:57 pm

Anicsi wrote:Well mp3 isn't that nice for distribution, right?
MP3 is fine for distribution. The rub is usually if you're trying to play the file on a device, since those may be stricter about all this and not like it. Most AMVs are targetted for PC playback, so the issue is moot - pretty much everything is totally okay with MP3 audio in MP4 files these days (assuming that you would be using MP4 as the container and not MKV).

My underlying point is that FFmpeg's native AAC encoder (-c:a aac) is not really that good, so you'd get better quality results by using MP3. If you're really worried about it, go ahead and use -c:a aac instead of -c:a libmp3lame, just give it a high enough bitrate.
Ooookay, so I need a different build of ffmpeg (not Mac version) under wine (which in my case means PlayOnMac), it should have been installed already with the amvpack? I tried finding it, but no such luck... If it is not installed, which build should I install to make sure it has avisynth support?
I don't know about it being installed with the amvpack, but you can get FFmpeg builds for Windows from here (grab the latest 'static' build from the 32-bit download column):
http://ffmpeg.zeranoe.com/builds/

Virtually all Windows builds of FFmpeg have AviSynth support enabled. It's trickier/almost impossible to find non-Windows builds with it enabled (Debian-unstable and some AUR PKGBUILDS notwithstanding, but those are both Linux, not Mac), because many packagers are still under the false impression that the --enable-avisynth option only works on Windows - it used to be a Windows-only option, but that changed in 2013. Or they look at AvxSynth, see that very very few plugins were ever ported to it, and use that as justification to not enable it.

So while Windows (and Wine users) will almost always have builds with AviSynth support enabled, OSX and Linux users that want a native build typically have to compile FFmpeg themselves to make sure that the build can talk to AvxSynth. I cover installing AvxSynth in the step-by-step guide in the Mac section, for those that are feeling somewhat adventurous (I cover getting Homebrew installed in the first post in that thread).
My profile on MyAnimeList | Quasistatic Regret: yeah, yeah, I finally got a blog

User avatar
Anicsi
Joined: Mon Jun 18, 2007 3:44 pm
Org Profile

Re: AMVsimple/Zarxgui alternative for compression including

Post by Anicsi » Sun Mar 29, 2015 8:30 am

So i finally got the time to experiment further with this. Thanks for the detailed reply! I downloaded and tried to install ffmpeg via PlayonMac, but I got an error message.

(translated:)

Code: Select all

Error in POL_Wine
Wine seems to have crashed
Could it be the destination/virtual drive or whatever it is called, I tried saving it on? I thought it was easier to keep it all together, so I tried installing it with the AMVPack virtual drive (following the steps here). I also tried installing it in a separate location though, it also didn't work. Maybe I am doing something fundamentally wrong.
Even though I get this error, I can make a shortcut, but when I try to open it, it crashes again. I got this Log file here, but I have no idea how to read it lol:
Spoiler :

Code: Select all

41/100)
Importing ISO File: |========            | (42/100)
Importing ISO File: |========            | (43/100)
Importing ISO File: |========            | (44/100)
Importing ISO File: |=========      ISO File Writing: |                    | (01/100)
ISO File Writing: |                    | (02/100)
ISO File Writing: |                    | (03/100)
ISO File Writing: |                    | (04/100)
ffmpeg version N-56648-g65bf9a4 Copyright (c) 2000-2013 the FFmpeg developers

  built on Sep 24 2013 22:04:05 with gcc 4.8.0 (GCC)

  configuration: --arch=x86 --target-os=mingw32 --cross-prefix=/home/zarxrax/FFMPEG/sandbox/mingw-w64-i686/bin/i686-w64-mingw32- --pkg-config=pkg-config --enable-gpl --enable-libx264 --enable-avisynth  libavutil      52. 46.100 / 52. 46.100

  libavcodec     55. 33.100 / 55. 33.100

  libavformat    55. 18.102 / 55. 18.102

  libavdevice    55.  3.100 / 55.  3.100

  libavfilter     3. 87.100 /  3. 87.100

  libswscale      2.  5.100 /  2.  5.100

  libswresample   0. 17.103 /  0. 17.103

  libpostproc    52.  3.100 / 52.  3.100

Hyper fast Audio and Video encoder

usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...


[03/29/15 15:18:44] - Running wine- ffmpeg.exe (Working directory : /Users/annawuki/Library/PlayOnMac/wineprefix/AMVpack/drive_c/Program Files/AMVpack/Zarx264gui)
ffmpeg version N-56648-g65bf9a4 Copyright (c) 2000-2013 the FFmpeg developers

  built on Sep 24 2013 22:04:05 with gcc 4.8.0 (GCC)

  configuration: --arch=x86 --target-os=mingw32 --cross-prefix=/home/zarxrax/FFMPEG/sandbox/mingw-w64-i686/bin/i686-w64-mingw32- --pkg-config=pkg-config --enable-gpl --enable-libx264 --enable-avisynth  libavutil      52. 46.100 / 52. 46.100

  libavcodec     55. 33.100 / 55. 33.100

  libavformat    55. 18.102 / 55. 18.102

  libavdevice    55.  3.100 / 55.  3.100

  libavfilter     3. 87.100 /  3. 87.100

  libswscale      2.  5.100 /  2.  5.100

  libswresample   0. 17.103 /  0. 17.103

  libpostproc    52.  3.100 / 52.  3.100

Hyper fast Audio and Video encoder

usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...



Also, what I do ask myself now is, the command is for the terminal, right? So if i use the command as implied before, how would I specify that it has to use the ffmpeg built in playonmac and not the native OSX version of ffmpeg I've installed? If i use the code below, i get the same error message as before (though I suppose that's because the install failed).

Code: Select all

ffmpeg.exe -y -i "Documents/inputfile.avs" -c:a libfaac -q:a 100 -c:v libx264 -crf 20 -preset slower -tune animation "Documents/outputfile.mp4"
(Error log, see post above from 17.02)

Also, I do think I prefer aac for the reasons you mentioned, how would I specify the bitrate then in the command (f.e. 320kbps)?

I really appreciate the help, thank you!

User avatar
Qyot27
Surreptitious fluffy bunny
Joined: Fri Aug 30, 2002 12:08 pm
Status: Creepin' between the bullfrogs
Location: St. Pete, FL
Contact:
Org Profile

Re: AMVsimple/Zarxgui alternative for compression including

Post by Qyot27 » Sun Mar 29, 2015 3:22 pm

Anicsi wrote:I downloaded and tried to install ffmpeg via PlayonMac
Unless PlayOnMac has some utility to deal with 7z archives, it probably didn't install it at all. The error message probably was because it doesn't understand the archive isn't an installer.
Could it be the destination/virtual drive or whatever it is called, I tried saving it on? I thought it was easier to keep it all together, so I tried installing it with the AMVPack virtual drive (following the steps here). I also tried installing it in a separate location though, it also didn't work. Maybe I am doing something fundamentally wrong.
Even though I get this error, I can make a shortcut, but when I try to open it, it crashes again.

I got this Log file here, but I have no idea how to read it lol:
Spoiler :

Code: Select all

41/100)
Importing ISO File: |========            | (42/100)
Importing ISO File: |========            | (43/100)
Importing ISO File: |========            | (44/100)
Importing ISO File: |=========      ISO File Writing: |                    | (01/100)
ISO File Writing: |                    | (02/100)
ISO File Writing: |                    | (03/100)
ISO File Writing: |                    | (04/100)
ffmpeg version N-56648-g65bf9a4 Copyright (c) 2000-2013 the FFmpeg developers

  built on Sep 24 2013 22:04:05 with gcc 4.8.0 (GCC)

  configuration: --arch=x86 --target-os=mingw32 --cross-prefix=/home/zarxrax/FFMPEG/sandbox/mingw-w64-i686/bin/i686-w64-mingw32- --pkg-config=pkg-config --enable-gpl --enable-libx264 --enable-avisynth  libavutil      52. 46.100 / 52. 46.100

  libavcodec     55. 33.100 / 55. 33.100

  libavformat    55. 18.102 / 55. 18.102

  libavdevice    55.  3.100 / 55.  3.100

  libavfilter     3. 87.100 /  3. 87.100

  libswscale      2.  5.100 /  2.  5.100

  libswresample   0. 17.103 /  0. 17.103

  libpostproc    52.  3.100 / 52.  3.100

Hyper fast Audio and Video encoder

usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...


[03/29/15 15:18:44] - Running wine- ffmpeg.exe (Working directory : /Users/annawuki/Library/PlayOnMac/wineprefix/AMVpack/drive_c/Program Files/AMVpack/Zarx264gui)
ffmpeg version N-56648-g65bf9a4 Copyright (c) 2000-2013 the FFmpeg developers

  built on Sep 24 2013 22:04:05 with gcc 4.8.0 (GCC)

  configuration: --arch=x86 --target-os=mingw32 --cross-prefix=/home/zarxrax/FFMPEG/sandbox/mingw-w64-i686/bin/i686-w64-mingw32- --pkg-config=pkg-config --enable-gpl --enable-libx264 --enable-avisynth  libavutil      52. 46.100 / 52. 46.100

  libavcodec     55. 33.100 / 55. 33.100

  libavformat    55. 18.102 / 55. 18.102

  libavdevice    55.  3.100 / 55.  3.100

  libavfilter     3. 87.100 /  3. 87.100

  libswscale      2.  5.100 /  2.  5.100

  libswresample   0. 17.103 /  0. 17.103

  libpostproc    52.  3.100 / 52.  3.100

Hyper fast Audio and Video encoder

usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...



There's nothing to read; that's actually just the result of invoking ffmpeg with no arguments. Just basic version and splash text. That's the ffmpeg.exe that comes with Zarxgui, remember to update it with one from Zeranoe: http://ffmpeg.zeranoe.com/builds/ (like it says, if in doubt, choose 32-bit static).

Also, what I do ask myself now is, the command is for the terminal, right? So if i use the command as implied before, how would I specify that it has to use the ffmpeg built in playonmac and not the native OSX version of ffmpeg I've installed? If i use the code below, i get the same error message as before (though I suppose that's because the install failed).

Code: Select all

ffmpeg.exe -y -i "Documents/inputfile.avs" -c:a libfaac -q:a 100 -c:v libx264 -crf 20 -preset slower -tune animation "Documents/outputfile.mp4"
(Error log, see post above from 17.02)

Also, I do think I prefer aac for the reasons you mentioned, how would I specify the bitrate then in the command (f.e. 320kbps)?

I really appreciate the help, thank you!
Just having the '.exe' suffix on the end of the ffmpeg binary name will stop the OSX version from being used, since the native OSX version's filename isn't 'ffmpeg.exe', it's just 'ffmpeg'. So to OSX, the two are completely separate. But that doesn't guarantee that it can see and use the one installed under PlayOnMac correctly.

The way you'd make sure it can use the one under PlayOnMac is to make sure that ffmpeg.exe sits somewhere on the Wine %PATH% (if you have it presented to you as drive C:\, put it in C:\WINDOWS). Then using the above command as an example, the only difference would be (bolded):
wine ffmpeg.exe -y -i "Documents/inputfile.avs" -c:a libfaac -q:a 100 -c:v libx264 -crf 20 -preset slower -tune animation "Documents/outputfile.mp4"
Setting the aac encoder and the bitrate would be done like this (libvo-aacenc is used here since it should 'just work'):
wine ffmpeg.exe -y -i "Documents/inputfile.avs" -c:v libx264 -crf 20 -preset slower -tune animation -c:a libvo_aacenc -b:a 320k "Documents/outputfile.mp4"
My profile on MyAnimeList | Quasistatic Regret: yeah, yeah, I finally got a blog

Post Reply

Return to “Conversion / Encoding Help”