Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • opencv open camera and ffmpeg open Microphone

    6 janvier 2017, par H S T

    I use opencv open camera and obtain video and push stream. Then I want add audio and push it. When I use ffmpeg function

    avformat_open_input(&ifmt_ctx, psDevName, ifmt, NULL),
    program break.
    

    So can I use opencv open camera and use ffmepg open Microphone?

    I want to write anchor push streaming client and must use opencv open camera.

  • Including FFMPEG library with lambda

    6 janvier 2017, par Alex Konetchy

    I've been trying to get this working for sometime. All the I am trying to do is include the ffmpeg binary with my lambda funciton. If anyone could show me how I am doing this wrong I would greatly appreciate it. Everything works fine on my machine. It outputs nothing when I upload to lambda. Here's my javascript:

    var Q = require('q');
    var path = require('path');
    
    var exec = require('child_process').exec;
    var ffmpeg = require('ffmpeg-static');
    
    process.env['PATH'] = process.env['PATH'] + ':/tmp/:' + process.env['LAMBDA_TASK_ROOT']
    
    exports.handler = function(event, context, callback) {
        var cmd = 'bin/version ' + ffmpeg.path.substring(0,(ffmpeg.path.length-6));
        exec(cmd, function(error, stdout, stderr) { console.log(stdout); callback(null, stdout); });
    }
    

    Here is bin/version

    #!/bin/bash
    
    ffmpegpath="$1";
    export PATH=$PATH:$ffmpegpath;
    
    cd $ffmpegpath;
    
    ffmpeg -version;
    

    I want it to display the ffmpeg version so I know that it is installed. If I run that code on my machine it does just that. When I upload to lambda this is all I get in the console.

    START RequestId: 0ed80a4f-d3a6-11e6-b907-753f3d9d401c Version: $LATEST 2017-01-06T00:21:28.531Z 0ed80a4f-d3a6-11e6-b907-753f3d9d401c
    END RequestId: 0ed80a4f-d3a6-11e6-b907-753f3d9d401c REPORT RequestId: 0ed80a4f-d3a6-11e6-b907-753f3d9d401c Duration: 128.48 ms Billed Duration: 200 ms Memory Size: 128 MB Max Memory Used: 35 MB

    How do I include the ffmpeg library so that I can start doing some image conversion? Thanks.

  • Frame rate control of a ts file

    6 janvier 2017, par Prasanth Kumar Arisetti

    I have a ts file, which is created by encoding raw yuv data using x264enc and muxing it with mpegtsmux.

    And this file contains more than one stream. For example it may contain two video streams, or it may contain two video and one text stream like that.

    It is of 25 fps, and 720X576 resolution. I would like to change it's fps to say 10, and all the three streams must present in the new ts file also.

    Is there any pipeline for this in gstreamer? or any command in ffmpeg? How can i do this?

  • aac encoding with ffmpeg result in super short file

    5 janvier 2017, par Mockarutan

    So I'm having problem with AAC encoding. I'm trying to encode some synthetic sound waves, but it does not work as expected. The file I get gives just a super short sound when played in VLC. When I play is in ffplay is plays like I expect, but it says "duration: 00:00:00.05" which I suppose says 5 ms. But I encode a lot more than that, and it played more. So VLC plays a super short sound, ffplay plays a longer file (the expected length), but displays it with super short duration, what's going on?

    Source: http://pastebin.com/M5MKkEL3

    One of the things that looks wrong to me is this: If you look for the variable "audio_time", if you breakpoint it and read it every encode frame, you will get this:

    ..
    Encode frame 8: 0.00010416666666666666
    Encode frame 9: 0.00012500000000000000
    (and so on)

    The diff is: ~0.00002085, which is a 1/1000 of a the diff I expected from ~47 samples frames per second, which is what the encoder wants with 48k sample rate (48k / 1024 = ~47).

    So why do I get a thousand of the expected data encoded?

    Feel free to point anything suspicious out!

    Thanks in advance!

  • ffmpeg over https fails

    5 janvier 2017, par Robin

    If I feed url with http, such as this:

    ffmpeg -i http://vjs.zencdn.net/v/oceans.mp4 videojs.mp4
    

    It works perfectly. However, when I feed url with https, such as this:

    ffmpeg -i https://s3-us-west-2.amazonaws.com/bucket/check.mp4 video.mp4
    

    This gives me an error:

    https protocol not found, recompile FFmpeg with openssl, gnutls, or securetransport enabled. https://s3-us-west-2.amazonaws.com/bucket/check.mp4: Protocol not found

    What should I do to enable https?