Recherche avancée

Médias (91)

Autres articles (76)

Sur d’autres sites (12634)

  • Android : How to save two overlapped videos as one using mediacodec ?

    27 avril 2015, par Seba Niepodam

    I want to do something similar to this on android.

    I want to load video from file and display it twice with some transformations (mostly resize). And i want to encode it as one video file.

    Is it possible to do it in native android ? With mediacodec or in any other way ?

    I know there is a ffmpeg but i have trouble compiling it and working with Xamarin.

  • How to save recorded ffmpeg webcam video to red5

    20 juillet 2014, par user3451310

    im trying to make a webcam recording program that can be accessed remotely by other users. i completed the recording locally but when i try to save it to red5 rtmp ://localhost/oflaDemo/streams/output.flv, no output produced to the streams directory and i don’t know how to stream it from other users while recording. can someone help me on this problem ?tnx heres my code :

    Thread webcam = new Thread()
    public void run()

       String fileName = new SimpleDateFormat("yyyy-MM-dd-hhmm").format(new Date());
      try {  
      OpenCVFrameGrabber grabber = new OpenCVFrameGrabber(0);  
      grabber.start();  
      opencv_core.IplImage grabbedImage = grabber.grab();  
      CanvasFrame canvasFrame = new CanvasFrame("Video recorder");  
      canvasFrame.setCanvasSize(grabbedImage.width(), grabbedImage.height());  
      grabber.setFrameRate(grabber.getFrameRate());  



      FFmpegFrameRecorder recorder = new FFmpegFrameRecorder("rtmp://localhost/oflaDemo/streams/output.flv", 800, 600);

      recorder.setFormat("flv");  
      recorder.setFrameRate(6);  
      recorder.setVideoBitrate(1024 * 1024);




      recorder.start();



      while (canvasFrame.isVisible() && (grabbedImage = grabber.grab()) != null) {  
        canvasFrame.showImage(grabbedImage);  
        recorder.record(grabbedImage);  
      }  
      recorder.stop();  
      grabber.stop();  
      canvasFrame.dispose();  


      recorder.record();

    } catch (FrameGrabber.Exception ex) {  
      Logger.getLogger(web.class.getName()).log(Level.SEVERE, null, ex);  
    } catch (FrameRecorder.Exception ex) {  
      Logger.getLogger(web.class.getName()).log(Level.SEVERE, null, ex);  
    }  

     ;
    webcam.start() ;

    }        
  • FFMPEG : How to extract multichannel track from m4v, mix it down and save the stereo downmix as "left" and "right" ?

    1er juin 2017, par chillynilly

    just like the title already says : I want to extract a multichannel track (5.1) from an .m4v, mix this track down and save the output as separate files, so in the end I want to have something like ’downmix_left.wav’ and ’downmix_right.wav’
    I know how to do a downmix and I know how to split the audio, but I do not know how to do it in one step, which would save me a lot of time.

    This is the command I use for splitting :

    ffmpeg -i "video.m4v" -vn -filter_complex \
    "[0:2]channelsplit=channel_layout=5.1(side)[FL][FR][FC][LFE][SL][SR]" \
    -map "[FL]" video_left.wav \
    -map "[FR]" video_right.wav \
    -map "[FC]" video_center.wav \
    -map "[LFE]" video_lfe.wav \
    -map "[SL]" video_back_left.wav \
    -map "[SR]" video_back_right.wav

    And this is the command for the downmix of a multichannel track :

    ffmpeg -i "video.m4v" -vn -map 0:2 -ac 2 \
    -af "aresample=matrix_encoding=dplii" video_downmix.wav

    Is it possible to combine these and if so, how can it be done :D ? I would appreciate it very much if you could help me out here.