Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • ffmpg android command gives error

    14 décembre 2015, par Mubina Shaikh

    I am overlaying gif on video in android and using ffmpg wrapper my command is

            String vidpath=Environment.getExternalStorageDirectory()+"/WhatsApp/Media/WhatsApp Video/vid.mp4";
            String gifpath=Environment.getExternalStorageDirectory()+"/WhatsApp/Media/WhatsApp Video/vid.gif";
            String outpath=Environment.getExternalStorageDirectory()+"/out.mp4";
             ffmpeg.execProcess(new String[]{
                ffmpegBin,
                "-i",
                vidpath,
                "-i",
                gifpath,
                "-filter_complex",
                "\"overlay=x=(main_w-overlay_w)/2:y=(main_h-overlay_h)/2\"",
                //"640x388",
                out_video_path
    
    
    
    
            },sc);
    

    my execProcess method is

     public void execProcess( String[] cmds, ShellCallback sc) throws Exception {        
    
    
            ProcessBuilder pb = new ProcessBuilder(cmds);
            pb.redirectErrorStream(true);
            Process process = pb.start();      
    
            BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
    
            String line;
    
    
            /*switch(command_call_type)
            {
            case Keys.KEY_COMMANDEXE_TYPE_MERGEFRAME:
    
            //  refincereference.updateLoadingbar(30);
                break;
    
            }*/
    
            while ((line = reader.readLine()) != null)
            {
                if (sc != null)
                {
                    sc.shellOut(line.toCharArray());
    
                Log.e("FFMPEG", line.toCharArray()+"");
    
    
                }
            }
    
    
    
            /*switch(command_call_type)
            {
            case Keys.KEY_COMMANDEXE_TYPE_MERGEFRAME:
    
                //refincereference.updateLoadingbar(40);
                break;
    
            case Keys.KEY_COMMANDEXE_TYPE_CLIPMP3:
                //refincereference.updateLoadingbar(60);
                break;
            case Keys.KEY_COMMANDEXE_TYPE_MP3TOM4A:
                //refincereference.updateLoadingbar(80);
            break;
    
            }*/
    
    
            /*
            if (process != null) {
                process.destroy();        
            }*/
    
    }
    

    and error comes written in line object that no such file or directory But it always gives error that gif file does not exist i have checked it wit FIle.exist() also though it gives error please help me out

  • Node Webkit-Designing Media Player support all media codec(format)

    14 décembre 2015, par Vish

    I am working on product which classify any kind of media into movies, tv shows, videos, audio and images. Node webkit with angularjs and node is its base. Now I am trying to bring local playback, which enabled this classified media to play inside this desktop app. Have done lot of research, following are feasible solution to me:

    1. Getting ffmpegsumo.dll with all codec support, hence html and able to play all this videos.
    2. All unsupported video or audio to be converted into supporting codec format and steam it to and tag.
    3. Use some third party plugin to support like WebCherima .

    Option 1 and 2 are not looking feasible to me. For option 1, we have compile Chromium 41.0.2272.76 or nw.js v0.12.3 to update ffmpegsumo.dll with more codec. On other side Option 2 looking difficult to get good performance. I have learn few limitation of third party plugins. Please provide some insight? Thanks!

  • blur an mp4 video for website background

    14 décembre 2015, par Mansi

    I am putting a video in the background of my web page. I want to blur the background for which I tried to put the following attribute in video tag:

     

    the video runs very slow due to blurring the background within HTML. So, now I am trying to blur the original video. I tried to use ffmpeg (here):

    ffmpeg -i input.avi -vf "boxblur=enable='between(t,start,end)'" -codec:a copy output.avi
    

    But the filter used in ffmpeg seems to be deprecated. I have tried few filters of "avconv", but no filter seems to "blur" the video. Please let me know if there is any other command line tool which I can use for this purpose or even if I am missing any filter in ffmpeg or avconv.

    UPDATE: Console output for ffmpeg:

    ffmpeg -i output.mp4 -vf "boxblur=enable='between(t,0,15)'" -codec:a copy output1.mp4
    ffmpeg version 2.8.3 Copyright (c) 2000-2015 the FFmpeg developers
      built with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
      configuration: --disable-yasm
      libavutil      54. 31.100 / 54. 31.100
      libavcodec     56. 60.100 / 56. 60.100
      libavformat    56. 40.101 / 56. 40.101
      libavdevice    56.  4.100 / 56.  4.100
      libavfilter     5. 40.101 /  5. 40.101
      libswscale      3.  1.101 /  3.  1.101
      libswresample   1.  2.101 /  1.  2.101
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'output.mp4':
      Metadata:
        major_brand     : isom
        minor_version   : 512
        compatible_brands: isomiso2avc1mp41
        creation_time   : 2015-04-08 13:38:10
        encoder         : Lavf54.20.4
      Duration: 00:00:29.40, start: 0.000000, bitrate: 1909 kb/s
        Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1024x1024 [SAR 16:9 DAR 16:9], 1905 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
        Metadata:
          creation_time   : 2015-04-08 13:38:10
          handler_name    : VideoHandler
    [AVFilterGraph @ 0x1db5140] No such filter: 'boxblur'
    
  • Details about the type of the filtered frame used in FFmpeg

    13 décembre 2015, par sunzhida

    I am new in multimedia analysis.

    I am trying to extract key frames from .mp4 and .flv format videos by using FFmpeg. The problem is that I was confused by the parameters used in the command (Select only I-frames).

    select='eq(pict_type\,I)'
    

    The parameters are used to choose the types of filtered frame and It can assume one of the following values:

    I P B S SI SP BI

    After searching on Wikipedia, I have got some basic concepts on I, P, B frames but still cannot tell the difference among S, SI, SP and BI. How to decide which type of frame should I use in my command line?

  • How to get equal segment times using ffmpeg ?

    13 décembre 2015, par Abhay Cn

    I used the following command to split a video into segments :

    ffmpeg -i inputfile -c copy -map 0 -segment_time 5 -f segment outputfile
    

    But I got varying segment times ie. some segments were 5s, some were 2s and others were 8s. How do I correct this ?