Recherche avancée

Médias (91)

Autres articles (62)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, 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 (...)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

Sur d’autres sites (6311)

  • How can I fix a audio delay caused by a batch trim of the start and end of a video file

    15 mai 2019, par trozz

    When using this ffmpeg batch trimmer I found on here - will be posted down below in "show code" Tried to format it correctly, but I’m new here so.

    It causes the audio to be delayed by 100 milliseconds. Is there a way to fix this in the same bat file, or maybe after with another edit ?

    Thanks

    @Echo Off
    SetLocal

    Set "ext=mp4"

    Set "opts=-v quiet"

    Set "opts=%opts% -print_format "compact=print_section=0:nokey=1:escape=csv"

    Set "opts=%opts% -show_entries "format=duration""

    If Exist *.%ext% (If Not Exist "Trimmed\" MD Trimmed)

    For %%a In (*.%ext%) Do Call :Sub "%%~a"

    Exit/B

    :Sub

    For /f "Tokens=1* Delims=." %%a In (
       'FFProbe %opts% %1') Do (Set/A "ws=%%a-7.85" & Set "ps=%%b")

    rem If %ws% Lss 20 GoTo :EOF

    Set/A hh=ws/(60*60), lo=ws%%(60*60), mm=lo/60, ss=lo%%60

    If %hh% Lss 10 Set hh=0%hh%

    If %mm% Lss 10 Set mm=0%mm%

    If %ss% Lss 10 Set ss=0%ss%

    FFMpeg -i %1 -ss 00:00:04.5000 -to %hh%:%mm%:%ss%.%ps:~,3% -c:v copy -c:a copy "Trimmed\%~1"
  • Why aren't the videos in my S3 bucket buffering to html video tag ?

    2 juin 2019, par Michael Cain

    I have so far successfully programmed a node script on a Udoo x86 advanced plus that captures an Ethernet connected IP cam’s RTSP stream. I use ffmpeg to trans-code the stream into 5 second mp4 files. As soon as the files show up in the folder they are uploaded/synced to my AWS S3 Bucket. Next I have a Node server that GET’s the most recently created mp4 file from the S3 bucket and runs it through mediasource extension and finally to an html video tag.

    The videos are playing on the browser but not in any kind of synchronous manner. No buffering seems to be taking place. one video plays then another and so on. Video is skipping all over the place.

    I would really appreciate any guidance with this bug.

    export function startlivestream() {
     const videoElement = document.getElementById("my-video");
     const myMediaSource = new MediaSource();
     const url = URL.createObjectURL(myMediaSource);
     videoElement.src = url;
     myMediaSource.addEventListener("sourceopen", sourceOpen);
    }
    function sourceOpen() {
     if (window.MediaSource.isTypeSupported(
         'video/mp4; codecs="avc1.42E01E, mp4a.40.2"'
       )
     )
    {
          console.log("YES");
     }

    // 1. add source buffers

     const mediaCodec = 'video/mp4; codecs="avc1.4D601F"';
     var mediasource = this;
     const videoSourceBuffer = mediasource.addSourceBuffer(mediaCodec);

    // 2. download and add our audio/video to the SourceBuffers

    function checkVideo(url) {
     var oReq = new XMLHttpRequest();
       oReq.open("GET", url, true);
       oReq.responseType = "arraybuffer";

        oReq.onload = function(oEvent) {
         var arrayBuffer = oReq.response; // Note: not oReq.responseText
         if (arrayBuffer) {
            videoSourceBuffer.addEventListener("updateend", function(_) {
              mediasource.endOfStream();
              document.getElementById("my-video").play();
      });
              videoSourceBuffer.appendBuffer(arrayBuffer);
         }
       };

       oReq.send(null);
     }

     setInterval(function() {
       checkVideo("http://localhost:8080");
     }, 5000);

    My ffmpeg tags :

    const startRecording = () => {
     const args = [
       "-rtsp_transport",
       "tcp",
       "-i",
       inputURL,
       "-f",
       "segment",
       "-segment_time",
       "5",
       "-segment_format",
       "mp4",
       "-segment_format_options",
       "movflags=frag_keyframe+empty_moov+default_base_moof",
       "-segment_time",
       "5",
       "-segment_list_type",
       "m3u8",
       "-c:v",
       "copy",
       "-strftime",
       "1",
       `${path.join(savePath, "test-%Y-%m-%dT%H-%M-%S.mp4")}`
     ];

    From what I have learned about Mediasource extensions they allow multiple videos to be taken in and allow the client to buffer them so it looks like one longer video. In simple terms.

  • Adaptive part in MPD using MP4box

    28 janvier 2019, par enigmaVada

    I have used ffmpeg to encode audio and video files of my video sample.mp4 for the dash player. The commands are as follows :

    ffmpeg -i sample.mp4 -s 426x240 -c:v libx264 -b:v 640k -g 90 -an sample_video_240.mp4
    ffmpeg -i sample.mp4 -s 480x360 -c:v libx264 -b:v 960k -g 90 -an sample_video_360.mp4
    ffmpeg -i sample.mp4 -s 640x480 -c:v libx264 -b:v 1280k -g 90 -an sample_video_480.mp4
    ffmpeg -i sample.mp4 -s 1280x720 -c:v libx264 -b:v 2560k -g 90 -an sample_video_720.mp4

    ffmpeg -i sample.mp4 -c:a aac -b:a 128k -vn sample_audio.mp4

    I have generated 240p,360p,480p and 720p videos and audio file.

    Then I have used mp4box to generate the mpd file using the following command :

    mp4box -dash 10000 -rap -profile dashavc264:onDemand -mpd-title BBB -out sample.mpd -frag 5000 sample_audio.mp4 sample_video_240.mp4 sample_video_360.mp4 sample_video_480.mp4 sample_video_720.mp4

    I am using the dash.js player to play the video. The problem is, the adaptive part of DASH isn’t working. The player is just using the 240p video and not switching to a better format even if proper bandwidth is available. I am checking using the network tab of chrome dev tools.

    What am i doing wrong ? Please help.

    Here is the mpd file for reference :

    <?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>