Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • How to make HLS start from the begining

    15 juillet 2016, par Ariel Argañaraz

    I need some help with HLS streaming, I'm trying to create a playlist for streaming,

    I'm using ffmpeg to generate the files and the .m3u8 files. And for playing i'm using a web page with videojs player

    The idea is to simulate a live streaming using files already created.

    The problem is that in some version of iphone works and in another does not work. The problem is that when I start play the video in the Safari browser of my phone it freezes for a while and then download and play the last segment.

    for example if the video is split in 4 differents .ts files. It starts playing from the 4th .ts file and then stop.

    The problem is that I have 2 iphone mobile phone, one of them works perfectly but the other one not

    The not working cell phone is a iphone 6 (version 9.2.1)

    Here is my m3u8 file. Note that I'm using the #EXT-X-PLAYLIST-TYPE:EVENT and I remove the #EXT-X-ENDLIST from the botton. So it should be played as an live streaming.

    It works for another phones, it begins from the 0 second when I set the #EXT-X-START:TIME-OFFSET=0

    but in this version (9.2.1) the video freezes and then jumps to the last segment (webinar-3.ts) plays that segment and finally stop.

    #EXTM3U
    #EXT-X-VERSION:4
    #EXT-X-MEDIA-SEQUENCE:0
    #EXT-X-ALLOW-CACHE:NO
    #EXT-X-PLAYLIST-TYPE:EVENT
    #EXT-X-START:TIME-OFFSET=0
    #EXT-X-TARGETDURATION:6
    #EXTINF:5.046444,
    webinar-0.ts
    #EXTINF:5,
    webinar-1.ts
    #EXTINF:5,
    webinar-2.ts
    #EXTINF:5,
    webinar-3.ts
    

    Have anybody got an idea of what i'm doing wrong or how to get a m3u8 config that works for this iphone version?

  • how to use ffmpeg with Exoplayer library to play unsupported AC3 audio

    15 juillet 2016, par user5784145

    I am using Exoplayer and ExtractorRendererBuilder as used in the demo app to render the stream. In the case where i am playing any media file with AC3 audio codec audio doesn't work since the device doesn't support that codec.
    how can i add a class or any library that runs along side exoplayer and supports AC3

  • Using FFmpeg in .net ?

    15 juillet 2016, par daniel

    So I know its a fairly big challenge but I want to write a basic movie player/converter in c# using the FFmpeg library. However, the first obstacle I need to overcome is wrapping the FFmpeg library in c#. I've downloaded ffmpeg but couldn't compile it on Windows, so I downloaded a precompiled version for me. Ok awesome. Then I started looking for C# wrappers.

    I have looked around and have found a few wrappers such as SharpFFmpeg (http://sourceforge.net/projects/sharpffmpeg/) and ffmpeg-sharp (http://code.google.com/p/ffmpeg-sharp/). First of all, I wanted to use ffmpeg-sharp as its LGPL and SharpFFmpeg is GPL. However, it had quite a few compile errors. Turns out it was written for the mono compiler, I tried compiling it with mono but couldn't figure out how. I then started to manually fix the compiler errors myself, but came across a few scary ones and thought I'd better leave those alone. So I gave up on ffmpeg-sharp.

    Then I looked at SharpFFmpeg and it looks like what I want, all the functions P/Invoked for me. However its GPL? Both the AVCodec.cs and AVFormat.cs files look like ports of avcodec.c and avformat.c which I reckon I could port myself? Then not have to worry about licencing.

    But I want to get this right before I go ahead and start coding. Should I:

    1. Write my own C++ library for interacting with ffmpeg, then have my C# program talk to the C++ library in order to play/convert videos etc.

    OR

    1. Port avcodec.h and avformat.h (is that all i need?) to c# by using a whole lot of DllImports and write it entirely in C#?

    First of all consider that I'm not great at C++ as I rarely use it but I know enough to get around. The reason I'm thinking #1 might be the better option is that most FFmpeg tutorials are in C++ and I'd also have more control over memory management than if I was to do it in c#.

    What do you think? Also would you happen to have any useful links (perhaps a tutorial) for using FFmpeg?

  • Cannot compile libvorbis (Ogg missing)

    15 juillet 2016, par tishu

    I am following this guide to compile FFMPEG with libvpx support. On the libvorbis compilation step, I get this error:

    The test program failed to compile or link. See the file config.log for the exact error that occurred. This usually means Ogg was incorrectly installed or that you have moved Ogg since it was installed.
    

    There is no error on the Ogg compilation and installation step, and I cannot find this config.log file. I have libogg available in local/lib and local/bin.

  • FFMPEG - Flaky internet for streaming, fallback stream or image

    15 juillet 2016, par jonathan tan

    I am using NGINX to receive rtmp and output to hls.

    rtmp {
        server {
            listen 1935;
            ...
            application rtmp {
                live on;
                ...
                exec ffmpeg -re -i rtmp://127.0.0.1/rtmp/$name -threads 1 -c:a aac -ac 1 -strict -2 -b:a 64k -c:v libx264 -profile:v baseline -g 10 -b:v 300K -s 480x240 -f flv rtmp://127.0.0.1/hls/$name;
            }
            application hls {
                live on;
                hls on;
                hls_path /tmp/hls;
                ...
            }
        }
    }
    

    My stream comes from Flash Media Live Encoder. But sometimes I have flaky internet because my connection comes from mobile. Sometimes internet drops for 3-5 seconds every 5 minutes. But this is enough to disrupt the stream. Is it possible for me to make it run continuously even when my FMLE is disconnected?

    I am thinking of executing an FFMPEG from the server box to stream continuously an image as a fallback when FMLE is disconnected, then combine the 2 RTMP streams. Perhaps favoring the one from FMLE if available, and the other as fallback. But I am not sure how to combine using FFMPEG.

    Or is there another hack I can try?