Recherche avancée

Médias (91)

Autres articles (71)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (11087)

  • Where to store the .mpd file on django to play on a dash player ?

    3 janvier 2019, par enigmaVada

    I am trying to build a video player on django. I am using MPEG-DASH for adaptive streaming of the video file. I have chosen a sample video in the beginning. Then, using ffmpeg commands, I have encoded the video into 240p, 360p, 480p and 720p videos. Also have encoded audio separately.

    Then, using mp4box, I have generated the .mpd file. I have read that mpd files cannot be run from the local file system and need to be hosted on a server. I have a dash player setup as follows :

     
       
       
       <code class="echappe-js">&lt;script src=&quot;https://cdn.dashjs.org/latest/dash.all.min.js&quot;&gt;&lt;/script&gt;

    The url in the src field is a random manifest file that i used to test the player out. It works fine.

    Then, on my django project, I have created a media folder which stores the media files uploaded via a form(root included in settings.py).
    My question is where do i store the video, audio and .mpd file so that i can play them using the html code which resides in the templates folder. I have tried using the media url of .mpd file in the source but I am unable to play the video.

    Here is the generated mpd file for reference :

    &lt;?xml version="1.0"?>

    <mpd xmlns="urn:mpeg:dash:schema:mpd:2011" minbuffertime="PT1.500S" type="static" mediapresentationduration="PT0H1M9.869S" maxsegmentduration="PT0H0M9.985S" profiles="urn:mpeg:dash:profile:isoff-on-demand:2011,http://dashif.org/guidelines/dash264">
    <programinformation moreinformationurl="http://gpac.io">
     
    </programinformation>

    <period duration="PT0H1M9.869S">
     <adaptationset segmentalignment="true" lang="und" subsegmentalignment="true" subsegmentstartswithsap="1">
      <representation mimetype="audio/mp4" codecs="mp4a.40.2" audiosamplingrate="44100" startwithsap="1" bandwidth="130920">
       <audiochannelconfiguration schemeiduri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"></audiochannelconfiguration>
       <baseurl>sample_audio_dashinit.mp4</baseurl>
       <segmentbase indexrangeexact="true" indexrange="902-1017">
         <initialization range="0-901"></initialization>
       </segmentbase>
      </representation>
     </adaptationset>
     <adaptationset segmentalignment="true" group="1" maxwidth="426" maxheight="240" maxframerate="30" par="426:240" lang="und" subsegmentalignment="true" subsegmentstartswithsap="1">
      <representation mimetype="video/mp4" codecs="avc1.640015" width="426" height="240" framerate="30" sar="1:1" startwithsap="1" bandwidth="590708">
       <baseurl>sample_video_240_dashinit.mp4</baseurl>
       <segmentbase indexrangeexact="true" indexrange="914-1053">
         <initialization range="0-913"></initialization>
       </segmentbase>
      </representation>
     </adaptationset>
     <adaptationset segmentalignment="true" group="1" maxwidth="640" maxheight="480" maxframerate="30" par="4:3" lang="und" subsegmentalignment="true" subsegmentstartswithsap="1">
      <representation mimetype="video/mp4" codecs="avc1.64001E" width="480" height="360" framerate="30" sar="1:1" startwithsap="1" bandwidth="883873">
       <baseurl>sample_video_360_dashinit.mp4</baseurl>
       <segmentbase indexrangeexact="true" indexrange="914-1053">
         <initialization range="0-913"></initialization>
       </segmentbase>
      </representation>
      <representation mimetype="video/mp4" codecs="avc1.64001E" width="640" height="480" framerate="30" sar="1:1" startwithsap="1" bandwidth="1188712">
       <baseurl>sample_video_480_dashinit.mp4</baseurl>
       <segmentbase indexrangeexact="true" indexrange="913-1052">
         <initialization range="0-912"></initialization>
       </segmentbase>
      </representation>
     </adaptationset>
     <adaptationset segmentalignment="true" group="1" maxwidth="1280" maxheight="720" maxframerate="30" par="16:9" lang="und" subsegmentalignment="true" subsegmentstartswithsap="1">
      <representation mimetype="video/mp4" codecs="avc1.64001F" width="1280" height="720" framerate="30" sar="1:1" startwithsap="1" bandwidth="2365717">
       <baseurl>sample_video_720_dashinit.mp4</baseurl>
       <segmentbase indexrangeexact="true" indexrange="914-1053">
         <initialization range="0-913"></initialization>
       </segmentbase>
      </representation>
     </adaptationset>
    </period>
    </mpd>
  • FFmpeg/DASH : duration or timestamp out of range for mov/mp4 format [closed]

    7 juin, par mike

    I'm trying to convert a aac stream to dash. The issue is that I get a lot of errors as below(though it seems to segment it into multiple files but I get errors on the player too). The question is why do I get these errors and how can I fix it ? If I simply convert "copy" it into to a single mp4 file it works without error.

    &#xA;&#xA;

        ffmpeg -i  "a.mkv" -y -map  0:1 -c:0 copy -min_seg_duration 1000000 &#xA;-use_timeline 1 -use_template 1 -init_seg_name init.mp4s &#xA;-media_seg_name  "\$Number\$.mp4s" -adaptation_sets "id=1,streams=0"&#xA;-remove_at_exit 0  -f dash -dash 1 &#xA;"out/stream.mpd" -loglevel error &#xA;

    &#xA;&#xA;

    Output

    &#xA;&#xA;

    [mp4 @ 0x7fbb70819600] Application provided duration: -32 / timestamp: 40475608 is out of range for mov/mp4 format&#xA;[mp4 @ 0x7fbb70819600] Application provided duration: -32 / timestamp: 40764376 is out of range for mov/mp4 format&#xA;[mp4 @ 0x7fbb70819600] Application provided duration: -32 / timestamp: 40860664 is out of range for mov/mp4 format&#xA;[mp4 @ 0x7fbb70819600] Application provided duration: -32 / timestamp: 41149432 is out of range for mov/mp4 format&#xA;[mp4 @ 0x7fbb70819600] Application provided duration: -32 / timestamp: 41390056 is out of range for mov/mp4 format&#xA;[mp4 @ 0x7fbb70819600] Application provided duration: -32 / timestamp: 41823208 is out of range for mov/mp4 format&#xA;

    &#xA;&#xA;

    Copy to a single MP4 works just fine&#xA; ffmpeg -i "a.mkv" -y -map 0:1 -c:0 copy -f mp4 -dash 1 "out/out.mp4" -loglevel error

    &#xA;&#xA;

    Probe

    &#xA;&#xA;

    ffprobe a.mkv&#xA;ffprobe version 3.4 Copyright (c) 2007-2017 the FFmpeg developers&#xA;  built with Apple LLVM version 9.0.0 (clang-900.0.37)&#xA;  configuration: --prefix=/usr/local/Cellar/ffmpeg/3.4 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma&#xA;  libavutil      55. 78.100 / 55. 78.100&#xA;  libavcodec     57.107.100 / 57.107.100&#xA;  libavformat    57. 83.100 / 57. 83.100&#xA;  libavdevice    57. 10.100 / 57. 10.100&#xA;  libavfilter     6.107.100 /  6.107.100&#xA;  libavresample   3.  7.  0 /  3.  7.  0&#xA;  libswscale      4.  8.100 /  4.  8.100&#xA;  libswresample   2.  9.100 /  2.  9.100&#xA;  libpostproc    54.  7.100 / 54.  7.100&#xA;Input #0, matroska,webm, from &#x27;a.mkv&#x27;:&#xA;  Metadata:&#xA;    encoder         : libebml v1.3.1 &#x2B; libmatroska v1.4.2&#xA;    creation_time   : 2017-03-11T02:56:50.000000Z&#xA;  Duration: 02:12:52.39, start: 0.000000, bitrate: 740 kb/s&#xA;    Chapter #0:0: start 0.000000, end 520.270000&#xA;    Metadata:&#xA;      title           : 00:00:00.000&#xA;    Chapter #0:1: start 520.270000, end 1135.718000&#xA;    Metadata:&#xA;      title           : 00:08:40.270&#xA;    Chapter #0:2: start 1135.718000, end 1703.660000&#xA;    Metadata:&#xA;      title           : 00:18:55.718&#xA;    Chapter #0:3: start 1703.660000, end 2314.187000&#xA;    Metadata:&#xA;      title           : 00:28:23.660&#xA;    Chapter #0:4: start 2314.187000, end 2888.594000&#xA;    Metadata:&#xA;      title           : 00:38:34.187&#xA;    Chapter #0:5: start 2888.594000, end 3499.246000&#xA;    Metadata:&#xA;      title           : 00:48:08.594&#xA;    Chapter #0:6: start 3499.246000, end 4154.692000&#xA;    Metadata:&#xA;      title           : 00:58:19.246&#xA;    Chapter #0:7: start 4154.692000, end 4646.392000&#xA;    Metadata:&#xA;      title           : 01:09:14.692&#xA;    Chapter #0:8: start 4646.392000, end 5373.660000&#xA;    Metadata:&#xA;      title           : 01:17:26.392&#xA;    Chapter #0:9: start 5373.660000, end 5882.085000&#xA;    Metadata:&#xA;      title           : 01:29:33.660&#xA;    Chapter #0:10: start 5882.085000, end 6627.871000&#xA;    Metadata:&#xA;      title           : 01:38:02.085&#xA;    Chapter #0:11: start 6627.871000, end 7144.471000&#xA;    Metadata:&#xA;      title           : 01:50:27.871&#xA;    Chapter #0:12: start 7144.471000, end 7451.944000&#xA;    Metadata:&#xA;      title           : 01:59:04.471&#xA;    Chapter #0:13: start 7451.944000, end 7972.394000&#xA;    Metadata:&#xA;      title           : 02:04:11.944&#xA;    Stream #0:0(eng): Video: h264 (High), yuv420p(tv, bt709/unknown/unknown, progressive), 720x300 [SAR 1:1 DAR 12:5], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)&#xA;    Metadata:&#xA;      title           : X264&#xA;      BPS             : 623765&#xA;      BPS-eng         : 623765&#xA;      DURATION        : 02:12:52.311000000&#xA;      DURATION-eng    : 02:12:52.311000000&#xA;      NUMBER_OF_FRAMES: 191144&#xA;      NUMBER_OF_FRAMES-eng: 191144&#xA;      NUMBER_OF_BYTES : 621606403&#xA;      NUMBER_OF_BYTES-eng: 621606403&#xA;      _STATISTICS_WRITING_APP: mkvmerge v8.3.0 (&#x27;Over the Horizon&#x27;) 64bit&#xA;      _STATISTICS_WRITING_APP-eng: mkvmerge v8.3.0 (&#x27;Over the Horizon&#x27;) 64bit&#xA;      _STATISTICS_WRITING_DATE_UTC: 2017-03-11 02:56:50&#xA;      _STATISTICS_WRITING_DATE_UTC-eng: 2017-03-11 02:56:50&#xA;      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES&#xA;      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES&#xA;    Stream #0:1(eng): Audio: aac (LC), 48000 Hz, stereo, fltp (default)&#xA;    Metadata:&#xA;      BPS             : 114797&#xA;      BPS-eng         : 114797&#xA;      DURATION        : 02:12:52.394000000&#xA;      DURATION-eng    : 02:12:52.394000000&#xA;      NUMBER_OF_FRAMES: 373706&#xA;      NUMBER_OF_FRAMES-eng: 373706&#xA;      NUMBER_OF_BYTES : 114401387&#xA;      NUMBER_OF_BYTES-eng: 114401387&#xA;      _STATISTICS_WRITING_APP: mkvmerge v8.3.0 (&#x27;Over the Horizon&#x27;) 64bit&#xA;      _STATISTICS_WRITING_APP-eng: mkvmerge v8.3.0 (&#x27;Over the Horizon&#x27;) 64bit&#xA;      _STATISTICS_WRITING_DATE_UTC: 2017-03-11 02:56:50&#xA;      _STATISTICS_WRITING_DATE_UTC-eng: 2017-03-11 02:56:50&#xA;      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES&#xA;      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES&#xA;

    &#xA;&#xA;

    Shaka debug

    &#xA;&#xA;

    Assertion failed: This should be an update of the last segment in a period&#xA;shaka.media.SegmentIndex.merge @ segment_index.js:153&#xA;shaka.dash.SegmentTemplate.createStream @ segment_template.js:82&#xA;shaka.dash.DashParser.parseRepresentation_ @ dash_parser.js:1080&#xA;shaka.dash.DashParser.parseAdaptationSet_ @ dash_parser.js:978&#xA;shaka.dash.DashParser.parsePeriod_ @ dash_parser.js:722&#xA;shaka.dash.DashParser.parsePeriods_ @ dash_parser.js:626&#xA;shaka.dash.DashParser.processManifest_ @ dash_parser.js:520&#xA;(anonymous) @ dash_parser.js:431&#xA;Promise resolved (async)&#xA;shaka.dash.DashParser.parseManifest_ @ dash_parser.js:430&#xA;(anonymous) @ dash_parser.js:397&#xA;Promise resolved (async)&#xA;shaka.dash.DashParser.requestManifest_ @ dash_parser.js:390&#xA;shaka.dash.DashParser.onUpdate_ @ dash_parser.js:1161&#xA;setTimeout (async)&#xA;shaka.dash.DashParser.setUpdateTimer_ @ dash_parser.js:1209&#xA;(anonymous) @ dash_parser.js:331&#xA;Promise resolved (async)&#xA;shaka.dash.DashParser.start @ dash_parser.js:329&#xA;(anonymous) @ player.js:555&#xA;Promise resolved (async)&#xA;shaka.util.CancelableChain.then @ cancelable_chain.js:72&#xA;shaka.Player.load @ player.js:499&#xA;initPlayer @ ?x=149&amp;y=88&amp;q=http%3A%2F%2Flocalhost%3A8080%2Fmeta%2F%3FbucketID%3D%2FVolumes%2FTV%2FFa%26channelID%3D%2FVolumes%2FTV%26containerID%3D%2FUsers%2F%2Fbrev%%2FL1ZvbHVtZXMvVFYvRmFudGFzdGljLkJlYXN0cy5hbmQuV2hlcmUudG8uRmluZC5UaGVtLjIwMTYuQkRSaXAueDI2NC1TUEFSS1MvYS5ta3Y%2F97M4TS6IqnQ.mpd:392&#xA;463segment_index.js:145 Refusing to rewrite original references on update!&#xA;shaka.media.SegmentIndex.merge @ segment_index.js:145&#xA;shaka.dash.SegmentTemplate.createStream @ segment_template.js:82&#xA;shaka.dash.DashParser.parseRepresentation_ @ dash_parser.js:1080&#xA;shaka.dash.DashParser.parseAdaptationSet_ @ dash_parser.js:978&#xA;shaka.dash.DashParser.parsePeriod_ @ dash_parser.js:722&#xA;shaka.dash.DashParser.parsePeriods_ @ dash_parser.js:626&#xA;shaka.dash.DashParser.processManifest_ @ dash_parser.js:520&#xA;(anonymous) @ dash_parser.js:431&#xA;Promise resolved (async)&#xA;shaka.dash.DashParser.parseManifest_ @ dash_parser.js:430&#xA;(anonymous) @ dash_parser.js:397&#xA;Promise resolved (async)&#xA;shaka.dash.DashParser.requestManifest_ @ dash_parser.js:390&#xA;shaka.dash.DashParser.onUpdate_ @ dash_parser.js:1161&#xA;setTimeout (async)&#xA;shaka.dash.DashParser.setUpdateTimer_ @ dash_parser.js:1209&#xA;(anonymous) @ dash_parser.js:331&#xA;Promise resolved (async)&#xA;shaka.dash.DashParser.start @ dash_parser.js:329&#xA;(anonymous) @ player.js:555&#xA;Promise resolved (async)&#xA;shaka.util.CancelableChain.then @ cancelable_chain.js:72&#xA;shaka.Player.load @ player.js:499&#xA;initPlayer @ ?x=149&amp;y=88&amp;q=http%3A%2F%2Flocalhost%3A8080%2Fmeta%2F%3FbucketID%3D%2FVolumes%2FTV%2FFa%26channelID%3D%2FVolumes%2FTV%26containerID%3D%2FUsers%2F%2Fbrev%%2FL1ZvbHVtZXMvVFYvRmFudGFzdGljLkJlYXN0cy5hbmQuV2hlcmUudG8uRmluZC5UaGVtLjIwMTYuQkRSaXAueDI2NC1TUEFSS1MvYS5ta3Y%2F97M4TS6IqnQ.mpd:392&#xA;

    &#xA;

  • ffmpeg DASH - Include the stream's width and height (WxH) in the outputted filenames

    20 juillet 2022, par Jarad

    Given this :

    &#xA;

    ffmpeg -i test.mp4 -c:a aac -c:v libx264 ^&#xA;-map v:0 -s:0 960x540 -b:v:0 800k ^&#xA;-map v:0 -s:1 320x170 -b:v:0 300k ^&#xA;-map 0:a ^&#xA;-f dash dash/master.mpd&#xA;

    &#xA;

    Produces this :

    &#xA;

    chunk-stream0-00001.m4s&#xA;chunk-stream0-00002.m4s&#xA;...&#xA;chunk-stream0-00044.m4s&#xA;chunk-stream0-00045.m4s&#xA;chunk-stream1-00001.m4s&#xA;chunk-stream1-00002.m4s&#xA;...&#xA;chunk-stream1-00044.m4s&#xA;chunk-stream1-00045.m4s&#xA;chunk-stream2-00001.m4s&#xA;chunk-stream2-00002.m4s&#xA;...&#xA;chunk-stream2-00074.m4s&#xA;chunk-stream2-00075.m4s&#xA;init-stream0.m4s&#xA;init-stream1.m4s&#xA;init-stream2.m4s&#xA;master.mpd&#xA;

    &#xA;

    Inspection shows : ffprobe master.mpd

    &#xA;

    Input #0, dash, from &#x27;master.mpd&#x27;:&#xA;  Duration: 00:06:11.00, start: -0.021333, bitrate: 0 kb/s&#xA;  Program 0&#xA;  Stream #0:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 960x540 [SAR 1:1 DAR 16:9], 152 kb/s, 30 fps, 30 tbr, 15360 tbn (default)&#xA;    Metadata:&#xA;      variant_bitrate : 300000&#xA;      id              : 0&#xA;  Stream #0:1: Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 320x170 [SAR 17:18 DAR 16:9], 21 kb/s, 30 fps, 30 tbr, 15360 tbn (default)&#xA;    Metadata:&#xA;      variant_bitrate : 28227&#xA;      id              : 1&#xA;  Stream #0:2(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 110 kb/s (default)&#xA;    Metadata:&#xA;      variant_bitrate : 128000&#xA;      id              : 2&#xA;

    &#xA;

    I want output instead like this :

    &#xA;

    chunk-stream0-960x540-00001.m4s&#xA;chunk-stream0-960x540-00002.m4s&#xA;...&#xA;chunk-stream0-960x540-00044.m4s&#xA;chunk-stream0-960x540-00045.m4s&#xA;chunk-stream1-320x170-00001.m4s&#xA;chunk-stream1-320x170-00002.m4s&#xA;...&#xA;chunk-stream1-320x170-00044.m4s&#xA;chunk-stream1-320x170-00045.m4s&#xA;chunk-stream2-???????-00001.m4s&#xA;chunk-stream2-???????-00002.m4s&#xA;...&#xA;chunk-stream2-???????-00074.m4s&#xA;chunk-stream2-???????-00075.m4s&#xA;init-stream0-960x540.m4s&#xA;init-stream1-320x170.m4s&#xA;init-stream2-???????.m4s&#xA;master.mpd&#xA;

    &#xA;

    where ??????? could be just audio or 48000hz or whatever.

    &#xA;

    The Question

    &#xA;

    Is there a way to include the stream's width and height (its size) in the outputted filenames from the command-line interface ? If no, how could it be accomplished using a shell script for example.

    &#xA;