Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • ffmpeg command line for capturing audio and video in 720p from decklink card using Windows 7

    29 octobre 2013, par Huron

    I am trying to capture audio and video from a blackmagic decklink capture card using Windows 7 @ 720p, but I cant seem to get the ffmpeg command line settings right.

    ffmpeg -list_devices true -f dshow -i dummy

    [dshow @ 02457a60] DirectShow video devices
    [dshow @ 02457a60]  "Blackmagic WDM Capture"
    [dshow @ 02457a60]  "Decklink Video Capture"
    [dshow @ 02457a60] DirectShow audio devices
    [dshow @ 02457a60]  "Decklink Audio Capture"
    

    ffmpeg -list_options true -f dshow -i video="Decklink Video Capture"

    [dshow @ 03c2ea20] DirectShow video device options
    [dshow @ 03c2ea20]  Pin "Capture"
    [dshow @ 03c2ea20]   pixel_format=uyvy422  min s=720x486 fps=29.97 max s=720x486 fps=29.97
    [dshow @ 03c2ea20]   pixel_format=uyvy422  min s=720x486 fps=23.976 max s=720x486 fps=23.976
    [dshow @ 03c2ea20]   pixel_format=uyvy422  min s=720x576 fps=25 max s=720x576 fps=25
    [dshow @ 03c2ea20]   pixel_format=uyvy422  min s=720x486 fps=59.9402 max s=720x486 fps=59.9402
    [dshow @ 03c2ea20]   pixel_format=uyvy422  min s=720x576 fps=50 max s=720x576 fps=50
    [dshow @ 03c2ea20]   pixel_format=uyvy422  min s=1920x1080 fps=23.976 max s=1920x1080 fps=23.976
    [dshow @ 03c2ea20]   pixel_format=uyvy422  min s=1920x1080 fps=24 max s=1920x1080 fps=24
    [dshow @ 03c2ea20]   pixel_format=uyvy422  min s=1920x1080 fps=25 max s=1920x1080 fps=25
    [dshow @ 03c2ea20]   pixel_format=uyvy422  min s=1920x1080 fps=29.97 max s=1920x1080 fps=29.97
    [dshow @ 03c2ea20]   pixel_format=uyvy422  min s=1920x1080 fps=30 max s=1920x1080 fps=30
    [dshow @ 03c2ea20]   pixel_format=uyvy422  min s=1280x720 fps=50 max s=1280x720fps=50
    [dshow @ 03c2ea20]   pixel_format=uyvy422  min s=1280x720 fps=59.9402 max s=1280x720 fps=59.9402
    [dshow @ 03c2ea20]   pixel_format=uyvy422  min s=1280x720 fps=60.0002 max s=1280x720 fps=60.0002
    

    ffmpeg -list_options true -f dshow -i audio="Decklink Audio Capture"

    [dshow @ 047fea20] DirectShow audio device options
    [dshow @ 047fea20]  Pin "Capture"
    [dshow @ 047fea20]   min ch=1 bits=16 rate= 48000 max ch=1 bits=16 rate= 48000
    [dshow @ 047fea20]   min ch=2 bits=16 rate= 48000 max ch=2 bits=16 rate= 48000
    [dshow @ 047fea20]   min ch=4 bits=16 rate= 48000 max ch=4 bits=16 rate= 48000
    [dshow @ 047fea20]   min ch=6 bits=16 rate= 48000 max ch=6 bits=16 rate= 48000
    [dshow @ 047fea20]   min ch=8 bits=16 rate= 48000 max ch=8 bits=16 rate= 48000
    [dshow @ 047fea20]   min ch=10 bits=16 rate= 48000 max ch=10 bits=16 rate= 48000
    [dshow @ 047fea20]   min ch=12 bits=16 rate= 48000 max ch=12 bits=16 rate= 48000
    [dshow @ 047fea20]   min ch=16 bits=16 rate= 48000 max ch=16 bits=16 rate= 48000
    

    This is the stream information for my current video/audio source, connected to the decklink card's hdmi port

    Stream #0:0: Video: rawvideo (UYVY / 0x59565955), uyvy422(tv), 1280x720, 59.94 tbr, 10000k tbn, 59.94 tbc
    Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
    

    Ultimately I will need to display this video on screen. And simultaneously be able to start and stop recording, while the preview keeps playing.

    My idea was to use ffmpeg to capture the video and audio signal and transmit this to a network stream (eg 127.0.0.1:6666). Then use VLC player to display the stream (the preview). And ultimately start and/or stop another ffmpeg to save that same stream to disk.

    In my mind this works, but I am no audio/video expert so if anyone with more experience could help out, I would appreciate it.

    Update:

    I have been able to display the video using ffplay, with the following command :

    ffplay -f dshow -video_size 1280x720 -rtbufsize 702000k -framerate 60 -i video="Decklink Video Capture":audio="Decklink Audio Capture" -threads 2
    

    Next step is streaming it so I can view the stream (preview) with VLC.

    Tried to use this command :

    ffmpeg -f dshow -video_size 1280x720 -rtbufsize 702000k -framerate 60 -i video="Decklink Video Capture":audio="Decklink Audio Capture" -threads 2 -f mpegts rtp://127.0.0.1:6666?pkt_size=188?buffer_size=65535
    

    Which does not give any errors, so appears to work. But when I try to open the stream in VLC I get the following error :

    SDP required: A description in SDP format is required to receive the RTP stream. Note that rtp:// URIs cannot work with dynamic RTP payload format (65).

    After a bit of reading it seems I should not be streaming to rtp:// but rather to udp://

    Command became :

    ffmpeg -f dshow -video_size 1280x720 -rtbufsize 702000k -framerate 60 -i video="Decklink Video Capture":audio="Decklink Audio Capture" -threads 2 -f mpegts udp://127.0.0.1:6666?pkt_size=188?buffer_size=65535
    

    And when I try to open it now in VLC I get no error, no warning, but also no video.

    Time for some more reading.

  • While ffmpeg convers via php website doesnt work

    29 octobre 2013, par Xenos Trojanowicz

    So im using

                    if ($success_msg) 
                {
                    $tmp_parts = explode('.', $file['name']);
                    $ext = array_pop($tmp_parts);
                    $ext = strtolower($ext);
                    if($ext == "avi" && $convert_avi == true)
                        {
                            $convert_source = _VIDEOS_DIR_PATH.$new_name;
                            $conv_name = substr(md5($file['name'].rand(1,888)), 2, 10).".mp4";
                            $converted_file  = _VIDEOS_DIR_PATH.$conv_name;
                            $ffmpeg_command = 'ffmpeg -i '.$convert_source.'-acodec libfaac -vcodec libx264 -s 1280x720 -ar 44100 -async 44100 -r 29.970 -ac 2 -qscale 5 '.$converted_file;
                            echo exec($ffmpeg_command);
                            $sql = "UPDATE pm_temp SET url = '".$conv_name."' WHERE url = '".$new_name."' LIMIT 1";
                            $result = @mysql_query($sql);
                            unlink($convert_source);    
                        }
                    echo $success_msg;
                }
    

    This code to convert videos from avi to mp4 but i have another big issue when i upload big file let say 170 mb it converts about 25 minutes or so and while it converts website doesnt work for me.

    NOW I KNOW WHY WEBSITE DOESNT WORK:

    • its only for me becose system doesnt open extra slot to enter to website while it converts
    • i know how to solve this problem with cronjob but im afraid that if something goes wrong it will be biggest fail i ever had

    so im hopping that u guys will suggest something smart and easy to deal with this issue

  • Using FFmpeg in Unity WebPlayer

    29 octobre 2013, par Duke

    Has anyone use FFmpeg successfully in Unity WebPlayer? I need to play MP3 in WebPlayer.

    BTW, Can javascript in browser save the binary file to local position?

    Thanks!

  • Install fail ffmpeg debian squeeze

    29 octobre 2013, par Xenos Trojanowicz

    when i try to install ffmpeg for debian squeeze i get error:

         apt-get install ffmpeg php5-ffmpeg -y
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:
    
    The following packages have unmet dependencies:
     ffmpeg : Depends: libavcodec54 (>= 8:1.0.0) but it is not going to be installed
              Depends: libavdevice54 (>= 8:1.0.0) but it is not going to be installed
              Depends: libavfilter3 (>= 8:1.0.0) but it is not going to be installed
              Depends: libavformat54 (>= 8:1.0.0) but it is not going to be installed
              Depends: libavutil51 (>= 8:1.0.0) but it is not going to be installed
              Depends: libpostproc52 (>= 8:1.0.0) but it is not going to be installed
              Depends: libswresample0 (>= 8:1.0.0) but it is not going to be installed
              Depends: libswscale2 (>= 8:1.0.0) but it is not going to be installed
     php5-ffmpeg : Depends: libavcodec52 (>= 4:0.5.1-1) but it is not going to be installed or
                            libavcodec-extra-52 (>= 4:0.5.1-1) but it is not installable
                   Depends: libavformat52 (>= 4:0.5.1-1) but it is not going to be installed or
                            libavformat-extra-52 (>= 4:0.5.1-1) but it is not installable
    E: Broken packages
    root@1tb:~#
    

    now i tried many funtions but problem persist i had older version ffmpeg and it ssems that didint uninstalled fully

  • How can I superimpose an semi-transparent image on top of a video using ffmpeg ?

    28 octobre 2013, par pixelearth

    I'm making a lot of "title" clips for some video I have. I have a simple 5 second movie over which I'd like to center an image that will contain the title text (in image format).

    This seems simple enough, but I don't know where to start...