Recherche avancée

Médias (16)

Mot : - Tags -/mp3

Autres articles (63)

  • 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 de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (8094)

  • 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>
  • Container does not reflect MediaReader setting

    8 mars 2014, par Mondain

    I would like my reader to be able to handle audio, when it does not start with the video ; hence the setting of "AddDynamicStreams". How do I get the container to recognize the setting of the reader from which it originated ? Is there a flag or some other property that I need to set ?

    String inputUrl = "rtmp://127.0.0.1:1935/myapp/mystream live=1 buffer=1";
    IMediaReader reader = ToolFactory.makeReader(inputUrl);
    reader.setCloseOnEofOnly(false);
    reader.setQueryMetaData(false);
    // we want dynamic addition of streams
    reader.setAddDynamicStreams(true);
    // this shows "true"
    log.debug("Reader can dynamically add streams: {}", reader.canAddDynamicStreams());
    // get the container
    IContainer container = reader.getContainer();
    // this shows "false"
    log.debug("Container can dynamically add streams: {}", container.canStreamsBeAddedDynamically());
  • What the correct args for ffmpeg conversion

    8 novembre 2013, par Andrew Simpson

    I have a C# app. I am using ffmpge to convert jpgs to an OGG file. I use the process class to write to a stream buffer within my app using piping without having to write the ogg file to a disk. I then upload these bytes to my server where it is written to the hard drive.

    On the server side I want to convert it to say an mp4 format. Again, I want to pipe it out to a stream buffer and allow my User to download the file.

    This is my code :

    Process _serverBuild = null ;

    public byte[] EncodeAndUploadImages(string _args1)
    {
       byte[] _data = null;
       try
       {
           _args1 = "ffmpeg.exe -i \"c:\\Cloud\\Zipped\\000EC902F17F\\f3e45e44-b61c-472b-8dc1-a8e9b9511497_00007.ogg\" avi -";
           _serverBuild = new Process();

           _serverBuild.StartInfo.WorkingDirectory = Environment.CurrentDirectory;
           _serverBuild.StartInfo.Arguments = _args1;
           _serverBuild.StartInfo.FileName =  @"C:\inetpub\wwwroot\bin\ffmpeg.exe";
           _serverBuild.StartInfo.UseShellExecute = false;
           _serverBuild.StartInfo.RedirectStandardOutput = true;
           _serverBuild.StartInfo.RedirectStandardError = true;
           _serverBuild.StartInfo.RedirectStandardInput = true;
           _serverBuild.StartInfo.CreateNoWindow = true;
           _serverBuild.StartInfo.LoadUserProfile = false;
           _serverBuild.ErrorDataReceived += _server_ErrorDataReceived;
           _serverBuild.OutputDataReceived += _server_OutputDataReceived;
           _serverBuild.Exited += new EventHandler(_server_Exited);
           _serverBuild.EnableRaisingEvents = true;
           _serverProcessHasFinished = false;
           _serverBuild.Start();

           mStandardOutput = _serverBuild.StandardOutput.BaseStream;
           mStandardOutput.BeginRead(mReadBuffer, 0, mReadBuffer.Length, StandardOutputReadCallback, null);            
           _serverBuild.WaitForExit();




       }
       catch (Exception _ex)
       {

       }
       finally
       {
           _serverBuild.ErrorDataReceived -= _server_ErrorDataReceived;
           _serverBuild.OutputDataReceived -= _server_OutputDataReceived;
           _serverBuild.Dispose();
       }
       return _data;
    }

    byte[] mReadBuffer = new byte[4096];
    MemoryStream mStandardOutputMs = new MemoryStream();
    Stream mStandardOutput;

    private void StandardOutputReadCallback(IAsyncResult ar)
    {
       try
       {
           int numberOfBytesRead = mStandardOutput.EndRead(ar);
           {
               mStandardOutputMs.Write(mReadBuffer, 0, numberOfBytesRead);
               mStandardOutput.BeginRead(mReadBuffer, 0, mReadBuffer.Length, StandardOutputReadCallback, null);
           }
       }
       catch (Exception _ex)
       {

       }
    }

    The error I get (when I test with a bat file and run within a DOS prompt) is :

    enter image description here

    Obviously my parameters are at fault. I want to keep it simple as I may want to use other formats apart from MP4.

    Thanks