avisynth scripts fail to load in ffmpeg

Issues involving a Windows version of FFmpeg. Do not post general usage questions here.

avisynth scripts fail to load in ffmpeg

Postby barndawgie » Sat Mar 23, 2013 7:48 pm

I created a simple one-line AVS script called Test.avs which simply says "Version()". It loads in Windows Media Player correct and plays for 10s dispalying version info for AviSynth.

Even this script fails, however, as an ffmpeg source. Can someone explain to me how to get AviSynth working as an input to ffmpeg on Windows? Detailed output and version info below.

Thanks!


PS> ffmpeg -i .\Test.avs -loglevel debug
ffmpeg version N-51211-ge0e8c20 Copyright (c) 2000-2013 the FFmpeg developers
built on Mar 22 2013 09:01:53 with gcc 4.7.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfi
g --enable-frei0r --enable-gnutls --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libg
sm --enable-libilbc --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --ena
ble-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-lib
twolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxa
vs --enable-libxvid --enable-zlib
libavutil 52. 22.101 / 52. 22.101
libavcodec 55. 1.100 / 55. 1.100
libavformat 55. 0.100 / 55. 0.100
libavdevice 55. 0.100 / 55. 0.100
libavfilter 3. 48.100 / 3. 48.100
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
Splitting the commandline.
Reading option '-i' ... matched as input file with argument '.\Test.avs'.
Reading option '-loglevel' ... matched as option 'loglevel' (set libav* logging level) with argument 'debug'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set libav* logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input file .\Test.avs.
Successfully parsed a group of options.
Opening an input file: .\Test.avs.
[avisynth @ 00000000003279e0] Format avisynth probed with size=2048 and score=50
[AVIOContext @ 00000000021ffe40] Statistics: 9 bytes read, 0 seeks
.\Test.avs: Unknown error occurred
barndawgie
 
Posts: 5
Joined: Sat Mar 23, 2013 7:44 pm

Re: avisynth scripts fail to load in ffmpeg

Postby barndawgie » Sun Mar 24, 2013 4:34 pm

Okay, I was able to figure that one out; I was using the 64-bit version of ffmpeg which apparently doesn't support loading from avisynth.

Now I've hit a new problem: FFmpeg crashes when trying to load an avisynth file containg the DGIndex mpeg2source(*.d2v) command. Any tips? What troubleshooting info is needed?
barndawgie
 
Posts: 5
Joined: Sat Mar 23, 2013 7:44 pm

Re: avisynth scripts fail to load in ffmpeg

Postby qyot27 » Sun Mar 24, 2013 7:31 pm

Works here*. Post your entire script, and versions of AviSynth and the DG* stuff.

Also, since you realized the initial thread issue was due to the 32/64 split, are you sure the AviSynth-side is fully one bit type? I'd think that 64-bit builds of FFmpeg would load from the [unofficial] 64-bit fork of AviSynth. I can't verify because I don't have a 64-bit version of Windows to test that.


The AviSynth demuxer in FFmpeg got a massive upgrade 3 days ago, so if there are valid bugs found that'd be good to know. I've not found any directly related to the new demuxer, although there are a couple of satellite issues; neither of them are related to DGIndex/DGDecode.




*output:
Code: Select all
>ffmpeg -i startrek-teaser2_h1080p.avs -vcodec ffvhuff test.avi
ffmpeg version r51248 git-ddc398e Copyright (c) 2000-2013 the FFmpeg developers
  built on Mar 23 2013 22:27:40 with gcc 4.7.2 (GCC)
  configuration: --prefix=/home/qyot27/win32_build --cross-prefix=i686-w64-mingw32- --enab
le-gpl --enable-version3 --disable-w32threads --enable-libutvideo --enable-libxvid --enabl
e-libx264 --enable-libtwolame --enable-libmp3lame --enable-libvorbis --enable-libopus --en
able-libvo-aacenc --enable-libvpx --enable-libtheora --enable-avisynth --cpu=pentium3 --ex
tra-cflags='-I/home/qyot27/win32_build/include -mfpmath=sse -march=pentium3 -msse -mtune=p
entium3 -DPTW32_STATIC_LIB' --extra-ldflags='-L/home/qyot27/win32_build/lib -lx264' --targ
et-os=mingw32 --arch=x86
  libavutil      52. 22.101 / 52. 22.101
  libavcodec     55.  1.100 / 55.  1.100
  libavformat    55.  0.100 / 55.  0.100
  libavdevice    55.  0.100 / 55.  0.100
  libavfilter     3. 48.100 /  3. 48.100
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
Input #0, avisynth, from 'startrek-teaser2_h1080p.avs':
  Duration: 00:01:19.12, start: 0.000000, bitrate: 0 kb/s
    Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 720x480, 23.98 fps, 23.98 t
br, 23.98 tbn, 23.98 tbc
Output #0, avi, to 'test.avi':
  Metadata:
    ISFT            : Lavf55.0.100
    Stream #0:0: Video: ffvhuff (FFVH / 0x48564646), yuv420p, 720x480, q=2-31, 200 kb/s, 2
3.98 tbn, 23.98 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo -> ffvhuff)
Press [q] to stop, [?] for help
frame= 1897 fps= 12 q=0.0 Lsize=  436410kB time=00:01:19.16 bitrate=45161.2kbits/s
video:436360kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.011466%

>

script used:
Code: Select all
MPEG2Source("startrek-teaser2_h1080p.d2v", ipp=true, cpu=4)
qyot27
 
Posts: 37
Joined: Wed Jan 23, 2013 4:10 pm

Re: avisynth scripts fail to load in ffmpeg

Postby barndawgie » Sun Mar 24, 2013 8:46 pm

I'm running the latest build of ffmpeg (downloaded from Zernaoe builds page yesterday). I'm now running 32-bit ffmpeg which works fine for a script using DirectShowSource but not the .d2v. Using the VOB via DirectShow is causing A/V Sync issues, so I wanted to try using DGIndex in hope that would avoid the sync drift.

The repro is pretty simple. Avi synth file looks like this:
Code: Select all
mpeg2source("D:\DVD_Rips\LA\Life_Aquatic.d2v")


ffmpeg command line is just:
Code: Select all
ffmpeg -i .\Life_Aquatic.avs -loglevel debug


I'm using DGIndex 1.5.8; I can't seem to attach the .d2v (get an error message saying that d2v extension isn't allowed). The log for the run looks clean:
Stream Type: MPEG2 Program
Profile: main@main
Frame Size: 720x480
Display Size: [not specified]
Aspect Ratio: 16:9 [3]
Frame Rate: 29.970030 fps
Video Type: Film 99.57%
Frame Type: Progressive
Coding Type: B
Colorimetry: BT.470-2 B,G*
Frame Structure: Frame
Field Order:
Coded Number: 171132
Playback Number: 2
Frame Repeats: 0
Field Repeats: 0
VOB ID: 1
Cell ID: 32
Bitrate:
Bitrate (Avg):
Bitrate (Max):
Audio Stream: 80: AC3 3/2 448
Audio Stream: 81: AC3 2/0 192
Audio Stream: 8a: DTS Audio
Timestamp: 1:58:51
Elapsed: 0:02:27
Remain: FINISH
FPS:
Info:



When I run that through ffmpeg, I get the following and then ffmpeg crashes:
ffmpeg version N-51211-ge0e8c20 Copyright (c) 2000-2013 the FFmpeg developers
built on Mar 22 2013 08:56:38 with gcc 4.7.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfi
g --enable-frei0r --enable-gnutls --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libg
sm --enable-libilbc --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --ena
ble-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-lib
twolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxa
vs --enable-libxvid --enable-zlib
libavutil 52. 22.101 / 52. 22.101
libavcodec 55. 1.100 / 55. 1.100
libavformat 55. 0.100 / 55. 0.100
libavdevice 55. 0.100 / 55. 0.100
libavfilter 3. 48.100 / 3. 48.100
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
Splitting the commandline.
Reading option '-i' ... matched as input file with argument '.\Life_Aquatic.avs'.
Reading option '-loglevel' ... matched as option 'loglevel' (set libav* logging level) with argument 'debug'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set libav* logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input file .\Life_Aquatic.avs.
Successfully parsed a group of options.
Opening an input file: .\Life_Aquatic.avs.
[avisynth @ 03a48a60] Format avisynth probed with size=2048 and score=50
[avisynth @ 03a48a60] File position before avformat_find_stream_info() is 0


It's probably worth mentioning that this .avs file also will not load in Windows Media Player, but it works fine in VirtualDub 1.9.11

Thanks!
Josh
barndawgie
 
Posts: 5
Joined: Sat Mar 23, 2013 7:44 pm

Re: avisynth scripts fail to load in ffmpeg

Postby qyot27 » Mon Mar 25, 2013 4:53 am

The Windows Media Player issue is probably because of the 64-bit thing again. In that, WMP is probably 64-bit.

Try this build of FFmpeg:
http://www.mediafire.com/?yqyk337faaee1vb
qyot27
 
Posts: 37
Joined: Wed Jan 23, 2013 4:10 pm

Re: avisynth scripts fail to load in ffmpeg

Postby barndawgie » Sun Mar 31, 2013 4:06 pm

Hi qyot,

I tried that build of ffmpeg and still got a crash.

For the original build, the Windows Application Log shows:
Faulting application name: ffmpeg.exe, version: 0.0.0.0, time stamp: 0x514c556a
Faulting module name: KERNELBASE.dll, version: 6.1.7601.18015, time stamp: 0x50b83c8a
Exception code: 0xe06d7363
Fault offset: 0x0000c41f
Faulting process id: 0x19f8
Faulting application start time: 0x01ce2e1f93c7e6cb
Faulting application path: D:\Tools\ffmpeg.exe
Faulting module path: C:\Windows\syswow64\KERNELBASE.dll
Report Id: d2ae8c8d-9a12-11e2-92bf-74f06df31d63

This is slightly different with the ffmpeg build you send me, which shows:
Faulting application name: ffmpeg.exe, version: 0.0.0.0, time stamp: 0x514e6e97
Faulting module name: avisynth.DLL, version: 2.5.8.5, time stamp: 0x494eb94d
Exception code: 0xc0000005
Fault offset: 0x00012260
Faulting process id: 0x18c4
Faulting application start time: 0x01ce2e1f18a6c7f0
Faulting application path: C:\Users\Josh\Downloads\ffmpeg_r51248\ffmpeg.exe
Faulting module path: C:\Windows\system32\avisynth.DLL
Report Id: 56689878-9a12-11e2-92bf-74f06df31d63
barndawgie
 
Posts: 5
Joined: Sat Mar 23, 2013 7:44 pm

Re: avisynth scripts fail to load in ffmpeg

Postby qyot27 » Sun Mar 31, 2013 9:01 pm

From what Google brought me, it would seem as though the KERNELBASE issue is due to conflicts with UAC and/or permissions or otherwise general User Profile stuff. The recommendation on that is to log in as a different user, rename the first one, and then log back out and back in as the first user so the profile is regenerated.

Try opening the Command Prompt as an Administrator and running the original build (with the KERNELBASE stuff), or moving/copying said build to C:\Users\[YourUsername] and test again. If it errors out in the same way as the build I supplied, it's certainly a permissions issue.

Now, as to why the one in C:\Users says the error is coming from AviSynth 2.5.8, I don't know. Maybe it's also a permissions issue. Have you tried with any builds of AviSynth 2.6 to see if the problem persists there?
qyot27
 
Posts: 37
Joined: Wed Jan 23, 2013 4:10 pm

Re: avisynth scripts fail to load in ffmpeg

Postby Zarxrax » Wed Apr 17, 2013 9:35 pm

I am also having issues with loading an avs file.
It's odd, but if I just use an avisynth script that says version(), it will actually encode, but avisynth scripts that load any kind of file cause it to crash.
I have tested Avisource, Directshowsource, and ffms2, and they all have the same result. Of course the scripts work fine in every other application, and I am using 32-bit everything.

Code: Select all
ffmpeg -i beta1.avs -loglevel debug
ffmpeg version N-52045-g694fa00 Copyright (c) 2000-2013 the FFmpeg developers
  built on Apr 12 2013 16:54:51 with gcc 4.8.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetyp
e --enable-libgsm --enable-libilbc --enable-libmp3lame --enable-libopencore-amrn
b --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libr
tmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheo
ra --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-li
bvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --ena
ble-zlib
  libavutil      52. 26.100 / 52. 26.100
  libavcodec     55.  2.100 / 55.  2.100
  libavformat    55.  2.100 / 55.  2.100
  libavdevice    55.  0.100 / 55.  0.100
  libavfilter     3. 53.101 /  3. 53.101
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  3.100 / 52.  3.100
Splitting the commandline.
Reading option '-i' ... matched as input file with argument 'beta1.avs'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level)
with argument 'debug'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input file beta1.avs.
Successfully parsed a group of options.
Opening an input file: beta1.avs.
[avisynth @ 03d56a80] Format avisynth probed with size=2048 and score=50
[avisynth @ 03d56a80] File position before avformat_find_stream_info() is 0
Zarxrax
 
Posts: 12
Joined: Wed Apr 17, 2013 9:23 pm

Re: avisynth scripts fail to load in ffmpeg

Postby rogerdpack » Fri Apr 19, 2013 2:54 pm

if there's a debug version of ffmpeg and avisynth's dll maybe you could try and track down where the failure occurs?
rogerdpack
 
Posts: 1210
Joined: Fri Aug 05, 2011 9:56 pm

Re: avisynth scripts fail to load in ffmpeg

Postby Zarxrax » Fri Apr 19, 2013 5:34 pm

I did some further testing, it seems to only be broken in the latest builds.
The following build was the last one that works for me:
ffmpeg-1.2-win32-static.7z 27-Mar-2013 23:44 8.2M

Every one after that crashes.
Zarxrax
 
Posts: 12
Joined: Wed Apr 17, 2013 9:23 pm

Next

Return to Usage Issues

Who is online

Users browsing this forum: No registered users and 2 guests