Recherche avancée

Médias (0)

Mot : - Tags -/navigation

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (65)

Sur d’autres sites (13936)

  • C - FFmpeg streaming from a C program ?

    8 août 2016, par golmschenk

    I’m looking to replicate an FFmpeg command-line command in my C code. Specifically I would like to be able to run :

    ffmpeg -re -i video.mp4 -f mpegts udp://localhost:7777

    One thing I’ve noticed when looking at people’s code who have used the libraries of FFmpeg in their own code is that they often have a few hundred lines of code for a single command similar to an FFmpeg command-line command. I’m guessing this is just because they are doing something very specific, because if I can run that short command on my command line and get what I want it should probably only take about ten lines of code to do the same thing in my C code. This should only take about that much work right ? Why would it take much more ?

    I’m having a bit of difficulty finding explanations on how to use the streaming capabilities of the FFmpeg libraries that aren’t overly complex because they’re for a very specific purpose. Can anyone explain how I might go about writing the code for the above command ? Or at the very least point me to some documentation explaining how to write such a script/program ? Thank you much !

    EDIT : I do hope to run this from an iPhone app eventually so I won’t just be able to straight up call FFmpeg from my program. I’ll need to use the libraries used by FFmpeg.

  • C - FFmpeg streaming from a C program ?

    16 août 2017, par golmschenk

    I’m looking to replicate an FFmpeg command-line command in my C code. Specifically I would like to be able to run :

    ffmpeg -re -i video.mp4 -f mpegts udp://localhost:7777

    One thing I’ve noticed when looking at people’s code who have used the libraries of FFmpeg in their own code is that they often have a few hundred lines of code for a single command similar to an FFmpeg command-line command. I’m guessing this is just because they are doing something very specific, because if I can run that short command on my command line and get what I want it should probably only take about ten lines of code to do the same thing in my C code. This should only take about that much work right ? Why would it take much more ?

    I’m having a bit of difficulty finding explanations on how to use the streaming capabilities of the FFmpeg libraries that aren’t overly complex because they’re for a very specific purpose. Can anyone explain how I might go about writing the code for the above command ? Or at the very least point me to some documentation explaining how to write such a script/program ? Thank you much !

    EDIT : I do hope to run this from an iPhone app eventually so I won’t just be able to straight up call FFmpeg from my program. I’ll need to use the libraries used by FFmpeg.

  • Can not play local rtsp URL using FFmpeg in iOS

    12 juin 2015, par Priyanka

    I am using FFmpeg for stream rtsp URL in iOS.
    I am trying to stream a local url but my app is failed to open url
    avformat_open_input method always return -5

    I have played the same url rtsp://172.16.1.226:5544/1 on VLC media player on my iPhone and macbook it works on both.

    After few research i have found there is some problem with rtsp_transport

    I was using av_dict_set(&serverOpt, "rtsp_transport", "tcp", 0); for the server configuration while opening url and the result is can not open feed.

    When I changed it to av_dict_set(&serverOpt, "rtsp_transport", "udp", 1);
    I am able to open url successfully but I continuously getting error rtsp 1 missing packet and so on.

    Can anybody help what should be the right configuration while opening a local rtsp url using ffmpeg.
    Should i need to update av_dict_set(&serverOpt, "rtsp_transport", "udp", 1)

    Thanks in advance