Recherche avancée

Médias (91)

Autres articles (56)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

  • Dépôt de média et thèmes par FTP

    31 mai 2013, par

    L’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
    Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

Sur d’autres sites (8595)

  • Cannot watch RTSP stream from Live555 using FFMPEG

    30 octobre 2023, par bobku123

    I am trying to create an RTSP server using Live555, with the stream source being raw h264 video of my USB webcam encoded with FFMPEG, sent over UDP.

    


    I have used BasicUDPSource from Live555 sources as my FramedSource class. I created my own MediaSubsession class as per the Live555 FAQ. Here is the source code I created so far :

    


    #include "liveMedia.hh"

#include "BasicUsageEnvironment.hh"
#include "announceURL.hh"
#include "FFMPEGH264StreamMediaSubsession.hh"
#include "BasicUDPSource.hh"
#include "H264VideoStreamFramer.hh"
#include "H265VideoRTPSink.hh"

UsageEnvironment* env;

// To make the second and subsequent client for each stream reuse the same
// input stream as the first client (rather than playing the file from the
// start for each client), change the following "False" to "True":
Boolean reuseFirstSource = False;

// To stream *only* MPEG-1 or 2 video "I" frames
// (e.g., to reduce network bandwidth),
// change the following "False" to "True":
Boolean iFramesOnly = False;

static void announceStream(RTSPServer* rtspServer, ServerMediaSession* sms,
               char const* streamName, char const* inputFileName); // forward


int main(int argc, char** argv) {
  // Begin by setting up our usage environment:
  TaskScheduler* scheduler = BasicTaskScheduler::createNew();
  env = BasicUsageEnvironment::createNew(*scheduler);

  UserAuthenticationDatabase* authDB = NULL;

  // Serve regular RTSP (over a TCP connection):
  RTSPServer* rtspServer = RTSPServer::createNew(*env, 8554, authDB);

  if (rtspServer == NULL) {
    *env << "Failed to create RTSP server: " << env->getResultMsg() << "\n";
    exit(1);
  }

  char const* descriptionString = "Session streamed by \"testFFMPEGRTSPServer\"";

  {
    char const* streamName = "FFMPEGRTSPStream";
    ServerMediaSession* sms
      = ServerMediaSession::createNew(*env, streamName, streamName,
                      descriptionString);
    sms->addSubsession(FFMPEGH264StreamMediaSubsession
               ::createNew(*env, reuseFirstSource));
    rtspServer->addServerMediaSession(sms);

    announceStream(rtspServer, sms, streamName, "ffmpeg");
  }

  env->taskScheduler().doEventLoop(); // does not return
}

static void announceStream(RTSPServer* rtspServer, ServerMediaSession* sms,
               char const* streamName, char const* inputFileName) {
  UsageEnvironment& env = rtspServer->envir();

  env << "\n\"" << streamName << "\" stream, from the file \""
      << inputFileName << "\"\n";
  announceURL(rtspServer, sms);
}

FFMPEGH264StreamMediaSubsession*
  FFMPEGH264StreamMediaSubsession::createNew(UsageEnvironment& env, Boolean reuseFirstSource)
{
    return new FFMPEGH264StreamMediaSubsession(env, reuseFirstSource);
}

FFMPEGH264StreamMediaSubsession::FFMPEGH264StreamMediaSubsession(UsageEnvironment& env, Boolean reuseFirstSource) 
                : OnDemandServerMediaSubsession(env, reuseFirstSource)
{

}

FFMPEGH264StreamMediaSubsession::~FFMPEGH264StreamMediaSubsession()
{

}

FramedSource* FFMPEGH264StreamMediaSubsession::createNewStreamSource(unsigned clientSessionId,
                          unsigned& estBitrate)
{
  estBitrate = 500; // kbps, estimate

  // Create the video source:
  // Create a 'groupsock' for the input multicast group,port:
  char const* inputAddressStr = "192.168.1.100";

  NetAddressList inputAddresses(inputAddressStr);
  struct sockaddr_storage inputAddress;
  copyAddress(inputAddress, inputAddresses.firstAddress());

  Port const inputPort(8888);
  unsigned char const inputTTL = 0; // we're only reading from this mcast group

  Groupsock inputGroupsock(envir(), inputAddress, inputPort, inputTTL);

  // Then create a liveMedia 'source' object, encapsulating this groupsock:
  FramedSource* source = BasicUDPSource::createNew(envir(), &inputGroupsock);

  // Create a framer for the Video Elementary Stream:
  return H264VideoStreamFramer::createNew(envir(), source);
} 

RTPSink* FFMPEGH264StreamMediaSubsession::createNewRTPSink(Groupsock* rtpGroupsock,
                                    unsigned char rtpPayloadTypeIfDynamic, FramedSource* inputSource)
{
    return H265VideoRTPSink::createNew(envir(), rtpGroupsock, rtpPayloadTypeIfDynamic);
}


    


    I converted my USB webcam to H264 stream using the following FFMPEG command :

    


    ffmpeg -video_size 1280x720 -framerate 30 -input_format mjpeg -f v4l2 -i /dev/video0 -c:v h264_nvenc -bf 0 -g 30 -bsf:v 'filter_units=remove_types=35|38-40' -f h264 udp://192.168.1.100:8888


    


    However when I try to play it with FFPLAY using the following, I do not get any output :

    


    ffplay rtsp://192.168.1.100:8554/FFMPEGRTSPStream


    


    What am I doing wrong ?

    


  • Play Multiple online videos in FFMPEG

    4 juillet 2014, par AndroidOptimist

    I’m trying to make an Android Applicaion that uses FFMPEG to play online streams. I gone through dolphin player source and with the help of this i achieved playing udp streams in android. Now i am trying to play multiple streams in my player. For example i have a list activity that has 10 names and by clicking each name the corrosponding video should be played. How can i achieve this in avformat_open_input. I am very new to ffmpeg. Please help me in achiving this. Thanks in advance.

    My c code is as follows :

    static int decode_module_init(void *arg)
    {
       VideoState *is = (VideoState *)arg;
       AVFormatContext *pFormatCtx;

       int err;
       int ret = -1;

       int i;

       int video_index = -1;
       int audio_index = -1;


       is->videoStream=-1;
       is->audioStream=-1;

       char* Filename = "udp://.....";

       global_video_state = is;

       pFormatCtx = avformat_alloc_context();
       pFormatCtx->interrupt_callback.callback = decode_interrupt_cb;
       pFormatCtx->interrupt_callback.opaque = is;


       **err = avformat_open_input(&pFormatCtx, Filename , NULL, NULL);**

       if (err < 0) {
           __android_log_print(ANDROID_LOG_INFO, "message", "File open failed");
           ret = -1;
           goto decode_module_init_fail;

       }

       __android_log_print(ANDROID_LOG_INFO, "message", "File open successful");
    }
  • High Definition Compatible Digital (HDCD) decoder filter, using libhdcd

    26 août 2016, par Burt P
    High Definition Compatible Digital (HDCD) decoder filter, using libhdcd
    

    Signed-off-by : Burt P <pburt0@gmail.com>
    Signed-off-by : Diego Biurrun <diego@biurrun.de>
    Signed-off-by : Luca Barbato <lu_zero@gentoo.org>

    • [DBH] Changelog
    • [DBH] configure
    • [DBH] doc/filters.texi
    • [DBH] doc/general.texi
    • [DBH] libavfilter/Makefile
    • [DBH] libavfilter/af_hdcd.c
    • [DBH] libavfilter/allfilters.c
    • [DBH] libavfilter/version.h