Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • Automator shell script (using ffmpeg) won't run on other machine

    24 mai 2014, par kava

    I have an Automator patch that runs a shell script that calls ffmpeg on a 10.9.3 mac.

    I just try to call it via

    ffmpeg
    

    for test reasons without any arguments.

    but it returns

    ffmpeg: command not found. 
    

    But I can open ffmpeg regularly from terminal AND I can run the script on my other machine (10.9.2)

    What's wrong?

    EDIT: I also tried to add:

    /opt/local/bin
    

    in the shell script to the path variable, but it still won't run. also

    /opt/local/bin/ffmpeg -arguments....
    

    won't run

  • Keep quality after drawtext in ffmpeg

    24 mai 2014, par NickName

    I am trying to use ffmpeg to put a subtitle in an avi video. I use this command to do it:

    -i input.avi -vf drawtext="fontsize=80:fontfile=C\\:/Windows/Fonts/arial.ttf:text=TEST_TEXT:y=h-line_h:x=(h+400)-(t*110)" output.avi
    

    The output of ffmpeg console is :

    >ffmpeg -i testwithout.avi -vf drawtext="fontsize=
    80:fontfile=C\\:/Windows/Fonts/arial.ttf:text=HELLO:y=h-line_h:x=(h+400)-(t*110)
    " -an withsubtitle.avi
    ffmpeg version N-62121-g634636e Copyright (c) 2000-2014 the FFmpeg developers
      built on Apr  3 2014 23:30:16 with gcc 4.8.2 (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-libmodplug --enable-libmp3lame --ena
    ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-l
    ibopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libsp
    eex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aa
    cenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavp
    ack --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable
    -zlib
      libavutil      52. 73.100 / 52. 73.100
      libavcodec     55. 56.107 / 55. 56.107
      libavformat    55. 36.101 / 55. 36.101
      libavdevice    55. 11.100 / 55. 11.100
      libavfilter     4.  3.100 /  4.  3.100
      libswscale      2.  6.100 /  2.  6.100
      libswresample   0. 18.100 /  0. 18.100
      libpostproc    52.  3.100 / 52.  3.100
    [avi @ 041307e0] non-interleaved AVI
    Guessed Channel Layout for  Input Stream #0.1 : stereo
    Input #0, avi, from 'C:\\Users\\╬Χ╧Β╬│╬▒╧Δ╬ψ╬╡╧Γ\\Desktop\\testwithout.avi':
      Duration: 00:00:07.67, start: 0.000000, bitrate: 147822 kb/s
        Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 640x480, 146812 k
    b/s, 30 tbr, 30 tbn, 30 tbc
        Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16
    , 1411 kb/s
    File 'withsubtitle.avi' already exists. Overwrite ? [y/N] y
    Output #0, avi, to 'withsubtitle.avi':
      Metadata:
        ISFT            : Lavf55.36.101
        Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 640x480, q=2-31, 200
     kb/s, 30 tbn, 30 tbc
    Stream mapping:
      Stream #0:0 -> #0:0 (rawvideo -> mpeg4)
    Press [q] to stop, [?] for help
    frame=  112 fps=0.0 q=20.0 size=     331kB time=00:00:03.93 bitrate= 689.8kbits/
    frame=  222 fps=220 q=31.0 size=     479kB time=00:00:07.60 bitrate= 516.8kbits/
    frame=  228 fps=210 q=28.7 Lsize=     485kB time=00:00:07.80 bitrate= 509.4kbits
    /s
    video:474kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing o
    verhead: 2.350742%
    

    But my input video is 135 MB and the output is only 613 KB. How i could keep the same quality of video?

  • How to copy the AVPicture that are received from av_read_frame. What is the right approach ?

    23 mai 2014, par Whoami

    I have been trying to write a rtsp player in android. I am new to it. and wanted to know how to store the packet retrieved from av_read_frame for further usage. [eg. different thread to decode it ].

    while (1)
    {
    
    av_read_frame(pFormatCtx, &packet) >= 0) {
    
    if (packet.stream_index == videoStream) {
               sendPacketToLInkedList ( packet);
       }  
    
    
    
    sendPacketToLinkedList (AVPacket *pkt)
    {
    
      AVPacket *refPacket;
      refPacket = pkt;    //  How log will it be valid ??
    }
    

    I just wanted to know how long the packet retrieved from av_read_frame is valid?..

  • FFmpeg : Add watermark without changing the quality [on hold]

    23 mai 2014, par user3624875

    I'm using ffmpeg on Ubuntu to add a watermark.png in a video. but, after adding, video quality goes down. Here is my code that is adding watermark.

    ffmpeg -y -i input.mp4 -i watermark.png -filter_complex 'overlay=W-w-1:0' output.mp4 2>&1
    

    What I want, keep the quality of input.mp4 as it is, in output.mp4 Quality may include Video/Audio Codec, Bitrate etc etc.

  • Add animated/simple image to video and export it in Android

    23 mai 2014, par Dibakar

    Can we add animated/simple image as a top layer to video and export it as a single video in Android?

    I was told that this can be done by the help of FFmpeg or JaveCV, but I wasn't provided with an example for accomplishing my needs.