Recherche avancée

Médias (0)

Mot : - Tags -/xml-rpc

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (19)

  • Les images

    15 mai 2013
  • Pas question de marché, de cloud etc...

    10 avril 2011

    Le vocabulaire utilisé sur ce site essaie d’éviter toute référence à la mode qui fleurit allègrement
    sur le web 2.0 et dans les entreprises qui en vivent.
    Vous êtes donc invité à bannir l’utilisation des termes "Brand", "Cloud", "Marché" etc...
    Notre motivation est avant tout de créer un outil simple, accessible à pour tout le monde, favorisant
    le partage de créations sur Internet et permettant aux auteurs de garder une autonomie optimale.
    Aucun "contrat Gold ou Premium" n’est donc prévu, aucun (...)

  • ANNEXE : Les extensions, plugins SPIP des canaux

    11 février 2010, par

    Un plugin est un ajout fonctionnel au noyau principal de SPIP. MediaSPIP consiste en un choix délibéré de plugins existant ou pas auparavant dans la communauté SPIP, qui ont pour certains nécessité soit leur création de A à Z, soit des ajouts de fonctionnalités.
    Les extensions que MediaSPIP nécessite pour fonctionner
    Depuis la version 2.1.0, SPIP permet d’ajouter des plugins dans le répertoire extensions/.
    Les "extensions" ne sont ni plus ni moins que des plugins dont la particularité est qu’ils se (...)

Sur d’autres sites (3412)

  • FFMPEG PHP enter command lines ?

    3 mai 2019, par Robert

    You will have to excuse me I have been spending the past 2 days reading through old FFMPEG posts for an answer but did little but confuse myself.
    It seems from what I read FFMPEG-PHP wrappers aren’t supported anymore ??? and to be honest they don’t seem like the proper way of learning how to incorporate it with PHP as there is a whole lot more help for command line FFMPEG usage and the FFMPEG-PHP wrapper usage looks nothing like the command line as far as I can tell.

    So I have 2 questions on using ffmpeg with PHP. So we are on the same page I posted a little info below.

    I downloaded FFMPEG static for windows 64bit.
    I then ran (in composer)

         $ composer require php-ffmpeg/php-ffmpeg

    in my vendor folder i have the following path.

       vendor\ffmpeg-20190429-ac551c5-win64-static\bin

    if I open the command prompt in that folder and type FFMPEG I get.

    ffmpeg version N-93710-gac551c54b1 Copyright (c) 2000-2019 the FFmpeg
    developers
    built with gcc 8.3.1 (GCC) 20190414
    configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-
    fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-
    libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --
    enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
    --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --
    enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack
    --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --
    enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-
    libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa
    --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --
    enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-
    nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
    libavutil      56. 26.100 / 56. 26.100
    libavcodec     58. 52.100 / 58. 52.100
    libavformat    58. 27.103 / 58. 27.103
    libavdevice    58.  7.100 / 58.  7.100
    libavfilter     7. 50.100 /  7. 50.100
    libswscale      5.  4.100 /  5.  4.100
    libswresample   3.  4.100 /  3.  4.100
    libpostproc    55.  4.100 / 55.  4.100
    Hyper fast Audio and Video encoder
    usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

    So I’m pretty sure FFMPEG is installed which was my goal.

    Now on my PHP side here is where I am at, and I’m not sure how this works.

    1ST QUESTION. Do I need to save my $_POST files to the drive before manipulating them ? Or can I use the $file and $filep as is ? I don’t really want to store those files, only the output.

    My SLIM code.

    $app->post('/telestrator', function(Request $request, Response $response)
    {

    $response = array();

    if (isset ($_POST['ID']) && ($_POST['position']) && $_FILES['video']
    ['error'] === UPLOAD_ERR_OK && $_FILES['image']['error'] ===
    UPLOAD_ERR_OK) {

    $file = $_FILES['video']['tmp_name'];
    $filep = $_FILES['image']['tmp_name'];
    $time = $_POST['position'];
    $position = msToTime($time);
    $filetime = round(microtime(true) * 1000);
    $outputfolder = 'teletemp/';

    $ID = $_POST['ID'];

    $tempvid = $ID . 'tempvid' . 'mp4';
    $finalvid = $ID  . $filetime . 'mp4';


    $ffmpegpath = "public/ffmpeg.exe";

    echo "Starting ffmpeg...\n\n";
    echo shell_exec("$ffmpegpath -loop 1 -i $filep -c:v libx264 -t 3 -pix_fmt
    yuv420p \"$outputfolder.\" $tempvid /");
    echo shell_exec("$ffmpegpath -i $file -t $position -c copy
    \"$outputfolder\"
    small-1.mp4 -ss $position -codec copy \"$outputfolder\" small-2.mp4 ");
    echo shell_exec("$ffmpegpath -i small-1.mp4 -i $tempvid.mp4 -i small-
    2.mp4 \
    -filter_complex \"[0:v:0][1:v:0][2:v:0]concat=n=3:v=1:a=1[outv]\" \
    -map \"[outv]\" $finalvid" );
    echo "Done.\n";

    $upload = new videouploads();

           $desc = 'telestrated video for ' . $ID . $filetime;
           $ID = $_POST['ID'];  

           if ($upload->saveVideoFile($finalvid, getFileExtension($finalvid),
    $desc, $ID)) {
               $response['error'] = false;
               $response['message'] = 'File Uploaded Successfullly';
           }
        else {
           $response['error'] = true;
           $response['message'] = 'Required parameters are not available';
       }
       echo json_encode($response);
     }
    });

    function getFileExtension($file)
    {
    $path_parts = pathinfo($file);
    return $path_parts['extension'];
    }

    function msToTime($duration) {
    $seconds = floor($duration / 1000);
    $minutes = floor($seconds / 60);
    $hours = floor($minutes / 60);
    $milliseconds = $duration % 1000;
    $seconds = $seconds % 60;
    $minutes = $minutes % 60;

    $format = '%02u:%02u:%02u.%03u';
    $time = sprintf($format, $hours, $minutes, $seconds, $milliseconds);
    return rtrim($time, '0');

    }

    so it’s not running here is my postman. How do I get it to actually run the FFMPEG.

    Starting ffmpeg...

    Done.

    <br />
    <b>Notice</b>:  Undefined index: extension in
    <b>C:\xampp\htdocs\Pathways\public\index.php</b> on line
    <b>14741</b>
    <br />
    {"error":false,"message":"File Uploaded Successfullly"}
  • How to correctly calculate which segments are ready to be downloaded using MPEG-DASH

    24 avril 2019, par igal k

    What i’m trying to do ?

    Write a simple MPEG-DASH client using the SegmentTemplate pattern to calculate which segments are ready to be downloaded for a live source.

    A picture taken using chrome’s debugging tools at a moment X showing an mpd request(8af651fd747.....mpd) and the actual segments fetched respectfully to that request.

    enter image description here

    Given the following MPD

    <mpd availabilitystarttime="2019-04-24T06:43:32Z" maxsegmentduration="PT4.096S" minbuffertime="PT4.096S" minimumupdateperiod="PT15.835S" profiles="urn:mpeg:dash:profile:isoff-live:2011" publishtime="2019-04-24T11:14:01Z" suggestedpresentationdelay="PT11.878S" timeshiftbufferdepth="PT65.536S" type="dynamic" xmlns="urn:mpeg:dash:schema:mpd:2011">
     <location>https://content-aaps1.uplynk.com/channel/8af651fd7473474f86a05ffb0a1c8972.mpd?rmt=wv&amp;amp;cid=8af651fd7473474f86a05ffb0a1c8972&amp;amp;oid=600e5c27541344a1bf3818617ad712ce&amp;amp;prettydash=1&amp;amp;exp=1556091088&amp;amp;rn=4138683939&amp;amp;tc=1&amp;amp;ct=c&amp;amp;sig=5fb7f0c18f3f1d2ad4fdee53c02c1e1ed904bc5e8474f4ebf886d209ff7f21c9&amp;amp;pbs=05b6594bcf4b4728ac1094976a80194d</location>
     <period start="PT2826.240S">
       <adaptationset maxframerate="30" maxheight="720" maxwidth="1280" mimetype="video/mp4" segmentalignment="true" startwithsap="1">
         <representation bandwidth="2604473" codecs="avc1.64001e" framerate="30" height="360" scantype="progressive" width="640">
           <baseurl>https://x-default-stgec.uplynk.com/aapm/slices/8c1/600e5c27541344a1bf3818617ad712ce/8c1027496a964b049f1bd5895f8f0412/</baseurl>
           <segmenttemplate duration="368640" initialization="https://x-default-stgec.uplynk.com/aapm/slices/8c1/600e5c27541344a1bf3818617ad712ce/8c1027496a964b049f1bd5895f8f0412/$RepresentationID$_init.mp4?pbs=05b6594bcf4b4728ac1094976a80194d&amp;amp;_jt=l&amp;amp;chid=8af651fd7473474f86a05ffb0a1c8972" media="$RepresentationID$$Number%08d$.m4f?pbs=05b6594bcf4b4728ac1094976a80194d&amp;amp;_jt=l&amp;amp;chid=8af651fd7473474f86a05ffb0a1c8972" presentationtimeoffset="254361599" startnumber="690" timescale="90000"></segmenttemplate>
         </representation>
       </adaptationset>
     </period>
     <utctiming schemeiduri="urn:mpeg:dash:utc:http-iso:2014" value="https://content-aaps1.uplynk.com/misc/utcservertime"></utctiming>
    </mpd>

    I see that the next segment request should be #3955

    What i have tried so far

       period.end = 1556104456;
       period.start = 2826;
       availability_start_time = 1556088212;
       max_segment_duration = 4;
       time_shift_buffer_depth = 65

    So, first of all, i read DASH-IF-IOP 4.3 section 4.3.4.2 page #82 and implemented the following code :

      int k1 = 1;
    int period_duration = period.end - (period.start + data_.availability_start_time);
    int k2 = ceil((float)period_duration / (float)data_.max_segment_duration);
    double duration = ((float)representation.duration / (float)representation.timeScale);
    size_t live_edge = std::min(
       (int)floor((float)((data_.publish_time - data_.availability_start_time - period.start) / duration)), k2);

    size_t oldest = std::max(k1, (int)floor((float)((data_.publish_time - data_.availability_start_time - period.start -
                                                       data_.time_shift_buffer_depth) /
                                                   duration)));

    after calculating everything : k1=1, k2=3355, live_edge=3272 and oldest=3256

    Also tried using ffmpeg’s dashdec.c

    for min_segment :

    if (c->is_live &amp;&amp; pls->fragment_duration)
       {
           num = pls->first_seq_no + (((get_current_time_in_sec() - c->availability_start_time) - c->time_shift_buffer_depth) * pls->fragment_timescale) / pls->fragment_duration;
       }

    for max_segment :

    num = pls->first_seq_no + (((get_current_time_in_sec() - c->availability_start_time)) * pls->fragment_timescale) / pls->fragment_duration;

    after a small modification :

    size_t pmax = (((data_.publish_time - data_.availability_start_time))) / duration;
    size_t pmin = ((data_.publish_time - data_.availability_start_time) - data_.time_shift_buffer_depth) / duration;

    pmin=3946 pmax=3961

    in the ffmpeg example, i had to manually remove the first_seq_no variable because it looked like i doubled added the SegmentTemplate@StartNumber.

    even after succeeding in this task, how do i exactly build the request list of Segment(NOW) ----> Segment(LIVE_EDGE)

  • Anomalie #4328 : Depots inaccessibles

    7 mai 2019, par Armen Spidermian

    oui j’ai commencé par poser la question sur #spip
    ou l’on m’a invite a ouvrir un ticket ^^

    a écrit :

    La demande #4328 <https://core.spip.net/issues/4328#change-14931> a
    été mise à jour par b b.

    Dans ce cas je t’invite à poser la question sur la liste spip-zone ou
    passer sur http://irc.spip.net/ pour en discuter.


    Anomalie #4328 : Depots inaccessibles
    <https://core.spip.net/issues/4328#change-14931>

    • Auteur : Armen Spidermian
    • Statut : Fermé
    • Priorité : Normal
    • Assigné à :
    • Catégorie :
    • Version cible :
    • Resolution : invalid
    • Navigateur :

    Spip refuse de se connecter au dépot.

    2019-05-06 13:50:01 78.230.118.204 (pid 7481) :Pri:ERREUR : Erreur
    connexion
    2019-05-06 13:50:02 78.230.118.204 (pid 7481) :Pri:ERREUR : Erreur
    connexion
    2019-05-06 13:50:02 78.230.118.204 (pid 7481) :Pri : !INFO : copie_locale
     : Echec recuperation https://plugins.spip.net/depots/principal.xml sur
    ../IMG/distant/xml/principalxml2fdc.xml status : 0

    Je n’arrive pas a comprendre d’ou ca vient...

    Fichiers ErreurSpip.png
    <https://core.spip.net/attachments/download/1083/ErreurSpip.png> (84,9 ko)


    Vous recevez ce mail car vous êtes impliqués sur ce projet.
    Pour changer les préférences d’envoi de mail, allez sur
    http://core.spip.net/my/account