Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • avcodec_decode_video2 returns positive number when got_picture_ptr is 0

    22 août 2017, par dafnahaktana

    According to the documentation: here, avcodec_decode_video2 should return 0 if no frame could be decompressed. The got_picture_ptr should also be set to zero if no frame could be decompressed.

    I ran this function on a h264 video and I got positive return value while the got_picture_ptr was set to 0. Maybe that the documentation is not updated ?

  • Set minimal ts duration in ffmpeg command

    22 août 2017, par Ales

    We are using ffmpeg to convert mp4 video file to hls. When video is converted, it sometimes happens that last ts chunk is about 0.03s. And player stalls on this chunk for a while. Is there a special command in ffmpeg to set minimal ts duration? Or other way to avoid such ts chunks? In our command to set up ts duration we use: -segment_time 5

  • Unable to find a suitable output format for 'pipe :' pipe: : Invalid argument

    22 août 2017, par Mahi

    When I run this command:

    raspivid -n -vf -hf -t 0 -w 960 -h 540 -fps 25 -b 500000 -o - |
    ffmpeg -i - -vcodec copy -an -metadata title="Streaming from raspberry pi camera" \
    -f flv $RTMP_URL/$STREAM_KEY
    

    it returns:

    [NULL @ 0x3414410] Unable to find a suitable output format for 'pipe:'
    pipe:: Invalid argument
    

    How should I tweak my command line?

  • FFMPEG - Can you overlay part of a video with a couple of images ?

    22 août 2017, par Adam

    I need to add an overlay a video and I was wondering if there is an easy way to do this with FFMPEG.

    I have a set of images (a banner and a portrait) which I would like to overlay at the bottom of my video for part of the duration of the video. For example, after about 5 seconds I would like the overlay to appear, and then about 5 seconds before the end of the video I would like to have the overlay go away.

    Is this possible using FFMPEG command line options?

  • Drawtext freezes

    22 août 2017, par Samhita vempatti

    I am trying to add text to a 1 hour long video but to a specified time only . I used this command from within python and used subprocess to run it.

       cmd="ffmpeg -y -i "+input_file+" -vf drawtext=enable=\'between(t,"+str(start)+","+str(end)+")\':fontfile=C\:\\\\\\\\ffmpeg\\\\\\\\arial.ttf\:text="+starttime+"\:x="+endtime+"\:y="+str(i[3][1])+" "+output.mp4
        print(cmd)
        p = subprocess.Popen(cmd.split(), shell=True,
                     stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
        output = p.communicate()[0]
    

    When I try running this the whole process freezes in the shell that is it prints the cmd and nothing happens

    ffmpeg -y -i C:\\moviepy-master\\moviepy-master\\lecture7.mp4 -vf drawtext=enable='between(t,300,1000)':fontfile=C\:\\\\ffmpeg\\\\arial.ttf\:text=helloworld\:x=200\:y=600 C:\\moviepy-master\\moviepy-master\\lecture7text.mp4, 
    

    The whole process takes a very long time and the final video does not have the text at all .