Skip to content

ffmpeg: you are trying to apply an input option to an output file or vice versa. Move this option before the file it belongs to. #294

Closed

Description

@sofeikov

I'm trying to get imageio reading only I-frames with ffmpeg plugin. Therefore, I'm using the following line in python:

video_reader = imageio.get_reader(video_path, 'ffmpeg', ffmpeg_params=['-vf', 'select eq(pict_type\,PICT_TYPE_I)'])

During the initialisation I get the following message from ffmpeg:

ffmpeg version 3.3.3 Copyright (c) 2000-2017 the FFmpeg developers built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3) configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --mandir=/usr/share/man --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb --enable-libpulse --enable-libfreetype --enable-gnutls --disable-ffserver --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-libtheora --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr --enable-libxvid --enable-libvidstab --enable-libwavpack --enable-nvenc --enable-libzimg libavutil 55. 58.100 / 55. 58.100 libavcodec 57. 89.100 / 57. 89.100 libavformat 57. 71.100 / 57. 71.100 libavdevice 57. 6.100 / 57. 6.100 libavfilter 6. 82.100 / 6. 82.100 libavresample 3. 5. 0 / 3. 5. 0 libswscale 4. 6.100 / 4. 6.100 libswresample 2. 7.100 / 2. 7.100 libpostproc 54. 5.100 / 54. 5.100 Option vf (set video filters) cannot be applied to input url /home/konsof01/Work/FaceBackend/TestData/TestMedia/me.mp4 -- you are trying to apply an input option to an output file or vice versa. Move this option before the file it belongs to. Error parsing options for input file /home/konsof01/Work/FaceBackend/TestData/TestMedia/me.mp4. Error opening input files: Invalid argument

The end of this message clearly says that the given option is being put into a wrong place. Is this by-design or am I doing something wrong?

Is it a good idea to have a way to tell that some options are for output files, not for input?

Thanks,
Konstantin

Activity

  1. sofeikov commented on Nov 22, 2017

    @sofeikov
    Author

    I strongly suspect that the problem is here

    https://github.com/imageio/imageio/blob/master/imageio/plugins/ffmpeg.py#L423

    All additional arguments given are being put in front of filename given.

  2. almarklein commented on Mar 12, 2018

    @almarklein
    Member

    In #321 I added that one can specify input_params and output_params. The old ffmpeg_params still works (maps to input_params when reading and output_params when writing).

  3. added a commit that references this issue on Mar 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions