Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • Fastest way to convert videos to mp4

    4 mai 2017, par Adeline Mani-Rajan

    Actually my conversion script for videos is using the PHP-FFMpeg/PHP-FFMpeg package :

    $ffmpeg   = FFMpeg::create(
                    [
                        'ffmpeg.binaries'  => getenv('FFMPEG_PATH').'/ffmpeg',
                        'ffprobe.binaries' => getenv('FFMPEG_PATH').'/ffprobe',
                        'timeout'          => 3600,
                        'ffmpeg.threads'   => 12,
                    ]
                );
                $video = $ffmpeg->open($original_path_here);
                $format = new X264();
                $format->setAudioCodec('libmp3lame');
                $video->save($format, $converted_path_here);
    

    But the conversion is quite long for each (less than 1 minute) video. Is there any way to improve the conversion time ?

  • Stitching videos (with very precise camera angles) into 360 video [on hold]

    4 mai 2017, par Basset hound

    I can record videos with very precise camera angles. I also used Autopano Video to stitch the videos, the result is awesome.

    I was wondering, if I can record videos with very precise camera angels. Do I really need 3rd party commercial software to stitch the videos?

    Can I get it down by C# or ffmpeg or OpenCV or open source? Any hint or advice would be appreciated.

  • No such file or Directory in android FFMpeg [duplicate]

    4 mai 2017, par Anil kumar

    Hi i am using FFMpeg for splitting recorded video files and i searched lot in google for executing FFMpeg splitting command,But no one provided me right solution and i am facing this issue since 3 days on words.

    I am using below code for splitting video per every 8 seconds but i am getting exception No such file or Directory,I hope some one help me

    code:

    public void executeBinaryCommand(FFmpeg ffmpeg) {
    
                try {
    
                    if (ffmpeg != null) {
    
                inputFileUrl=  /storage/emulated/0/1492848702.mp4;
                outputFileUrl= /storage/emulated/0/1492848702.mp4;
    
                String cmd[] = new String[]{"-i ",inputFileUrl+" ","-c ","copy ","-map ","0 ",
                    "-segment_time ","8 ","-f ","segment/sdcard/Download/output%03d.mp4"};
    
                        ffmpeg.execute(command,
                                new ExecuteBinaryResponseHandler() {
    
                                    @Override
                                    public void onFailure(String response) {
                                        System.out.println("failure====>" + response.toString());
                                    }
    
                                    @Override
                                    public void onSuccess(String response) {
                                        System.out.println("resposense====>" + response.toString());
                                    }
    
                                    @Override
                                    public void onProgress(String response) {
                                        System.out.println("on progress");
                                    }
    
                                    @Override
                                    public void onStart() {
                                        System.out.println("start");
                                    }
    
                                    @Override
                                    public void onFinish() {
                                        System.out.println("Finish");
                                    }
                                });
                    }
                } catch (FFmpegCommandAlreadyRunningException exception) {
                    exception.printStackTrace();
                }
    
  • How to get video duration, dimension and size in PHP ?

    4 mai 2017, par Chandan

    I want to know how to get the duration, dimension and size of uploaded video file in PHP. The file can be in any video format.

  • FFmpeg RTP network issue in Ubuntu

    4 mai 2017, par Ivan Kolesnikov

    I want to copy a bunch of SD sources from mpegts transported with RTP on local files. (VBR mpeg2video, mp2 audio). It works fine for one multicast source with the following command:

    ffmpeg -i rtp://@IP1:PORT -c copy video1.mpg
    

    but when I ran a second ffmpeg instance with the following command:

    ffmpeg -i rtp://@IP2:PORT -c copy video2.mpg
    

    then I got errors from both FFmpeg instances ("RTP: dropping old packet received too late") and in both files (video1.mpg and video2.mpg) recorded video from the second source (rtp://@IP2:PORT).

    This issue occurs only in Linux (I checked Ubuntu 14.04 - 16.04). I have no problems in Windows and can transcoding video correctly in parallel from files. Under Ubuntu even two ffplay instances tuned to different sources play back the same content (from the source which was opened last). I tried playing back with VLC and there is no such problem.

    I can resolve this issue when using FFmpeg with the -f option:
    ffmpeg -f mpegts -i rtp://@IP1:PORT -c copy video1.mpg
    and
    ffmpeg -f mpegts -i rtp://@IP2:PORT -c copy video2.mpg, but then I'm getting the following errors: "[mpegts @ 0x306e240] PES packet size mismatch" and receive both files (video1.mpg and video2.mpg) with artifacts and freeze effects. This issue appears for both operating systems.

    How can I record|transcode videos from multiple RTP streams with FFmpeg simultaneously under Ubuntu without errors and artifacts?