Newest 'ffmpeg' Questions - Stack Overflow

http://stackoverflow.com/questions/tagged/ffmpeg

Les articles publiés sur le site

  • ffmpeg on Heroku : unrecognized option 'preset'

    17 novembre 2013, par scientiffic

    I'm using ffmpeg version 1.2.4 in my local Rails app to convert video files. Everything works as expected when I run the app locally. When I deployed to heroku, I added a buildpack for ffmpeg:

    https://github.com/shunjikonishi/heroku-buildpack-ffmpeg

    This installs ffmpeg version git-2013-06-02-5711e4f. When I try to transcode a video to mp4, I get the following error:

    Unrecognized option 'preset'. Error splitting the argument list: Option not found

    Here is the complete log:

    2013-11-17T19:45:05.255059+00:00 app[web.1]: Running transcoding...
    2013-11-17T19:45:05.255059+00:00 app[web.1]: ffmpeg -y -i /app/public/uploads/tmp/1384717504-2-9158/Untitled.mov -vcodec libx264 -acodec libfaac -s 640x360  -qscale 0 -preset slow -g 30 -aspect 1.7777777777777777 /app/public/uploads/tmp/1384717504-2-9158/tmpfile.mp4
    2013-11-17T19:45:05.255059+00:00 app[web.1]: 
    2013-11-17T19:45:05.317895+00:00 app[web.1]: Failed encoding...
    2013-11-17T19:45:05.317895+00:00 app[web.1]: ffmpeg -y -i /app/public/uploads/tmp/1384717504-2-9158/Untitled.mov -vcodec libx264 -acodec libfaac -s 640x360  -qscale 0 -preset slow -g 30 -aspect 1.7777777777777777 /app/public/uploads/tmp/1384717504-2-9158/tmpfile.mp4
    2013-11-17T19:45:05.317895+00:00 app[web.1]: 
    2013-11-17T19:45:05.317895+00:00 app[web.1]: ffmpeg version git-2013-06-02-5711e4f Copyright (c) 2000-2013 the FFmpeg developers
    2013-11-17T19:45:05.317895+00:00 app[web.1]:   built on Jun  2 2013 07:38:40 with gcc 4.4.3 (Ubuntu 4.4.3-4ubuntu5.1)
    2013-11-17T19:45:05.317895+00:00 app[web.1]:   configuration: --enable-shared --disable-asm --prefix=/app/vendor/ffmpeg
    2013-11-17T19:45:05.317895+00:00 app[web.1]:   libavutil      52. 34.100 / 52. 34.100
    2013-11-17T19:45:05.317895+00:00 app[web.1]:   libavcodec     55. 13.100 / 55. 13.100
    2013-11-17T19:45:05.317895+00:00 app[web.1]:   libavformat    55.  8.102 / 55.  8.102
    2013-11-17T19:45:05.317895+00:00 app[web.1]:   libavdevice    55.  2.100 / 55.  2.100
    2013-11-17T19:45:05.318137+00:00 app[web.1]:   libavfilter     3. 74.101 /  3. 74.101
    2013-11-17T19:45:05.318137+00:00 app[web.1]:   libswscale      2.  3.100 /  2.  3.100
    2013-11-17T19:45:05.318137+00:00 app[web.1]:   libswresample   0. 17.102 /  0. 17.102
    2013-11-17T19:45:05.318137+00:00 app[web.1]: Unrecognized option 'preset'.
    2013-11-17T19:45:05.318137+00:00 app[web.1]: Error splitting the argument list: Option not found
    2013-11-17T19:45:05.318137+00:00 app[web.1]: 
    2013-11-17T19:45:05.318137+00:00 app[web.1]: Errors: no output file created. 
    

    I think that the error may be a result of differences in the version of ffmpeg that I'm using locally and on Heroku. Does anyone have suggestions for how to resolve this issue?

  • libvpx doesn't create .pc files

    17 novembre 2013, par olgash

    I'm trying to compile ffmpeg with libvpx. Libvpx compiles nicely, with no errors other than it couldn't create debug for win32 because I don't have visual studio 8 (which I think is fine?), but it doesn't create any .pc file in MinGW's lib folder (which all of the other libraries I've installed do).

    When I run ./configure --disable-encoder=vorbis --enable-libvorbis --enable-libvpx --prefix=/MinGW on ffmpeg, it always says my version of libvpx is too old even though I'm using 1.2.0. I'm not sure what to do here, help?

  • ffmpeg screen blending mode with transparency

    17 novembre 2013, par gilad s

    I have a sequence of PNG files with transparency and a video- video1.mp4

    1. I'd like to convert the PNG files into a video with an alpha channel- video2.mp4

    2. I'd like to merge video2.mp4 with video1.mp4 while the transparent parts in video2 are

    not seen and the other parts are blended using screen blending mode with video1

    when I do:

    ffmpeg -i "%03d.png" -vf scale=640:480 -vcodec libx264 video2.mp4
    

    a video is created with a black color where the transperent parts are supposed to be (I'm not sure if it's really transparent - I tryied other encoders - all gave the same result).

    afterwards when I do:

    ffmpeg -i video1.mp4 -i video2.mp4 -filter_complex "blend=all_mode='screen'" output.mp4
    

    the videos are indeed merged but the video has a pink overlay ?!

  • Adding and reading timestamp to an image using ffmpeg

    17 novembre 2013, par Andrew Simpson

    I am not sure if i should be posting this type of question here and I have not uploaded any code as I am talking about concepts.

    I have a C# winform desktop application.

    It produces a flow of jpegs that have derived from a motion detection algorithm.

    I use the Graphics.DrawText to add a time stamp directly onto the image when it was created.

    I then use ffmpeg to produce a ogg video file.

    When i play the video file back I obviously see the image with the time stamp.

    What I would like to be able to do is read in code the time stamp that is on every image. I had thought of using some sort of OCR to do this but it seems overkill to me. I also have considered creating a separate text file that acts as the 'index' of the video file. But then I have to manage the 'transaction' between 2 different files.

    Corruption to the text file could happen.

    I would like a way of encapsulating this information to be easily read by my C# code.

    Has anyone had any experience doing this? Any recommendations pls?

    Many Thanks

  • Encoder (codec none) not found for output stream #0:1 [on hold]

    16 novembre 2013, par Gururak

    Hi i built ffmpeg executable on Redhat5. I want to mix two Audio using the command multiple "ffmpeg -i INPUT1 -i INPUT2 -i INPUT3 -filter_complex amix=inputs=3:duration=first:dropout_transition=3 OUTPUT.mp3".

    I enabled libflamemp3 library without any error.

    [root@localhost ~]# ffmpeg -i /root/media/Katlalli.mp3 -i /root/media/Katlalli.mp3 -filter_complex amix=inputs=2:duration=first:dropout_transition=2 /root/media/OUTPutnew123.mp3
    ffmpeg version 2.1 Copyright (c) 2000-2013 the FFmpeg developers
      built on Nov 14 2013 03:17:10 with gcc 4.1.2 (GCC) 20080704 (Red Hat 4.1.2-46)
      configuration: --enable-libmp3lame
      libavutil      52. 48.100 / 52. 48.100
      libavcodec     55. 39.100 / 55. 39.100
      libavformat    55. 19.104 / 55. 19.104
      libavdevice    55.  5.100 / 55.  5.100
      libavfilter     3. 90.100 /  3. 90.100
      libswscale      2.  5.101 /  2.  5.101
      libswresample   0. 17.104 /  0. 17.104
    [mp3 @ 0x193ef240] Estimating duration from bitrate, this may be inaccurate
    Input #0, mp3, from '/root/media/Katlalli.mp3':
      Metadata:
        artist          : Yograj Bhat
        title           : Katlalli Karadige
        track           : 3
        album           : Paramathma
        album_artist    : Puneet Rajkumar
        genre           : Kannada
        composer        : V.Harikrishna
        date            : 2011
      Duration: 00:04:41.46, start: 0.000000, bitrate: 191 kb/s
        Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 192 kb/s
        Stream #0:1: Video: mjpeg, yuvj420p(pc), 200x200 [SAR 96:96 DAR 1:1], 90k tbr, 90k tbn, 90k tbc
        Metadata:
          title           : thumbnail
          comment         : Cover (front)
    [mp3 @ 0x194090a0] Estimating duration from bitrate, this may be inaccurate
    Input #1, mp3, from '/root/media/Katlalli.mp3':
      Metadata:
        artist          : Yograj Bhat
        title           : Katlalli Karadige
        track           : 3
        album           : Paramathma
        album_artist    : Puneet Rajkumar
        genre           : Kannada
        composer        : V.Harikrishna
        date            : 2011
      Duration: 00:04:41.46, start: 0.000000, bitrate: 191 kb/s
        Stream #1:0: Audio: mp3, 44100 Hz, stereo, s16p, 192 kb/s
        Stream #1:1: Video: mjpeg, yuvj420p(pc), 200x200 [SAR 96:96 DAR 1:1], 90k tbr, 90k tbn, 90k tbc
        Metadata:
          title           : thumbnail
          comment         : Cover (front)
    File '/root/media/OUTPutnew123.mp3' already exists. Overwrite ? [y/N] y
    Output #0, mp3, to '/root/media/OUTPutnew123.mp3':
      Metadata:
        artist          : Yograj Bhat
        title           : Katlalli Karadige
        track           : 3
        album           : Paramathma
        album_artist    : Puneet Rajkumar
        genre           : Kannada
        composer        : V.Harikrishna
        date            : 2011
        Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp (default)
        Stream #0:1: Video: none, q=2-31, 128 kb/s, 90k tbn
        Metadata:
          title           : thumbnail
          comment         : Cover (front)
    Stream mapping:
      Stream #0:0 (mp3) -> amix:input0
      Stream #1:0 (mp3) -> amix:input1
      amix -> Stream #0:0 (libmp3lame)
      Stream #0:1 -> #0:1 (mjpeg -> ?)
    Encoder (codec none) not found for output stream #0:1
    

    But when i try to combine two mp3 audio, "ffmpeg -i INPUT1 -i INPUT2 -i INPUT3 -filter_complex amix=inputs=3:duration=first:dropout_transition=3 OUTPUT.mp3".

    I am getting error like

    "Encoder (codec none) not found for output stream #0:1"

    so please help me how to link or install "libmp3flame" on Redhat5.