Recherche avancée

Médias (1)

Mot : - Tags -/stallman

Autres articles (109)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • 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.

  • 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 (14715)

  • FFmpeg - Rotating at angle

    23 septembre 2017, par connor

    I’ve been working through FFmpeg, but I have been unable to get a rotation to run from the examples they have on their site. I am trying to "wiggle" a video back and forth at a fixed point on the bottom - think a head moving left to right (and so on).

    I am attempting to do this with the filter "rotate" (https://ffmpeg.org/ffmpeg-filters.html#rotate). Attempting to use their examples, I get an error.

    This is what I have so far :

    ffmpeg -i vid1.mp4 -i vid2.mov -loop 1 -i image.png -filter_complex "\
       [2:v]alphaextract, scale=240x160[mask];\
       [0:v] scale=240x160, rotate=A*sin(2*PI/T*t) [ascaled];\
       [ascaled][mask]alphamerge[masked];\
       [1:v]scale=480x360[background];\
       [background][masked]overlay=120:20"\
       -c:a copy 65B6354F61B4AF02_HD_sq.MOV

    I am using "rotate" directly from an example in an attempt to get something to run at all.

    The error I get back is :

    [Parsed_rotate_3 @ 0x7ff4476045e0] [Eval @ 0x7fff5b3e3f00] Undefined constant or missing '(' in 'T*t)'
    [Parsed_rotate_3 @ 0x7ff4476045e0] Error occurred parsing angle expression 'A*sin(2*PI/T*t)'
    [Parsed_rotate_3 @ 0x7ff4476045e0] Failed to configure output pad on Parsed_rotate_3
    Error reinitializing filters!
    Failed to inject frame into filter network: Invalid argument
    Error while processing the decoded data for stream #1:0

    If I remove ’A’, ’T’, ’sin’, etc, rotate does actually work, but far from the desired behavior.

    Am I missing something to expose those params ?

  • Transcoding video server. FFMPEG. Queues

    2 janvier 2018, par kostia7alania

    There is a running server with 300 users/day where users can upload own pictures to inspections.
    Now need to add video share service with sharing pictures.

    Now we use :
    1) IIS 10 (yes, WINDOWS server !) ;
    2) MS SQL 2017 ;
    3) PHP 7.0.
    and : asp.net,xlt 1,C#.

    It is desirable that we use the technologies we already use.

    Now I buy one new server and want to use it for transcoding and streaming.

    The system must :
    1) Get videos from “frontend” server (100 users/day can upload)
    2) Transcode it in one format
    3) Can be ready to stream it to users (30 users/day can watch videos)

    See my little review about possible solutions —>> https://vk.com/topic-125614288_363361445

    IMAGE => Video uploading, transcoding and keeping system

    p.s. I found FFMPEG, but don’t know how it works in parallel mode.
    Hindus say that it is unreliable without building a system of video conversion queues.

    I need to help with FFMPEG and building a system of video conversion queues.

    UPD : HERE IS MY EXAMPLE CODE :

       

       
           
           
           <?php require ('dbconn.php');?>
       
           <code class="echappe-js">&lt;script src='http://stackoverflow.com/feeds/tag/js/jquery.js' type=&quot;text/javascript&quot;&gt;&lt;/script&gt;

    &lt;script src='http://stackoverflow.com/feeds/tag/js/bootstrap.js' type=&quot;text/javascript&quot;&gt;&lt;/script&gt;



    < ?php if(isset($_FILES[’file’])) $name = $_FILES[’file’][’name’] ; $extension = explode(’.’, $name) ; $extension = end($extension) ; $type = $_FILES[’file’][’type’] ; $size = $_FILES[’file’][’size’] /1024/1024 ; $random_name = rand() ; $tmp = $_FILES[’file’][’tmp_name’] ; if (empty($_POST["descript"])) $descript = "" ; else $descript = ($_POST["descript"]) ;

    if ((strtolower($type) != "video/mpg") &&
    (strtolower($type) != "video/wma") &&
    (strtolower($type) != "video/mov") &&
    (strtolower($type) != "video/flv") &&
    (strtolower($type) != "video/mp4") &&
    (strtolower($type) != "video/avi") &&
    (strtolower($type) != "video/qt") &&
    (strtolower($type) != "video/wmv") &&
    (strtolower($type) != "video/wmv") )

    $message="Video Format Not Supported !" ;
    else
    $message="Video uploaded successively !" ;
    move_uploaded_file($tmp, ’./upload/’.$random_name.’.’.$extension) ;
    //$conn->query("INSERT INTO [dbo].[videos] VALUES(’$name’,’$random_name.$extension’,’descript !’)") ;

    $SQL2 = "INSERT INTO [dbo].[videos] VALUES(’$name’,’$random_name.$extension’,’$descript’)" ;
    $RES2 = @odbc_exec( $DB, $SQL2 ) ;

     ?>
    < ?php
    echo "&lt;script type='text/javascript'&gt;alert('$descript\\n\\n$message\\n\\nUpload: $name\\nSize: $size\\nType: $type\\nStored in: uploads/$name');&lt;/script&gt;" ;
     ?>

    < ?php

     ?>

    Select a Video :



    &nbsp ;&nbsp ;&nbsp ;&nbsp ;


    List of Videos :

      < ?php //$query = $conn->query("SELECT * FROM videos") ; $SQL = "SELECT * FROM [dbo].[videos]" ; $RES = @odbc_exec( $DB, $SQL ) ; //while($row = $RES->fetch()) while($row = odbc_fetch_array($RES)) $video_id = $row[’video_id’] ;  ?>

      Click to Watch --->

      < ?php
      echo $row[’title’] ;
       ?>


      < ?php include (’video_modal.php’) ; ?>
      < ?php

       ?>

    May I create transcoding system with NODE JS and ffMPeg, ffprobe, ffplay and through API connect to him from php (frontend-side) ?

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

    &#xA;

    First, the m3u8 list which is continuously updated :

    &#xA;

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

    &#xA;

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

    &#xA;

    &#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;