Recherche avancée

Médias (1)

Mot : - Tags -/punk

Autres articles (111)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Les statuts des instances de mutualisation

    13 mars 2010, par

    Pour des raisons de compatibilité générale du plugin de gestion de mutualisations avec les fonctions originales de SPIP, les statuts des instances sont les mêmes que pour tout autre objets (articles...), seuls leurs noms dans l’interface change quelque peu.
    Les différents statuts possibles sont : prepa (demandé) qui correspond à une instance demandée par un utilisateur. Si le site a déjà été créé par le passé, il est passé en mode désactivé. publie (validé) qui correspond à une instance validée par un (...)

  • Librairies et logiciels spécifiques aux médias

    10 décembre 2010, par

    Pour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
    Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...)

Sur d’autres sites (14621)

  • hls fails to play m3u8 playlist with videojs

    9 novembre 2020, par charlie

    I created an hls stream from yuv frames with ffmpeg which appears to work just fine. It creates a playlist and updates that, and all .ts files as expected. However even videojs refuses to play it, and I really run out of ideas, probably missing the obvious ?

    


    First, the m3u8 list which is continuously updated :

    


    #EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:2
#EXT-X-MEDIA-SEQUENCE:190
#EXTINF:2.000000,
test190.ts
#EXTINF:2.000000,
test191.ts
#EXTINF:2.000000,
test192.ts
#EXTINF:2.000000,
test193.ts
#EXTINF:2.000000,
test194.ts


    


    Those .ts files exist and have sizes of approx 250 kBytes.
Then, I open this standard videojs html file (residing in the same directory) :

    


    &#xA;&#xA;&#xA;&#xA;&#xA;&#xA;  &#xA;&#xA;&#xA;  <h1>VSTream</h1>&#xA;&#xA;  &#xA;    <source src="test.m3u8" type="application/x-mpegURL">&#xA;  &#xA;  &#xA;  <code class="echappe-js">&lt;script src='http://stackoverflow.com/feeds/tag/video.min.js'&gt;&lt;/script&gt;&#xA;  &lt;script src='http://stackoverflow.com/feeds/tag/videojs-http-streaming.min.js'&gt;&lt;/script&gt;&#xA;  &#xA;  &lt;script&gt;&amp;#xA;    var player = videojs(&amp;#x27;my_video_1&amp;#x27;);&amp;#xA;  &lt;/script&gt;&#xA;  &#xA;&#xA;&#xA;

    &#xA;

    I open this in Firefox (or Chrome, or Edge, none works) and use its debugger which in the console shows :

    &#xA;

    &#xA;

    VIDEOJS : WARN : A plugin named "reloadSourceOnError" already exists.&#xA;You may want to avoid re-registering plugins ! video.min.js:12:977&#xA;Specified “type” attribute of “application/x-mpegURL” is not&#xA;supported. Load of media resource test.m3u8 failed. vstream.html All&#xA;candidate resources failed to load. Media load paused. vstream.html&#xA;XML Parsing Error : syntax error Location : file :///C :/test/test.m3u8&#xA;Line Number 1, Column 1 : 2 test.m3u8:1:1 MouseEvent.mozPressure is&#xA;deprecated. Use PointerEvent.pressure instead. video.min.js:12:9031&#xA;VIDEOJS : ERROR : (CODE:3 MEDIA_ERR_DECODE) Playback cannot continue. No&#xA;available working or supported playlists. Object code : 3, message :&#xA;"Playback cannot continue. No available working or supported&#xA;playlists." video.min.js:12:977

    &#xA;

    &#xA;

    This doesn't make much sense to me. Why would it throw an XML parsing error for an m3u8 file ? Of course, the MEDIA_ERR_DECODE points in some direction, but the same problem persists with fMP4 files.

    &#xA;

    The relevant ffmpeg c++ code (format is "hls" and formatContext works well in other scenarios, gop is 2) :

    &#xA;

        AVDictionary* options = 0;&#xA;    if (fragmented)&#xA;    {&#xA;        // type&#xA;        if (codecID == AV_CODEC_ID_H264)&#xA;            av_dict_set (&amp;options, "hls_segment_type", "fmp4", 0);&#xA;        else&#xA;            av_dict_set (&amp;options, "hls_segment_type", "mpegts", 0);&#xA;&#xA;        av_dict_set (&amp;options, "hls_time", "2.0", 0);&#xA;        av_dict_set_int (&amp;options, "hls_list_size", 5, 0);&#xA;        av_dict_set (&amp;options, "hls_flags", "delete_segments", 0);&#xA;    }&#xA;&#xA;    int ret = avformat_write_header (formatContext, &amp;options);&#xA;

    &#xA;

    ...which returns success. Then writing frames

    &#xA;

        int ret = avcodec_send_frame (videoStream->codecContext, frame);&#xA;    av_init_packet (avPacket);&#xA;    AVRational timeBase = videoStream->getTimeBase ();&#xA;    avPacket->stream_index = streams.indexOf (videoStream);&#xA;    ret = avcodec_receive_packet (videoStream->codecContext, avPacket);&#xA;    avPacket->duration = av_rescale_q (1, videoStream->codecContext->time_base, videoStream->getTimeBase ());&#xA;    pts &#x2B;= avPacket->duration;&#xA;    avPacket->pts = pts;&#xA;    avPacket->dts = pts;    //  AV_NOPTS_VALUE;&#xA;    ret = av_interleaved_write_frame (formatContext, avPacket);&#xA;

    &#xA;

    (videoStream here is an internal object representing the avstream).&#xA;I've omitted error checks for clarity. All return values show success.&#xA;Thanks for any help on this !

    &#xA;

  • How to convert mp3 to wav from S3 using python lambda

    6 novembre 2020, par SSen

    I am trying to create a python lambda that uploads an mp3 file into an S3 bucket, converts it to wav and then transcripts the wav to text using speech_recognition.

    &#xA;

    Currently, I used os.system(&#x27;ffmpeg -i {} -acodec pcm_s16le -ar 16000 {}.wav&#x27;.format(filename, wav_filename)) to convert the mp3 to wav in local and it downloads the file to the same path as the python file. But it doesn't work in lambda when I try fetching it from S3 and download the converted wav file inside lambda.

    &#xA;

    Here is the current code :

    &#xA;

    import os&#xA;import speech_recognition as sr&#xA;import json&#xA;import boto3&#xA;&#xA;r = sr.Recognizer()&#xA;&#xA;def lambda_handler(event, context):&#xA;&#xA;    s3 = boto3.resource(&#x27;s3&#x27;)&#xA;&#xA;    obj_audio_file = s3.Object(&#x27;s3-bucket-audio-files&#x27;, &#x27;audio-mp3-format.mp3&#x27;) # assuming audio-mp3-format.mp3 already exists in S3&#xA;    body = obj.get()[&#x27;Body&#x27;].read()&#xA;&#xA;    wav_filename = &#x27;audio-wav-format&#x27;&#xA;&#xA;    os.system(&#x27;ffmpeg -i {} -acodec pcm_s16le -ar 16000 {}.wav&#x27;.format(obj_audio_file, actual_filename))&#xA;    audio_file = sr.AudioFile(&#x27;audio-wav-format.wav&#x27;) # new wav file created&#xA;&#xA;    with audio_file as source:&#xA;        r.adjust_for_ambient_noise(source)&#xA;        audio = r.record(source)&#xA;&#xA;    type(audio)&#xA;    print(r.recognize_google(audio))&#xA;

    &#xA;

    I am getting sh: ffmpeg: command not found error when I run the lambda.

    &#xA;

    Could someone please help me with how to fix these issues ?

    &#xA;

  • HTML mp4 Streaming / How can I automatically move the "atom moov" to the beginning of the file ?

    29 octobre 2020, par Einkornwolf

    so I am currently building a Website for School and implemented an Upload-System. Now I want People to be able to watch uploaded Videos. Currently if you try to watch a Video, lets say test.mp4 it takes over a minute to load. I know that using : ffmpeg -i inputvideo.mp4 -movflags faststart -acodec copy -vcodec copy outputvideo.mp4 moves the atom moov to the beginning of the file. And when I manually convert the mp4 using the previous command the file starts playing instantly. But now my problem is, that I don't want to convert each file manually. Is there another way of playing user-uploaded Videos instantly ? Thanks for your help in advance.

    &#xA;

    I am using this Code, but it has nothing to do with the streaming itself I guess :

    &#xA;

      <source src="Clap.mp4" type="video/mp4">&#xA;Your browser does not support the video tag. &#xA;&#xA;</source>

    &#xA;

    I also tried to use a js library :

    &#xA;

      &#xA;&#xA;  &#xA;  <code class="echappe-js">&lt;script src=&quot;https://vjs.zencdn.net/ie8/1.1.2/videojs-ie8.min.js&quot;&gt;&lt;/script&gt;&#xA;&#xA;&#xA;&#xA;  &#xA;    &#xA;    &#xA;    

    &#xA; To view this video please enable JavaScript, and consider upgrading to a&#xA; web browser that&#xA; supports HTML5 video&#xA;

    &#xA; &#xA;&#xA; &lt;script src=&quot;https://vjs.zencdn.net/7.8.4/video.js&quot;&gt;&lt;/script&gt;&#xA;&#xA;

    &#xA;

    In both cases I want to play Clap.mp4

    &#xA;