[FFmpeg-trac] #4865(undetermined:new): Using .mp4-files/libh264 with API Examples

FFmpeg trac at avcodec.org
Sat Sep 19 11:58:36 CEST 2015


#4865: Using .mp4-files/libh264 with API Examples
-------------------------------------+-------------------------------------
             Reporter:  jepsen       |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:  git-
  undetermined                       |  master
             Keywords:  API MP4      |               Blocked By:
  transcoding H264 preset            |  Reproduced by developer:  0
             Blocking:               |
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 I just downloaded the source and compiled it on my Ubuntu machine. I
 wanted to a look at the API part of FFmpeg. When I run the example
 transcoding.c on a .mp4-file, encoded with h264, it gives the following
 error:
 [libx264 @ 0xa2c5840] broken ffmpeg default settings detected
 [libx264 @ 0xa2c5840] use an encoding preset (e.g. -vpre medium)
 [libx264 @ 0xa2c5840] preset usage: -vpre <speed> -vpre <profile>
 [libx264 @ 0xa2c5840] speed presets are listed in x264 --help
 [libx264 @ 0xa2c5840] profile is optional; x264 defaults to high
 Cannot open video encoder for stream #0
 Error occurred: Generic error in an external library

 I figured that the preset options for h264 were not set, so I looked at
 the decoding_encoding.c example which sets the preset like so:
     if (codec_id == AV_CODEC_ID_H264) {
        av_opt_set(c->priv_data, "preset", "slow", 0);
     }

 I copied that code to transcoding.c, but it had no effect. Surprisingly,
 when you remove these three lines from the decoding_encoding.c example, it
 has no effect either, because you can still use the example on .mp4-files,
 without getting the same error above, which is what I would expect.

 I can reproduce this problem on Ubuntu and Windows 7, with the newest
 FFmpeg version and version 2.7.2. And I only get this problem when using
 the API functions. The console application ffmpeg works as it should.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/4865>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list