Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • ffmpeg - scrolling text with specified boundaries and cut video when text ends

    19 février 2017, par Elma Paul

    Having this working ffmpeg filter with overlayed scrolling text

    f -i text_bg.mp4 -vf "drawtext=enable:fontsize=200:fontcolor=White:fontfile='ARIALN.TTF':text='asdfhlajsdh LKFJAHSDFH':x=-(mod(8*n\,w+tw)-tw):y=h/2-th/2" outtt.mp4 -y
    


    I have two questions:
    1.) How can I set specified boundaries for drawtext? Just fix positions where the text will dissapear. Like here in picture
    scrolling text with specified boundaries example
    2.) How is it possible to cut the video(specify time) according to the text length.Meaning that the video will finish after ends the text line +plus one second?

  • Difference between ffmpeg and opencv [on hold]

    19 février 2017, par mehdi karimi

    I tried to use ffmpeg on Android but I've encountered some problems.
    A friend told me I can use OpenCV or JavaCV instead of ffmpeg with ffmpeg commands.
    Can anybody advice me on how can I use OpenCV or JavaCV on Android?

  • How to implement audio scrubbing using FFmpeg and PortAudio [on hold]

    19 février 2017, par megoo

    currently am implementing a slider that supports mouse scrubbing, during scrubbing the audio is played. I chose FFMpeg to read the audio, so the audio is read and loaded in to buffer in one go already. I use QAudioOutput to play the audio, but have no idea how to implement the scrubbing audio playing. The slider is corresponding to the video frames, so each time user change current frame by scrubbing on the slider, it just plays the single video frame of audio. I try these methods in my mind:

    1. QAudioOutput ::start(Buffer) and then QAudioOutput::seek(startingByteIndexForCurrentScrubbingFrame), than use a timer that stop playing audio in 1/24 second. Each time current frame changed, stop previous play, start current play. The result is bad, low performance, and really unsync to the mouse scrubbing.
    2. Maintain an extra buffer, which only copys 1/24 second of audio data, and play it.Each time current frame changed, stop previous play, start current play. The result is the same.

    I throught the methods below might be wrong? How can I implement with QAudioOutput for audio scrubbing? Thanks so much.

  • How to determine webm duration using ffprobe

    19 février 2017, par Lopakhin

    My goal is simple , I have several webm files need to be concated, but first I need to determine their durations.

    It seems webm file are played as streams, so there is no way to tell the length of each file.

    I have been using ffprobe to do the job ,but the duration returned is N/A.The command I use was:

    ffprobe -i input.file -show_format | grep duration
    

    thanks.

    The complete output of ffprobe list below:

     ffprobe version 2.6.2 Copyright (c) 2007-2015 the FFmpeg developers
      built with Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn)
      configuration: --prefix=/usr/local/Cellar/ffmpeg/2.6.2 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-libtheora --enable-libvorbis --enable-libvpx --enable-vda
      libavutil      54. 20.100 / 54. 20.100
      libavcodec     56. 26.100 / 56. 26.100
      libavformat    56. 25.101 / 56. 25.101
      libavdevice    56.  4.100 / 56.  4.100
      libavfilter     5. 11.102 /  5. 11.102
      libavresample   2.  1.  0 /  2.  1.  0
      libswscale      3.  1.101 /  3.  1.101
      libswresample   1.  1.100 /  1.  1.100
      libpostproc    53.  3.100 / 53.  3.100
    Input #0, matroska,webm, from '231':
      Metadata:
        encoder         : GStreamer matroskamux version 1.5.91
        creation_time   : 2015-12-05 07:59:29
      Duration: N/A, start: 0.000000, bitrate: N/A
        Stream #0:0(eng): Video: vp8, yuv420p, 640x480, SAR 1:1 DAR 4:3, 14.99 fps, 14.99 tbr, 1k tbn, 1k tbc (default)
        Metadata:
          title           : Video
        Stream #0:1(eng): Audio: vorbis, 48000 Hz, stereo, fltp (default)
        Metadata:
          title           : Audio
    duration=N/A
    
  • How to make RedirectStandardOutput sends output while the process is running (realtime)

    19 février 2017, par Wayne

    I have this simple GUI for ffmpeg video convertion I made using VS2015 (visual basic)

    So far everything works except for the status text box where I want the current status to show while the conversion process is at work.

    Here is the code where I tried to capture the status

    'LET'S GET READY TO CONVERT
    ConvertProcessInfo.FileName = theApp
    ConvertProcessInfo.Arguments = theOptions
    
    'LET'S TRY TO CAPTURE STATUS
    ConvertProcessInfo.RedirectStandardError = True
    ConvertProcessInfo.RedirectStandardOutput = True
    ConvertProcessInfo.UseShellExecute = False
    ConvertProcessInfo.CreateNoWindow = True
    
    procFFMPEG.StartInfo = ConvertProcessInfo
    
    'LET'S CONVERT
    procFFMPEG.Start()
    
    Dim theStat As StreamReader = procFFMPEG.StandardError
    Dim theStatOut As String = theStat.ReadToEnd()
    txtProcessInfo.Text = theStatOut
    
    'LET'S WAIT FOR PROCESS TO EXIT
    procFFMPEG.WaitForExit()
    

    The problem, my status textbox only gets the status after the conversion is done, not during conversion. Only last/final status is returned.