Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • video web server vb.net

    3 octobre 2014, par user2871030

    I am making an application that creates a web server with playback video, the application searches a particular folder, the fact is that achieving send videos in mp4 format, the problem I have is when the video is in another format, such as mkv I have tried to convert it to mp4 first and then read it, but that takes a lot, what I would like to do is start sending the file while it becomes, but in mp4 format this does not work, I'm using ffmpeg to convert, to convert format webm, the player reads them, but the problem is that the conversion is very slow.

  • How to Batch or Bulk Combine jpg + mp3 files to get Video files using ffmpeg or .bat commands ? [on hold]

    3 octobre 2014, par John Maker

    I want to combine batch jpg with audio files? example: I have a folder with 100 .jpg files & 100 .mp3 files in it. if 1st jpg file is dog.jpg then corresponding audio file is dog.mp3, 2nd file is cat.jpg then there will be a audio file in same folder naming cat.mp3

    okay now coming to point. i want to Batch combine jpg with audio to produce video file like dog.mp4 , cat.mp4 etc. as i have described in the example. could anybody suggest me a better method?? can i use ffmpeg?? then what is command?

    For (1 image + 1 audio file = 1 video) case i know the answer its here: ffmpeg: ffmpeg: 1 image + 1 audio file = 1 video

    Please provide me a .bat code or ffmpeg code.

    I have a windows system with ffmpeg installed. thank you in advance for answer.

  • Adding 2 watermark with ffmpeg in different duration each one

    3 octobre 2014, par Paris Thiva

    i have a php code that i cut edit video with ffmpeg. now i can add one image as logo on video

    code is

    if(isset($_POST['video']))
            {
            $target=realpath(SAVEPATH);
            $watermark=WATERMARK;
            $ffmpeg=FFMPEG;
            $fromtime="00:00:0";
            $totime="00:05:00";
            $clip="-ss $fromtime -t $totime";
            $filter="[watermark]; [in][watermark] overlay=main_w-overlay_w-10:10 [out]";
    //      ob_start();
            foreach($_POST['video'] as $vid)
                {
                $filepath=UPLOADS."/$vid";
                $target_file="$target/$vid";
    //          passthru("sh xform.sh '$filepath' '$target' '$watermark' 2>&1");
                // 1. get the video width
                exec("$ffmpeg -i \"$filepath\"  2>&1 | perl -lane 'print $1 if /([0-9]{2,}x[0-9]+)/' | cut -d'x' -f1",$width);
                // 2. transform the video
                $swidth=$width[0]/3;
                $cmd="$ffmpeg -i \"$filepath\"  $clip -s $res -vf  \"movie=$watermark,  scale=$swidth:-1  $poss\" \"$target_file\" -vcodec h264 2>&1";
                 exec($cmd,$output);
                echo "
    "; }

    how i can add one more image in deferent duration?

    Thank you

  • FFMpeg UDP streaming - random split video effect

    3 octobre 2014, par Philmacs

    I'm trying to get a simple local preview of my webcam from an FFMpeg udp stream using an embedded Mplayer window. I can view the live stream using MPlayer but the image is unstable. I'm using the following FFMpeg command:

    ffmpeg -f dshow -video_size 640x480 -i video="Lenovo EasyCamera" -an -f rawvideo -pix_fmt yuyv422 -r 15 udp://127.0.0.1:1234
    

    And this is the MPlayer command:

    mplayer -demuxer rawvideo -rawvideo fps=15:w=640:h=480:format=yuy2 -nofs -noquiet -identify -idle -slave -nomouseinput -framedrop -wid 1051072
    

    Sometimes the stream image is OK, but intermittently the image tears randomly and this is how it looks (sorry, not enough rep for images in posts)

    http://imgur.com/sLC3FW0

    I have tried with FFPlay to see if it's a problem with MPlayer, but I get the same result:

    ffplay -s 640x480 -pix_fmt yuyv422 -f rawvideo -i udp://127.0.0.1:1234
    

    http://imgur.com/06L42Cj

    This effect is happening at random. If I stop and restart the video might be OK, or it may look like the above. Using aything other than udp and rawvideo adds a delay to the video stream, which I want to avoid.

    The FFMpeg streaming guide suggest methods when you get packet loss, but as far as I'm aware I don't seem to be getting that.

    I'm new to FFMpeg/Mplayer/video streaming and any help or thoughts greatly appreciated.

  • [iOS][FFmpeg] Which function should I use to extract audio from video ?

    3 octobre 2014, par user3867861

    I want to extract audio from video(mp4) with FFmpeg on iOS.

    I got FFmpeg library for iOS by using this github link and I'm successful to include library in my Xcode project. I saw .h file of FFmpeg, I cant find the function to extract audio from video. I tried hard to find some hints, but I cant at least.
    Which function should I use?
    Please give me HINT!!