Recherche avancée

Médias (1)

Mot : - Tags -/copyleft

Autres articles (58)

  • 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

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

Sur d’autres sites (11235)

  • Spring content + MPD manifest and Dash.js player [closed]

    31 octobre 2024, par Iupa

    I'm total newbie to video content from web, however I was curious how those things work actually, and I found so far that for web pages there are already js libs which firstly customize the video html tag to support many features like resolution/subtitles/speed etc,secondly they work with specific manifest file as a src for video, it's *.mpd extension and xml format where is described how to play the chunks of video, now in order to generate such manifests I need another libs like ffmpeg that can generate not only manifests but the chunks as well in different resolutions and other tons of settings (kinda crazy ¯_(ツ)_/¯), anyway now I understood that in order to use spring content lib I need to generate all of those during the uploads of files, are there some tutorials/best practices for such ?

    


  • MPD MPEG-DASH - Shows only one bitrate

    13 août 2018, par Justin Rec

    Help. I wont show bitrate.
    player.getBitrateInfoListFor("video") ;
    Shows only one bitrate - 454948

    manifest.mpd generated by GPAC

    <period duration="PT0H21M48.338S">
     <adaptationset segmentalignment="true" group="1" maxwidth="270" maxheight="480" maxframerate="2070000/93437" par="270:480" lang="und">
      <representation mimetype="video/mp4" codecs="avc3.640015" width="270" height="480" framerate="2070000/93437" sar="1:1" startwithsap="1" bandwidth="454948">
       <segmenttemplate media="480_bbb/segment__track1_$Number$.m4s" timescale="2070000" startnumber="1" duration="8280000" initialization="480_bbb/segment__track1_init.mp4"></segmenttemplate>
      </representation>
     </adaptationset>
     <adaptationset segmentalignment="true" group="1" maxwidth="202" maxheight="360" maxframerate="2070000/93437" par="202:360" lang="und">
      <representation mimetype="video/mp4" codecs="avc3.64000D" width="202" height="360" framerate="2070000/93437" sar="1:1" startwithsap="1" bandwidth="281508">
       <segmenttemplate media="360_bbb/segment__track1_$Number$.m4s" timescale="2070000" startnumber="1" duration="8280000" initialization="360_bbb/segment__track1_init.mp4"></segmenttemplate>
      </representation>
     </adaptationset>
     <adaptationset segmentalignment="true" group="1" maxwidth="134" maxheight="240" maxframerate="2070000/93437" par="134:240" lang="und">
      <representation mimetype="video/mp4" codecs="avc3.64000B" width="134" height="240" framerate="2070000/93437" sar="1:1" startwithsap="1" bandwidth="182832">
       <segmenttemplate media="240_bbb/segment__track1_$Number$.m4s" timescale="2070000" startnumber="1" duration="8280000" initialization="240_bbb/segment__track1_init.mp4"></segmenttemplate>
      </representation>
     </adaptationset>
     <adaptationset segmentalignment="true" group="1" maxwidth="80" maxheight="144" maxframerate="2070000/93437" par="80:144" lang="und">
      <representation mimetype="video/mp4" codecs="avc3.640009" width="80" height="144" framerate="2070000/93437" sar="1:1" startwithsap="1" bandwidth="99667">
       <segmenttemplate media="144_bbb/segment__track1_$Number$.m4s" timescale="2070000" startnumber="1" duration="8280000" initialization="144_bbb/segment__track1_init.mp4"></segmenttemplate>
      </representation>
     </adaptationset>
     <adaptationset segmentalignment="true" lang="und">
      <representation mimetype="audio/mp4" codecs="mp4a.40.2" startwithsap="1" bandwidth="66056">
       <audiochannelconfiguration schemeiduri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="1"></audiochannelconfiguration>
       <segmenttemplate media="audio_bbb/segment__track2_$Number$.m4s" timescale="48000" startnumber="1" duration="192000" initialization="audio_bbb/segment__track2_init.mp4"></segmenttemplate>
      </representation>
     </adaptationset>
    </period>

    player.getBitrateInfoListFor("video") ;
    Shows only one bitrate - 454948

  • How to finalize LL-DASH stream MPD file using Shaka Packager [closed]

    11 août, par Arjit

    I'm using Shaka Packager with FFmpeg piping to produce LL-DASH live streams from an NGINX-RTMP input. Streaming works fine, but when the publisher stops streaming, Shaka Player continuously trying to fetch & throws 404 errors for segment files that don’t exist.

    &#xA;

    For example, if the last segment is 29.m4s, the player still tries to fetch :

    &#xA;

    GET http://localhost:8080/dash/stream/480p_30.m4s 404 (Not Found)&#xA;GET http://localhost:8080/dash/stream/720p_31.m4s 404 (Not Found)&#xA;

    &#xA;

    Even though the stream ended at segment 29.

    &#xA;

    Shaka-packager :

    &#xA;

    "$SHAKA_PACKAGER_BIN" \&#xA;  "in=${VIDEO_720P_FIFO},stream=video,format=mp4,init_segment=${STREAM_OUTPUT_DIR}/720p_init.mp4,segment_template=${STREAM_OUTPUT_DIR}/720p_\$Number\$.m4s,bandwidth=3000000,hls_name=720p" \&#xA;  "in=${VIDEO_480P_FIFO},stream=video,format=mp4,init_segment=${STREAM_OUTPUT_DIR}/480p_init.mp4,segment_template=${STREAM_OUTPUT_DIR}/480p_\$Number\$.m4s,bandwidth=1500000,hls_name=480p" \&#xA;  "in=${AUDIO_FIFO},stream=audio,format=mp4,init_segment=${STREAM_OUTPUT_DIR}/audio_init.mp4,segment_template=${STREAM_OUTPUT_DIR}/audio_\$Number\$.m4s,bandwidth=128000,hls_name=audio" \&#xA;  --hls_master_playlist_output "${STREAM_OUTPUT_DIR}/master.m3u8" \&#xA;  --hls_playlist_type LIVE \&#xA;  --mpd_output "${STREAM_OUTPUT_DIR}/manifest.mpd" \&#xA;  --io_block_size 65536 \&#xA;  --segment_duration 2 \&#xA;  --low_latency_dash_mode=true \&#xA;  --utc_timings "urn:mpeg:dash:utc:http-xsdate:2014=http://time.akamai.com/?iso" \&#xA;  --min_buffer_time 1 \&#xA;  --time_shift_buffer_depth 60 \&#xA;  --hls_start_time_offset -2 \&#xA;  --preserved_segments_outside_live_window 10&#xA;

    &#xA;

    FFMPEG :

    &#xA;

    ffmpeg -y -re -i "rtmp://localhost:1935/live/${STREAM_KEY}" \&#xA;-filter_complex \&#xA;"[0:v]split=2[v720][v480]; \&#xA;[v720]scale=w=1280:h=720,setsar=1[v720out]; \&#xA;[v480]scale=w=854:h=480,setsar=1[v480out]; \&#xA;[0:a]aresample=44100[aout]" \&#xA;\&#xA;-map "[v720out]" -c:v libx264 -b:v 3000k -maxrate 3000k -bufsize 6000k -preset veryfast -tune zerolatency -g 60 -keyint_min 60 -sc_threshold 0 \&#xA;-movflags empty_moov&#x2B;default_base_moof -frag_duration 2000000 -f mp4 ${VIDEO_720P_FIFO} \&#xA;-map "[v480out]" -c:v libx264 -b:v 1500k -maxrate 1500k -bufsize 3000k -preset veryfast -tune zerolatency -g 60 -keyint_min 60 -sc_threshold 0 \&#xA;-movflags empty_moov&#x2B;default_base_moof -frag_duration 2000000 -f mp4 ${VIDEO_480P_FIFO} \&#xA;-map "[aout]" -c:a aac -b:a 128k \&#xA;-movflags empty_moov&#x2B;default_base_moof -frag_duration 2000000 -f mp4 ${AUDIO_FIFO} \&#xA;-loglevel info -stats&#xA;

    &#xA;

    To finalize the stream, I have a script that :

    &#xA;

      &#xA;
    • Waits for segments to stop being created
    • &#xA;

    • Sends SIGINT to FFmpeg and Shaka Packager
    • &#xA;

    • Manually appends #EXT-X-ENDLIST to HLS playlists
    • &#xA;

    &#xA;

    Here’s a simplified version of the finalization logic :

    &#xA;

    #!/bin/bash&#xA;exec >> /output/debug.log 2>&amp;1&#xA;&#xA;STREAM_KEY="$1"&#xA;&#xA;FFMPEG_PID_FILE="/output/${STREAM_KEY}_transcoder.pid"&#xA;SHAKA_PID_FILE="/output/${STREAM_KEY}_packager.pid"&#xA;&#xA;VIDEO_720P_FIFO="/output/video_720p.pipe"&#xA;VIDEO_480P_FIFO="/output/video_480p.pipe"&#xA;AUDIO_FIFO="/output/audio.pipe"&#xA;&#xA;HLS_PLAYLISTS_DIR="/output/${STREAM_KEY}"&#xA;&#xA;LAST_COUNT=-1&#xA;STABLE_COUNT=0&#xA;MAX_STABLE=5  # 5 seconds of no new segments&#xA;&#xA;while true; do&#xA;    CURRENT_COUNT=$(ls ${STREAM_OUTPUT_DIR}/*.m4s 2>/dev/null | wc -l)&#xA;    if [ "$CURRENT_COUNT" -eq "$LAST_COUNT" ]; then&#xA;        STABLE_COUNT=$((STABLE_COUNT &#x2B; 1))&#xA;    else&#xA;        STABLE_COUNT=0&#xA;    fi&#xA;&#xA;    if [ "$STABLE_COUNT" -ge "$MAX_STABLE" ]; then&#xA;        echo "No new segments for $MAX_STABLE seconds, safe to finalize."&#xA;        break&#xA;    fi&#xA;&#xA;    LAST_COUNT=$CURRENT_COUNT&#xA;    sleep 1&#xA;done&#xA;&#xA;# Stop Shaka Packager&#xA;if [ -f "$SHAKA_PID_FILE" ]; then&#xA;    SHAKA_PID=$(cat "$SHAKA_PID_FILE")&#xA;    kill -INT $SHAKA_PID&#xA;    echo "Waiting for Shaka Packager process $SHAKA_PID to finish..."&#xA;    while kill -0 $SHAKA_PID > /dev/null 2>&amp;1; do&#xA;        sleep 1&#xA;    done&#xA;    echo "$(date): Killed Shaka Packager PID $SHAKA_PID"&#xA;    rm -f "$SHAKA_PID_FILE"&#xA;fi&#xA;&#xA;# Stop FFmpeg transcoder if still running&#xA;if [ -f "$FFMPEG_PID_FILE" ]; then&#xA;    FFMPEG_PID=$(cat "$FFMPEG_PID_FILE")&#xA;    # kill -SIGINT $FFMPEG_PID&#xA;    kill -9 $FFMPEG_PID&#xA;    echo "Waiting for FFmpeg process $SHAKA_PID to finish..."&#xA;    while kill -0 $FFMPEG_PID > /dev/null 2>&amp;1; do&#xA;        sleep 1&#xA;    done&#xA;&#xA;    echo "$(date): Killed FFmpeg PID $FFMPEG_PID"&#xA;    rm -f "$FFMPEG_PID_FILE"&#xA;fi&#xA;&#xA;&#xA;&#xA;&#xA;for playlist in "$HLS_PLAYLISTS_DIR"/*.m3u8; do&#xA;    if [[ "$(basename "$playlist")" != "master.m3u8" ]]; then&#xA;        echo "#EXT-X-ENDLIST" >> "$playlist"&#xA;    fi&#xA;done&#xA;&#xA;rm -f "$VIDEO_720P_FIFO" "$VIDEO_480P_FIFO" "$AUDIO_FIFO"&#xA;&#xA;echo "$(date): Finalization complete for stream $STREAM_KEY."&#xA;&#xA;

    &#xA;

    shaka-packager wait infinitely when i am sending INT/TERM.

    &#xA;

    Question :

    &#xA;

      &#xA;
    • Why doesn't Shaka Packager finalize the LL-DASH MPD manifest when&#xA;receiving SIGINT ?
    • &#xA;

    • Is there a way to tell Shaka Packager to write the final segments and&#xA;set availabilityEndTime without switching to VOD mode ?
    • &#xA;

    • Should I be doing something manually to flush the last segments or&#xA;finalize the MPD, similar to #EXT-X-ENDLIST in HLS ?
    • &#xA;

    &#xA;

    I only want to gracefully end the stream so Shaka Player doesn't try to fetch non-existent segments, without switching the stream to VOD mode.

    &#xA;