Log in

View Full Version : Q: avs2yuv versus native ffmpeg avisynth processing / ffmpeg versus x264 <solved>


Darksoul71
1st July 2013, 15:09
Hello fellow doomers,

so far I have used a few crudely hacked AutoIt script plus MKVToolNix and ffmpeg to backup my BDs.

Don't ask why but most available tools I tried did not cover my needs or where overfunctional.

Lately I have run into some issues with incomplete MKV files encoded with ffmpeg in h264 from MakeMKV sources.

Since Ripbot encoded them perfectly, I thought it might be a smart idea to "mimic" the way it works, e.g. switching over to AVISynth scripts with DirectShow source as encoding source.

Two questions arise for me right now ! May be someone can shed some light into my darkness :)

1) Do I gain benefit from using avs2yuv under Windows and piping the output to ffmpeg ? Or is it like the AVISynth wiki stated:

"This way is obsolete since these programs have native AviSynth support now. "


2) While I am modifying my script anyhow, would I see a benefit by replacing ffmpeg with lib264 with native x264 ?
I mean, I am please with the quality ffmpeg produces in the vanilla h264 presets and crf-based encoding as much as I am pleased with the output Ripbot produces with x264.
Given the fact that I do not need to fullfill special codec requirements for a BD standalone since I play back on my HTPC, does native x264 give me any other advantages ?

Mind you that I do not want to ask any kind of "whats best" question but rather like to hear other peoples experiences / opinions.
Even if "versus" sounds like the kind of questions which are disliked here.

Thanks in advance,
D$

Rumbah
1st July 2013, 18:47
I'm using a custom Autohotkey Skript for that purpose, too, using x264 directly or Avisynth with x264 ;)

1) x264 32 Bit can interface with Avisynth without a problem and I like the interface much better than the ffmpeg one. But if you want to use 64bit x264 (or ffmpeg) with 32 bit Avisynth you have to pipe the video as Windows does not allow 64bit programs to call 32bit dlls.

2) The x264 commandline interface it really great, setting --crf --tune --preset is enough to get a good result.

In addition to that I use the cropping function in x264 to crop the bars and open the movie mkv directly without any Avisynth at all.

If you resize I would recommend using Avisynth 2.6 as for me the resizers are as fast as the ffmpeg ones and faster than 2.5.

qyot27
1st July 2013, 18:53
avs2yuv is *mostly* meant for Linux or OSX users that want to use AviSynth under Wine and pipe it out to their system version of FFmpeg. Maybe they have a 64-bit OS, with a 64-bit FFmpeg, and don't want the FFmpeg side of the process limited by the 32-bit bottleneck, even though AviSynth would run into it (this would also be true of 64-bit Windows users). Maybe they need the library of plugins available to mainline AviSynth and can't make due with AvxSynth.

It doesn't really have any advantage if you're using the same bittage for AviSynth and FFmpeg (or x264) and builds of them for the same OS. If there's a combination of different bittages or OSes anywhere in there, then avs2yuv has a purpose.

Darksoul71
1st July 2013, 20:46
Thanks for your replies ! This makes things more clear to me.

@Rumbah:

I'm using a custom Autohotkey Skript for that purpose, too, using x264 directly or Avisynth with x264

Interesting...would you mind sharing ? :)
I am always curious how other people solve things.

I am running here Windows 7 x64 but use ffmpeg-32bits because I do not believe into this 64 bit is much faster than 32 bit thing :cool:

The way RipBot worked just wondered me but I guess avs2yuv is used here to interface to x264 in 64 bit. For my purposes serving via AVISynth straight to ffmpeg should be good enough.

Rumbah
2nd July 2013, 19:49
Well, the script that I use right now doesn't automate that much, it just encodes a Eac3to ripped mkv file with x264.

The Eac3to and mkvtoolnix usage isn't automated in this script as I was too lazy. (there are scripts that automate that too, eg. ripping a BDRebuilder AVCHD disc to a Divx compliant SD avi file)

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Recommended for catching common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.

FileSelectFile, Datei, 1
StringTrimRight, Dateioutput, Datei, 9
Dateioutput = %Dateioutput%.mkv
StringTrimRight, DateiIndex, Datei, 3
DateiIndex = %DateiIndex%ffindex
InputBox, RandOben, Rand oben
Inputbox, RandUnten, Rand unten

Run, x264.exe --preset veryslow --tune film --crf 20 --video-filter crop:0`,%RandOben%`,0`,%RandUnten% --force-cfr --level 4.1 --index "%DateiIndex%" --output "%Dateioutput%" "%Datei%",,,x264PID
Sleep, 5000
Process, Priority, %x264PID%, L
Loop,
{
Sleep, 10000
Process, Exist, %x264PID%
If ErrorLevel = 0
{
Break
}

}
Run, shutdown -s -f -t 300
And beware the variable naming, I'm German :p and if you want other scripts just say a word ;)
Btw. the tools in my signature are written in Autohotkey, too.

Darksoul71
2nd July 2013, 20:50
Thanks, you have PM :)