Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
|
Thread Tools | Search this Thread | Display Modes |
22nd September 2015, 13:05 | #1 | Link |
Registered User
Join Date: Feb 2011
Posts: 48
|
Linking libav against AviSynth 2.6 (and x264 against libav) on Windows/Cygwin
Hello!
I'm not exactly sure whether this is the correct subforum, my apologies if it's the wrong one. I noticed that modern, official x264 builds from [here] fail to load any of my AviSynth scripts (GraphEdit says my filter graph for *.avs is fine, I can play them in Windows Media Player, and it *does* work with more ancient versions of x264 just fine!). The error I get is simply like that: Code:
lavf [error]: could not open input file x264 [error]: could not open input file `input.avs' via any method! I have trouble linking libav 11.4 against AviSynth 2.6 however (configure option "--enable-avisynth"). At first I used the avisynth_c.h header that comes with AviSynth itself. And these errors came up while building libav using GCC 4.3.4 on a 32-Bit CygWin (avisynth_c.h is being included just fine according to config.log): Code:
libavformat/avisynth.c:48:35: warning: avxsynth/avxsynth_c.h: No such file or directory libavformat/avisynth.c:63: error: expected specifier-qualifier-list before 'avs_bit_blt_func' libavformat/avisynth.c:81: error: expected specifier-qualifier-list before 'AVS_ScriptEnvironment' libavformat/avisynth.c:100: error: 'AVS_PLANAR_Y' undeclared here (not in a function) libavformat/avisynth.c:101: error: 'AVS_PLANAR_U' undeclared here (not in a function) libavformat/avisynth.c:102: error: 'AVS_PLANAR_V' undeclared here (not in a function) libavformat/avisynth.c: In function 'avisynth_load_library': libavformat/avisynth.c:126: error: 'AviSynthLibrary' has no member named 'avs_bit_blt' libavformat/avisynth.c:126: error: 'AviSynthLibrary' has no member named 'avs_bit_blt' libavformat/avisynth.c:127: error: 'AviSynthLibrary' has no member named 'avs_clip_get_error' libavformat/avisynth.c:127: error: 'AviSynthLibrary' has no member named 'avs_clip_get_error' libavformat/avisynth.c:128: error: 'AviSynthLibrary' has no member named 'avs_create_script_environment' libavformat/avisynth.c:128: error: 'AviSynthLibrary' has no member named 'avs_create_script_environment' libavformat/avisynth.c:129: error: 'AviSynthLibrary' has no member named 'avs_delete_script_environment' libavformat/avisynth.c:129: error: 'AviSynthLibrary' has no member named 'avs_delete_script_environment' libavformat/avisynth.c:130: error: 'AviSynthLibrary' has no member named 'avs_get_audio' libavformat/avisynth.c:130: error: 'AviSynthLibrary' has no member named 'avs_get_audio' So then I read libavformat/avisynth.c, and there is a comment at the beginning of the source code telling me that I need to get the avisynth_c.h that comes with x264 itself, instead of the one from AviSynth 2.6. So indeed, the latest x264 does have that header included, so I linked against that instead. But the same errors happened again. Am I doing something very wrong here? How exactly should I compile and link libav-11.4 against AviSynth 2.6 on Windows? Thanks!
__________________
Proud owner of a 3dfx Voodoo5 6000 AGP HiNT Rev.A-3700 prototype No RISC, no fun! |
22nd September 2015, 15:11 | #3 | Link | |
Registered User
Join Date: Feb 2011
Posts: 48
|
x264
Quote:
If the official binaries can still do it, that'd be preferred of course, although it might still be interesting how to build this properly by myself as well. In any case, Is there a way I can turn on some more advanced debugging in x264.exe that'd give me more verbose libav error messages as well? Passing "--log-level debug" to x264 doesn't really give any additonal output. I have no idea how to find out why it broke here, given AviSynth itself seems to work fine (according to WMP playback and GraphEdit). Also, as said, older x264 versions also work fine (0.129.2245 in that case, linked against libavformat 54.20.4). Any ideas!?
__________________
Proud owner of a 3dfx Voodoo5 6000 AGP HiNT Rev.A-3700 prototype No RISC, no fun! |
|
22nd September 2015, 16:58 | #5 | Link |
Registered User
Join Date: Feb 2011
Posts: 48
|
Solved
Of course!
Although this is no longer necessary (I found the problem, as I re-investigated my command!), this was my commandline, for animated SDTV content, to convert old and damaged DivX3/AVI files, that libav itself would choke on. I wanted to pass it through DirectShow with AviSynth to mask all the errors the files had: Code:
"c:\Program Files (x86)\x264cli\x264.exe" --preset veryslow --tune animation --b-adapt 2 --b-pyramid normal -f -2:0 --bitrate 500 --aq-mode 1 -p 1 --slow-firstpass --stats v.stats -t 2 --no-fast-pskip --cqm flat --non-deterministic --demuxer lavf "input.avs" -o pass1.264 & "c:\Program Files (x86)\x264cli\x264.exe" --preset veryslow --tune animation --b-adapt 2 --b-pyramid normal -f -2:0 --bitrate 500 --aq-mode 1 -p 2 --stats v.stats -t 2 --no-fast-pskip --cqm flat --non-deterministic --demuxer lavf "input.avs" -o pass2.264 Code:
DirectShowSource("video.divx", audio=false) Now, where was the problem? I added "--demuxer lavf" way back to skip the ffms demuxers' indexing phase for certain elementary streams fed to x264 (like MPEG2), which can take very long on slow storage backends. Since ffms was the default back then.. "--demuxer lavf" always worked on everything for me, but I assume, that nowadays this is handled by the demuxer avs, which is now a builtin in x264? So no more libav linking against AviSynth for this? It works by just removing "--demuxer lavf" or by specifically telling x264 to use the right one by itself with "--demuxer avs". My fault again... Thanks for your time! (It would still be interesting to know how to link libav 11.4 against AviSynth 2.6 though... )
__________________
Proud owner of a 3dfx Voodoo5 6000 AGP HiNT Rev.A-3700 prototype No RISC, no fun! |
Tags |
avisynth, libav, link, linking, x264 |
Thread Tools | Search this Thread |
Display Modes | |
|
|