Recherche avancée

Médias (3)

Mot : - Tags -/image

Autres articles (89)

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (6646)

  • Merge commit ’458446acfa1441d283dacf9e6e545beb083b8bb0’

    15 novembre 2013, par Michael Niedermayer
    Merge commit ’458446acfa1441d283dacf9e6e545beb083b8bb0’
    

    * commit ’458446acfa1441d283dacf9e6e545beb083b8bb0’ :
    lavc : Edge emulation with dst/src linesize

    Conflicts :
    libavcodec/cavs.c
    libavcodec/h264.c
    libavcodec/hevc.c
    libavcodec/mpegvideo_enc.c
    libavcodec/mpegvideo_motion.c
    libavcodec/rv34.c
    libavcodec/svq3.c
    libavcodec/vc1dec.c
    libavcodec/videodsp.h
    libavcodec/videodsp_template.c
    libavcodec/vp3.c
    libavcodec/vp8.c
    libavcodec/wmv2.c
    libavcodec/x86/videodsp.asm
    libavcodec/x86/videodsp_init.c

    Changes to the asm are not merged, they are left for volunteers or
    in their absence for later.
    The changes this merge introduces are reordering of the function
    arguments

    See : face578d56c2d1375e40d5e2a28acc122132bc55
    Merged-by : Michael Niedermayer <michaelni@gmx.at>

    • [DH] libavcodec/cavs.c
    • [DH] libavcodec/diracdec.c
    • [DH] libavcodec/h264.c
    • [DH] libavcodec/hevc.c
    • [DH] libavcodec/mpegvideo.c
    • [DH] libavcodec/mpegvideo_enc.c
    • [DH] libavcodec/mpegvideo_motion.c
    • [DH] libavcodec/rv34.c
    • [DH] libavcodec/snow.c
    • [DH] libavcodec/svq3.c
    • [DH] libavcodec/vc1dec.c
    • [DH] libavcodec/videodsp.h
    • [DH] libavcodec/videodsp_template.c
    • [DH] libavcodec/vp3.c
    • [DH] libavcodec/vp56.c
    • [DH] libavcodec/vp8.c
    • [DH] libavcodec/vp9.c
    • [DH] libavcodec/wmv2.c
    • [DH] libavcodec/x86/dsputil_mmx.c
    • [DH] libavcodec/x86/videodsp_init.c
  • VLC RTSP HTML5 transcoding

    30 mai 2022, par Pierogi

    I'm trying to get audio streaming on an HTML page from an RTSP server.

    &#xA;

    The RTSP server is the rtsp-simple-server running a command line below.
    &#xA;./rtsp-simple-server rtsp-simple-server.yml.
    &#xA;The configure file is the default.

    &#xA;

    The stream player is FFmpeg running a command line below.
    &#xA;ffmpeg -re -stream_loop -1 -i myaudio.mp3 -c copy -f rtsp -rtsp_transport tcp rtsp://localhost:8554/mystream

    &#xA;

    The console log at the time the rtsp-simple-server and the ffmpeg are started is below.

    &#xA;

    2022/05/29 19:06:38 INF rtsp-simple-server v0.18.4&#xA;2022/05/29 19:06:38 INF [RTSP] listener opened on :8554 (TCP), :8000 (UDP/RTP), :8001 (UDP/RTCP)&#xA;2022/05/29 19:06:38 INF [RTMP] listener opened on :1935&#xA;2022/05/29 19:06:38 INF [HLS] listener opened on :8888&#xA;2022/05/29 19:09:16 INF [RTSP] [conn [::1]:62737] opened&#xA;2022/05/29 19:09:16 INF [RTSP] [session 271690815] created by [::1]:62737&#xA;2022/05/29 19:09:16 INF [RTSP] [session 271690815] is publishing to path &#x27;mystream&#x27;, 1 track with TCP&#xA;

    &#xA;

    And the time the rtsp path(rtsp ://localhost:8554/mystream) is opened by VLC, the contents can be played properly. The additional console log at the time is below.

    &#xA;

    2022/05/29 19:13:19 INF [RTSP] [conn 127.0.0.1:62780] opened&#xA;2022/05/29 19:13:19 INF [RTSP] [session 734209460] created by 127.0.0.1:62780&#xA;2022/05/29 19:13:19 INF [RTSP] [session 734209460] is reading from path &#x27;mystream&#x27;, 1 track with UDP&#xA;2022/05/29 19:13:29 INF [RTSP] [session 734209460] destroyed (teared down by 127.0.0.1:62780)&#xA;2022/05/29 19:13:29 INF [RTSP] [conn 127.0.0.1:62780] closed (EOF)&#xA;2022/05/29 19:13:29 INF [RTSP] [conn 127.0.0.1:62781] opened&#xA;2022/05/29 19:13:29 INF [RTSP] [session 445756113] created by 127.0.0.1:62781&#xA;2022/05/29 19:13:29 INF [RTSP] [session 445756113] is reading from path &#x27;mystream&#x27;, 1 track with TCP&#xA;

    &#xA;

    However, I open the rtsp streaming from the VLC's "Network" tab like below,&#xA;enter image description here

    &#xA;

    and configure the "Stream output" like below,&#xA;enter image description here

    &#xA;

    and I tried to get this streaming from an HTML page like below,

    &#xA;

    &#xA;&#xA;  &#xA;    &#xA;    &#xA;  &#xA;  &#xA;    <h1>transcode test</h1>&#xA;    <audio src="http://localhost:9999/mystream" autoplay="autoplay"></audio>&#xA;  &#xA;&#xA;

    &#xA;

    the browser console displays Failed to load resource: the server responded with a status of 404 (Not found). I've already tried other ports(etc. 8080).

    &#xA;

    So, how can I get the rtsp stream from the RTSP server on an HTML page.&#xA;Any idea ?

    &#xA;

    My environment.

    &#xA;

      &#xA;
    • Browser : Microsoft edge
    • &#xA;

    • OS : MacOS 11.6.5
    • &#xA;

    • rtsp-simple-server : 0.18.4
    • &#xA;

    • FFmpeg : 5.0.1
    • &#xA;

    • VLC : 3.0.17.3
    • &#xA;

    &#xA;

  • Why is the last frame not showing in an MP4 generated by libav ?

    31 octobre 2023, par Ben

    Note : I have a working example of the problem here.

    &#xA;

    I'm using the libav/ffmpeg API to generate an MP4 with the h264 codec. In my specific situation I'm generating the files with a max number of 2 "B" frames. I'm able to generate an Mp4 with the right number of frames so that a single, lone "B" frame is the very last frame being written. When this happens, the encoder sets that frame's packet to be discarded (I've verified this with ffprobe). The net result is that some players (say, when dropping the MP4 into Edge or Chrome) will display only n-1 total frames (ignoring the discarded packet). Other players, such as VLC, will play the full n frames (not ignoring the discarded packet). So, the result is inconsistent.

    &#xA;

    ffmpeg.exe itself doesn't appear to have this problem. Instead, it will set what would be the lone "B" frame to a "P" frame. This means the file will play the same regardless of what player is used.

    &#xA;

    The problem is : I don't know how to mimic ffmpeg's behavior using the SDK so the last frame will play regardless of the player. As far as I can tell I'm closing out the file properly by flushing out the encoder buffers. I must be doing something wrong somewhere.

    &#xA;

    I provided a link to the full source above, but at a high level I'm initializing the codec context and stream like this :

    &#xA;

    newStream->codecpar->codec_id = AV_CODEC_ID_H264;&#xA;newStream->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;&#xA;newStream->codecpar->width = Width;&#xA;newStream->codecpar->height = Height;&#xA;newStream->codecpar->format = AV_PIX_FMT_YUV420P;&#xA;newStream->time_base = { 1, 75 };&#xA;avcodec_parameters_to_context(codecContext, newStream->codecpar);&#xA;&#xA;&#xA;codecContext->time_base = { 1, 75 };&#xA;codecContext->gop_size = 30;&#xA;

    &#xA;

    I then sit in a loop and use OpenCV to generate frames (each frame has its frame number drawn on it) :

    &#xA;

    auto matrix = cv::Mat(Height, Width, CV_8UC3, cv::Scalar(0, 0, 0));&#xA;&#xA;std::stringstream ss;&#xA;ss &lt;&lt; f; &#xA;&#xA;cv::putText(matrix, ss.str().c_str(), textOrg, fontFace, fontScale, cv::Scalar(255, 255, 255), thickness, 8);&#xA;

    &#xA;

    I then write out the frame like this (looping if more data is needed) :

    &#xA;

    if ((ret = avcodec_send_frame(codecContext, frame)) == 0) {&#xA;&#xA;   ret = avcodec_receive_packet(codecContext, &amp;pkt); &#xA;&#xA;   if (ret == AVERROR(EAGAIN))&#xA;   {&#xA;       continue; &#xA;   }&#xA;   else&#xA;   {&#xA;       av_interleaved_write_frame(pFormat, &amp;pkt);&#xA;   }&#xA;   av_packet_unref(&amp;pkt);&#xA;}&#xA;

    &#xA;

    And finally I flush out the file at the end like this :

    &#xA;

    if ((ret = avcodec_send_frame(codecContext, NULL)) == 0)&#xA;{&#xA;  for (;;)&#xA;  {&#xA;     if ((ret = avcodec_receive_packet(codecContext, &amp;pkt)) == AVERROR_EOF)&#xA;     {&#xA;       break;&#xA;     }&#xA;     else&#xA;     {&#xA;       ret = av_interleaved_write_frame(pFormat, &amp;pkt);&#xA;       av_packet_unref(&amp;pkt);&#xA;     }&#xA;  }&#xA;&#xA;  av_write_trailer(pFormat);&#xA;  avio_close(pFormat->pb);&#xA;}&#xA;

    &#xA;

    Yet when I play in Chrome, the player ends on frame 6758,

    &#xA;

    enter image description here

    &#xA;

    And in VLC, the player ends on frame 6759.

    &#xA;

    enter image description here

    &#xA;

    What am I doing wrong ?

    &#xA;