Advanced search

Medias (2)

Tag: - Tags -/documentation

Other articles (111)

  • Le profil des utilisateurs

    12 April 2011, by

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 November 2010, by

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • XMP PHP

    13 May 2011, by

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

On other websites (10729)

  • What are the APIs for hardware accelerated video decoding in phones?

    11 January 2012, by cloudraven

    I have seen many smartphones coming with hardware accelerated video decoding supporting mpeg2 and h264, but unlike in desktop and laptop systems, it is not clear to me how to interact with the hardware acceleration.
    For desktops/laptops there is DXVA, VDPAU and OpenMax.
    Is any of those supported in Mobile phones? I think OpenMax is, but I am not sure of how widely supported it is.

    Is anyone familiar with what is usually used to write hardware accelerated media players and decoders for platforms like Snapdragon, Tegra 2 or Omap 4 running Android or Windows Phone?
    I know that ffmpeg can be compiled for arm and I wonder what kind of hardware video acceleration it supports on that platform.

  • How to add a token verification in url with Laravel when playing HLS videos?

    31 March 2022, by Philip

    I have been playing with Laravel and FFMPEG for few weeks but got stuck. Hope someone could help here. Thank you in advanced.

    


    Background

    


    I have a video website build with Laravel 9. I use FFMPEG to convert uploaded MP4 to HLS with laravel-ffmpeg package. AES encryption is applied. Then I store the converted m3u8 playlist, key and ts file in Storage path with symlinks created to public folder. I stored the path in database and call it in view file. I use plyr + hls.js to play the video. Everything is working fine.

    


    However, I would like to further protect my videos from being played by other website. I blocked the cross domain access in Nginx but seem it only check the referrer which could be faked. I can see many video websites that their m3u8 path contains a token parameter:

    


    https://some-domain.com/videos/index.m3u8?token=abc123456


    


    I am trying to do the same but stuck.

    


    These are my Laravel files

    


    VideoController

    


    This will convert mp4 to m3u8 , key, ts files and save to database

    


    FFMpeg::fromDisk('videos')
    ->open($queue->path)
    ->exportForHLS()
    ->withRotatingEncryptionKey(function($filename,$content) use($queue){
        Storage::disk('videos')->put('m3u8/'.$queue->video->slug.'/'.$filename, $content);
    })
    ->setSegmentLength(10) // optional
    ->setKeyFrameInterval(48) // optional
    ->onProgress(function ($percentage, $remaining, $rate) use($queue){
        $queue->update([
            'is_processing'=>true,
            'percentage'=>$percentage,
            'remaining'=>$remaining,
            'rate'=>$rate,
        ]);
    })
    ->addFormat($resolution_720)
    ->save($m3u8_path);


    


    blade file

    


    This will show the m3u8 playlist path and pass to js file

    


    @if (isset($video->play_url)  &amp;&amp; $video->play_url != &#x27;&#x27;)&#xA;    <div class="col-12 mb-3 single-video">&#xA;        <video playsinline="playsinline" controls="controls" muted="muted">&#xA;&#xA;        </video>&#xA;        <code class="echappe-js">&lt;script&gt; &amp;#xA;            var m3u8 = &quot;{{ $video-&gt;play_url }}&quot; &amp;#xA;            var token = &amp;#x27;token_xxxxxxxx&amp;#x27;&amp;#xA;        &lt;/script&gt;&#xA;    

    &#xA;@endif&#xA;

    &#xA;

    js file

    &#xA;

    This will play the video (with plyr player)

    &#xA;

    const player = new Plyr(&#x27;#player&#x27;);&#xA;if(typeof(m3u8) != "undefined" &amp;&amp; m3u8 !== null){&#xA;    m3u8 =  m3u8 &#x2B; &#x27;?token=&#x27; &#x2B; token&#xA;    console.log(m3u8,token)&#xA;    var video = document.getElementById(&#x27;player&#x27;);&#xA;    if(Hls.isSupported()) {&#xA;        var hls = new Hls();&#xA;        hls.loadSource(m3u8);&#xA;        hls.attachMedia(video);&#xA;&#xA;    }else if (video.canPlayType(&#x27;application/vnd.apple.mpegurl&#x27;)) {&#xA;        video.src = m3u8;&#xA;&#xA;    }&#xA;&#xA;}&#xA;

    &#xA;

    If I remove "token" from the above code. The video plays fine. But now I could like to check if the token valid before returning the file. I remove the symlink to prevent direct access to the file.

    &#xA;

    public_path(&#x27;m3u8&#x27;) => storage_path(&#x27;app/videos/m3u8&#x27;),&#xA;

    &#xA;

    Route

    &#xA;

    in web.php, I added few routes to check the token

    &#xA;

        Route::get(&#x27;/m3u8/{slug}/{filename}.m3u8&#x27;, [VideoController::class, &#x27;get_m3u8&#x27;])->name(&#x27;video.m3u8&#x27;);&#xA;    Route::get(&#x27;/m3u8/{slug}/{filename}.ts&#x27;, [VideoController::class, &#x27;get_ts&#x27;])->name(&#x27;video.ts&#x27;);&#xA;    Route::get(&#x27;/m3u8/{slug}/{filename}.key&#x27;, [VideoController::class, &#x27;get_key&#x27;])->name(&#x27;video.key&#x27;);&#xA;

    &#xA;

    Then in VideoController

    &#xA;

    public function get_m3u8(Request $request ,$slug ,$filename)&#xA;{&#xA;        if($request->token == 123){&#xA;            return response()->file(storage_path(&#x27;app/videos/m3u8/&#x27;.$slug.&#x27;/&#x27;.$filename .&#x27;.m3u8&#x27;),[&#xA;                &#x27;Content-Type&#x27; => &#x27;application/x-mpegURL&#x27;,&#xA;            ]);&#xA;        }else{&#xA;            return abort(&#x27;403&#x27;);&#xA;        }&#xA;}&#xA;

    &#xA;

    But the video cannot be played. Because when loading index.m3u8, it loads index_0_1200.m3u8 next and then load the rest of ts files which all do not contain the token. But I cannot add to token duration the conversion from mp4 to hls because in actually case the token will be dynamic such as adding timestamp.

    &#xA;

    Please advise. Thank you. My final aim is to prevent other from using the m3u8 playlist and key files to play my ts files. It will consume a lot of bandwidth.

    &#xA;

  • add custom ffmpeg avfilter in mlt [closed]

    5 February 2023, by Shivam gupta

    I created one custom filter under av filter and added it into ffmpeg.&#xA;I build the ffmpeg and in ffmpeg its working fine and visible in ffmpeg filter list.

    &#xA;

    Now I tried to build mlt with this custom ffmpeg. mlt build successfully.&#xA;I checked in mlt filters but it is not available.

    &#xA;

    On investigating I found in mlt there is no avfilter available which can take 2 videos as input.&#xA;As my filter also takes 2 videos as input and apply some filter and output one video that's why it's not available.

    &#xA;

    Now I want to know

    &#xA;

      &#xA;
    1. Why mlt is not supporting multiple input av filters ?
    2. &#xA;

    3. Where in code mlt restricted it.
    4. &#xA;

    5. What is the best way to add this filter ?
    6. &#xA;

    &#xA;

  • SPIP Compass

    SPIP.net-Official SPIP documentation and download SPIP Code-Technical coding reference of SPIP Programming with SPIP-Documentation for developing with (...) Translate SPIP-Translation area for SPIP and its (...) SPIP Plugins-SPIP Plugins Directory SPIP-Contrib-SPIP contribution area SPIP Forge-The development area for SPIP and its (...) Discussing SPIP-The new SPIP community forums SPIP Party-Agenda of the SPIP meetings SPIP Media-SPIP media library SPIP Syntax-Test text editing in SPIP