Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • bach scripts run by crontab as root

    5 mai 2017, par Mettavihari

    I run a crontab script to check if ffmpeg is running. I want the scripts to inform me if ffmpeg is not running. When I run the scripts as root on the command line all is OK But when they run called from crontab they never show the error. They always show that ffmpeg is running inspite of the fact that sometimes ffmpeg has crashed.

    I have given my crontab file and the scripts below.

    SHELL=/bin/sh
    57 4 * * * pkill -f /usr/bin/python2.7
    57 4 * * * pkill -f /bin/ffmpeg
    2 5 * * * /opt/dls/cron.sh (restarting the process above.)
    */5 * * * * /root/test-ffmpeg.sh  testing if ffmpeg is running
    */5 * * * * /root/test.sh         testing if ffmpeg is running
    */5 * * * * /root/test2.sh        testing if ffmpeg is running
    

    scripts: test.sh

    #!/bin/bash
    #check if ffmpeg is running
    if pgrep ffmpeg >/dev/null 2>&1
    if ps cax | rev | cut -f1 -d' ' | rev |grep ffmpeg >/dev/null 2>&1
    then
    echo "My Process is running."
    else
    echo "Hello" | mutt -s "fffmpeg is not working" abc@gmail.com
    fi
    

    script test-ffmpeg.sh

    #!/bin/bash
    #check if ffmpeg is running
    if pgrep ffmpeg >/dev/null 2>&1
    then
    echo "Process is running."
    else
    echo "Hello" | mutt -s "ffmpeg is not working" abc@gmail.com
    fi
    

    script: test2.sh

    line=$(ps aux | grep ffmpeg)
    if [ -z "$line" ]
    then
    echo "Hello" | mutt -s "fffmpeg is not working" abc@gmail.com    
    else
    echo $line > /dev/null
    echo "Running"
    fi
    
  • ffmpeg video overlay fade in with .png [duplicate]

    4 mai 2017, par Ted Duncan

    This question already has an answer here:

    I'm trying to add a .png watermark to a video and have it fade in after 30 seconds Im using the following command it does not seem to load at all (without stating fade, the watermark appears throughout the whole video)

    ffmpeg -i /home/test/movie.mp4 -b:a 64k -ac 2 -ar 44100 -c:v libx264 -preset slow  -pix_fmt yuv420p -tune fastdecode -profile:v baseline -level 3.0 -b:v 1536k -maxrate 1728k -bufsize 4608k -vf "movie=watermark-360.png, fade=in:0:30 [watermark]; [in]scale=640:trunc(ow/a/2)*2 [scale]; [scale][watermark]  overlay=main_w-overlay_w-0:main_h-overlay_h-0[out]" -flags -global_header -bsf:v h264_mp4toannexb -bsf:a aac_adtstoasc test-small.mp4
    

    not using a complex filter but -vf

    ffmpeg version 3.0.2-static

  • how to extract h264 raw video from mov using ffmpeg ?

    4 mai 2017, par Chris Tsui

    I can use MP4Box to extract the h264 track from a mov file:

    $MP4Box -raw 1 test.mov
    $file test_track1.h264
    test_track1.h264: JVT NAL sequence, H.264 video, main @ L 30
    

    How can i do it by ffmpeg?

    I've try with these options but none acts like MP4Box.

    $ffmpeg -i test.mov -vcodec copy -an -f rawvideo 1.h264
    $file 1.h264 
    1.h264: data
    
    $ffmpeg -i test.mov -vbsf h264_mp4toannexb -vcodec copy -an -f rawvideo 2.h264
    $file 2.h264
    2.h264: data
    
  • How to choose gpu among multiple nvidia gpu in ffmpeg 3.2.0 ?

    4 mai 2017, par jsBaek

    i'm currently using two nvidia p4 graphic cards.

    In previous version of ffmpeg(before 3.2.0), i could choose specific gpu card by using options "-gpu 0 or 1 etc".

    In current version, however, there's no option for selecting gpu card.

    Actually there's "gpu" option specified in nvenc_h264.c or nvenc_hevc.c.

    But in nvenc.c file, there's no code that uses "gpu" option.

    Is there any way that i can choose specific card?

    How load balancing between two cards is done?

    Is it done in driver level?

    Thank you.

  • Has anyone used Azure vm's for gpu-accelerated video enc/decoding with FFmpeg/libav ?

    4 mai 2017, par user3776020

    I am trying to use NVIDIA hardware acceleration with FFmpeg/libav on a Microsoft Azure GPU vm (any of the new N-series). I am able to get it working with a comparable AWS vm, but am not having luck with Azure.

    I have a different question posted here detailing the specific problem I'm running into (Trouble with hardware-assisted encoding/decoding via FFmpeg on Azure GPU vm's (ubuntu 16.04)), but have since realized that the better question to ask is if anyone has been able to achieve it, full-stop.

    If so, would you please share the details of your environment (type of vm, os version, installation commands, etc). Thanks!