Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • FFMPEG drawtext with emoji

    18 mai 2018, par Roar

    Want to display a text with emojis I

  • ffmpeg save remote file to user's computer

    18 mai 2018, par hmaxx

    I can cut and save a video from a remote server to my server using the below command:

    ffmpeg -ss 00:00:30 -i "example.com/test.mp4" -t 00:00:09 -acodec copy -vcodec copy -async 1 -y out.mp4
    

    I was wondering if I could prompt the user for a permission to save it on his computer instead of downloading it to my server. I will be using php with the exec function.

  • Weird video artifacts when streaming from ffmpeg to gstreamer

    18 mai 2018, par Toast

    I'm seeing weird video artifacts when trying to stream from ffmpeg to gstreamer 0.10.

    Sending command:

    ffmpeg -re -i test.mp4 -an -pix_fmt yuv420p -crf 0 -b 1000k -f mpegts udp://10.33.1.2:9968
    

    Receiving command:

    gst-launch-0.10 udpsrc port=0068 caps='video/mpeg,width=480,height=360' ! ffdec_mpeg4 ! ffmpegcolorspace ! xvimagesink
    

    This is what the video looks like: enter image description here

    enter image description here

    How can I change the ffmpeg command to avoid these artifacts?

  • store ffmpeg command output to aws s3

    18 mai 2018, par Jinal Somaiya

    I run below command that is working perfectly in local file sysytem.

    Command:

    exec('ffmpeg -i '.config('medialibrary.s3.domain').'/listing_video/intro.mp4'.' -vf "drawtext=fontfile=' . storage_path('assets/video/FutuMd.ttf') . ': text=' . $request->get('intro_text') . ': x=300: y=450: fontsize=65: fontcolor=white: enable=\'between(t,2,5)\'" introfinal.mp4');
    

    but i have to store file direct to s3 so i changed my command that is store file to s3 but filesize is 0B.

    exec('ffmpeg -i '.config('medialibrary.s3.domain').'/listing_video/intro.mp4'.' -vf "drawtext=fontfile=' . storage_path('assets/video/FutuMd.ttf') . ': text=' . $request->get('intro_text') . ': x=300: y=450: fontsize=65: fontcolor=white: enable=\'between(t,2,5)\'" '.Storage::put('introfinal.mp4', '').'');
    

    Thanks in advance!

  • fluent-ffmpeg : Unable to remove video screenshot after creation

    18 mai 2018, par mirg

    I've the following code that creates a screenshot for the video I've uploaded;

    var thumbFileName = 'tmp_file.jpg';
    
    ffmpegCommand = ffmpeg(videoFile)
      .on('end', function() {
        callback(null, tempUploadDir + thumbFileName)
      })
      .on('error', function(err) {
        callback(err);
      })
      .screenshots({
        timestamps: ['50%'],
        filename: thumbFileName,
        folder: tempUploadDir
      });
    

    the code works pretty well and the screenshot is created. The callback read the file stream and store it into the database and eventually try to delete the thumbFileName from the filesystem.

    And here is the issue I'm encountering, basically I'm not able to delete the file, even if I try it manually its say that the file is locked by another process (NodeJS) and I can't download it until I stop the application.

    In the callback I've also tried to kill the command with ffmpegCommand.kill() before to delete the screenshot but I'm still having the same issue. The file will be removed using fs.unlink and its working when the thumbnail is generated for an image (even post-processed with effects, achieved with sharp) but not with ffmpeg. Apparently ffmpeg is still running and that's why I can't delete the thumb.