avs [error]: failed to load avisynth

Bug #1317131 reported by Minato Miray
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
x264 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

On U14.04:
x264 cannot open anything, tried with a RAW AVI file and an X264 MP4 file, the error message always:

Command:
x264 --qp 0 --bitrate 3000 1.mp4 -o tmp_h264.mp4

avs [error]: failed to load avisynth
raw [error]: raw input requires a resolution.
x264 [error]: could not open input file `1.mp4' via any method!

Same with an RAW AVI file:

Command:
 x264 --qp 0 --bitrate 3000 /tmp/tmp2j4v4j.avi -o tmp_h264.mp4
avs [error]: failed to load avisynth
raw [error]: raw input requires a resolution.
x264 [error]: could not open input file `/tmp/tmp2j4v4j.avi' via any method!

It worked on U13.10.
Differences:

x264 -h @13.10:
x264 core:123 r2189 35cf912
Syntax: x264 [options] -o outfile infile

Infile can be raw (in which case resolution is required),
  or YUV4MPEG (*.y4m),
  or Avisynth if compiled with support (no).
  or libav* formats if compiled with lavf support (yes) or ffms support (yes).
Outfile type is selected by filename:
 .264 -> Raw bytestream
 .mkv -> Matroska
 .flv -> Flash Video
 .mp4 -> MP4 if compiled with GPAC support (yes)
Output bit depth: 8 (configured at compile time)

x264 -h @14.04:
x264 core:142 r2389 956c8d8
Syntax: x264 [options] -o outfile infile

Infile can be raw (in which case resolution is required),
  or YUV4MPEG (*.y4m),
  or Avisynth if compiled with support (yes).
  or libav* formats if compiled with lavf support (no) or ffms support (no).
Outfile type is selected by filename:
 .264 -> Raw bytestream
 .mkv -> Matroska
 .flv -> Flash Video
 .mp4 -> MP4 if compiled with GPAC or L-SMASH support (gpac)
Output bit depth: 8 (configured at compile time)

It try to use Avisynth, which is unavailable at U14.04. It used lavf/ffms @13.10, and worked.

Revision history for this message
djcj (djcj) wrote :

It's built without lavf or ffms support, so it can't read anything else than YUV4MPEG (*.y4m).
You can decode the input with something else and then pipe it as y4m output to x264.

Revision history for this message
Minato Miray (minatomiray) wrote :

Negative. It is not an explanation for my question. I have a couple of written programs what uses x264 for MP4 encoding/decoding/splitting. It works well in a U13.10/13.04/12.04 images but changed in U14.04. I need the same functionality without need to recompile the x264 for myself with lavf/ffms support. I do not understand why Ubuntu arbitrarily
 decided to compile it with an unsupported "avisynth" library and why removed the lavf and ffms and thus the widespread MP4 support and supports an ONLY *.y4m something what I never heard and I am not sure it plays on OSX, Windows, Android, etc... devices well.

Revision history for this message
djcj (djcj) wrote :

To be honest, I don't understand it either. I made x264 packages of the current version with ffms and lavf support. You can find them in my VLC PPA (be aware that a slightly newer version of libav/ffmeg will be installed through the dependencies).
As for the avisynth support, it requires vapoursynth or avxsynth to be installed, which is not in the Ubuntu repos.

PS: *.y4m is a raw YUV image format. It's not intended to be saved as a video file, because it's hueg, but you can pipe the output to a command line tool like ffmpeg or x264:
wine avs2pipemod.exe -y4mp "./test.avs" | x264 --preset slower --crf 17 -o "./neu.mkv" - --demuxer y4m

Revision history for this message
Minato Miray (minatomiray) wrote :

Heyy djcj! I'm talking about the stock U14.04 x264 package, which could be installed via apt-get from the base repo, not about any PPA. I updated today the U, got the same:
----
root@********:~# x264 --help
x264 core:142 r2389 956c8d8
Syntax: x264 [options] -o outfile infile

Infile can be raw (in which case resolution is required),
  or YUV4MPEG (*.y4m),
  or Avisynth if compiled with support (yes).
  or libav* formats if compiled with lavf support (no) or ffms support (no).
Outfile type is selected by filename:
 .264 -> Raw bytestream
 .mkv -> Matroska
 .flv -> Flash Video
 .mp4 -> MP4 if compiled with GPAC or L-SMASH support (gpac)
Output bit depth: 8 (configured at compile time)

Options:

  -h, --help List basic options
      --longhelp List more options
      --fullhelp List all options

Example usage:

      Constant quality mode:
            x264 --crf 24 -o <output> <input>

----

Revision history for this message
djcj (djcj) wrote :

Yes, they have to recompile it (I hope they will do this). I made a report with the explicit issue here:
https://bugs.launchpad.net/ubuntu/+source/x264/+bug/1328744

If you want a single statically linked binary with lavf support, you could get one here: https://sourceforge.net/projects/x264linuxbuilds/files/x264/amd64/r2431-a5831aa/
Download x264_gpac-lavf.tar.xz.

Revision history for this message
Minato Miray (minatomiray) wrote :

Thanks for the workaround, seems that your binary works. Btw I don't fully understand Ubuntu bug handling policy why they simple ignore recompile this program with the right and accessible libraries.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in x264 (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.