Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • ffmpeg windows, multiple displays

    2 septembre 2013, par user2739557

    I have a windows 7 setup with extended desktops (ie say two). I would like to capture everything on desktop 1 in a separate file and everying on desktop 2 in a separate file. At present I use

    ffmpeg -f dshow -r 30 video="UScreenCapture":audio="Microphone Array (IDT High Defi" test.flv

    which captures everything on both desktops simultaneously. Are there any options one can pass to limit this to say one Desktop?

    Now solved as follows: use the crop video filter to extract the desktops 1 and 2. Assuming the two displays are 1024x768 then the following seems to work and create two files for the left and right displays

    ffmpeg -f dshow -r 30 video="UScreenCapture":audio="Microphone Array (IDT High Defi" -vf crop=1024x768:0:0 left.flv -f dshow -r 30 video="UScreenCapture":audio="Microphone Array (IDT High Defi" -vf crop=1024x768:1024:0 right.flv

  • Compressing videos with ffmpeg-php and squid

    2 septembre 2013, par raheel khadri

    I have setup squid as transparent proxy and also I have a script (ffmpeg-php)this is setup on my localapache server, the purpose of this script is to perform compreesion using ffmpeg in the background can anyone guide me how can this be performed i have used squidguard also but it dint help me achieve what i am trying to do :(

  • Play MP4 while recording moov atom.

    2 septembre 2013, par Bavagnoli Paolo

    I am recording a video with VLC using MP4 Encapsulation + h264 codec. The video is recorded correctly , but I need to be able to access and play the recorded video while recording from a winform c# application.

    I have integrated VLC in the winform application but the problem is that the mp4 file is not playable during recording.

    I understood that the problem is the moov atom file is created at the end when the recording as terminated.

    First solution I have found is to copy the file when the user need to access the file then generate a moov atom using for example MP4Box utility.

    Does anybody know a better way to achieve this?

    Thanks

  • NanoHTTPD in android do not streaming specific mp4 files

    2 septembre 2013, par user2739068

    I'm making Android application which makes mp4 video file
    (camera source, ffmpeg, h264 encoded) and streaming to webbrowser.
    but it fails to streaming when certain condition matches.(rec2.mp4)

    I checked those things--------------
    1. create mp4 file - OK
    2.NanoHTTPD streaming - Fail
    : if less than 1.4MB >> chrome downloads first and then play
    : else connection cancled
    3. other server?
    : apache - Success
    : nginx - Success
    : tomcat - Success
    4. other mp4 file?(rec1.mp4) - Success

    So, i thought that NanoHTTPD fails to serve specific mp4 file
    but i don't know what is the problem.

    • this is my souce code(serve function)

      public Response serve(String uri, Method method, Map headers, Map parms, Map files) {
      
      Context context = MainActivity.context;
      
      String etag = Integer.toHexString(new Random().nextInt());
      
      Response res = null;
      try {
          File file = new File("/sdcard/mp4files" + uri); 
          BufferedInputStream bis = new BufferedInputStream(new FileInputStream(file), (int)file.length());
          res = new Response(Status.OK, "video/mp4", bis);
          res.addHeader( "Connection", "Keep-alive");
          res.addHeader( "ETag", etag);
      } catch (FileNotFoundException e) {
          e.printStackTrace();
      }
      return res;
      

      }

    • mp4 files
      : rec1.mp4 - recorded by using LG built-in app
      : rec2.mp4 - recorded by using my app
      http://www.mediafire.com/?rip17r7rho8igf7

    • using latest NanoHTTPD

    • Encode option - profile:baseline, crf:30, fps:10, width/height:720/480
  • Renaming Carrierwave extension before saving it [on hold]

    2 septembre 2013, par Jan

    I am trying to get a mp3 version of a wav which gets watermarked by using ffmpeg.

    Spoken in steps:

    • upload wav (works)
    • watermark it (works also)
    • make a mp3 version (does not work)

    The upload and watermarking step is done correctly.

    My problem is, that ffmpeg evaluates the destination format by reading its file extension name (which is wav in my case). How can I rename the extension before it get's saved?

    ffmpeg -i watermarked.wav -acodec libmp3lame -f mp3 watermarked.wav
                         HOW CAN I RENAME THIS BEFORE IT GET SAVED? ^^^
    

    The above snip (-f forcing the codec and format) does NOT it's job and

    def full_filename(for_file=file)
      super.chomp(File.extname(super)) + '.mp3'
    end 
    

    is happening too late (after processing)

    Do I have to make a seperate (second) tempfile and remove the watermarked.wav? Or do I have to make a "seperate process" and take ? And when yes, how?

    I am trying this since weeks...

    many, many, many thanks in advance