Recherche avancée

Médias (91)

Autres articles (32)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

Sur d’autres sites (4529)

  • Error while installing ffmpeg on standalone computer

    10 juillet 2018, par newuser

    I am trying to install libx264 and ffmpeg on a computer without internet access
    My plan is to first download all required packages and dependencies on a laptop with internet and then copy them over
    To download the packages I used :

    apt-get download $(apt-rdepends <package>|grep -v "^ ")
    </package>

    I was able to install yasm, libvpx and libx264 without issues this way.
    When I try to install ffmpeg, I get this error.

    The following packages have unmet dependencies:
    chromium-codecs-ffmpeg-extra-dbg : Depends: chromium-codecs-ffmpeg-extra (= 51.0.2704.79-0ubuntu0.16.04.1.1242) but 66.0.3359.181-0ubuntu0.16.04.1 is installed
    ffmpeg-dbg : Depends: ffmpeg (= 7:2.8.14-0ubuntu0.16.04.1)
    ffmpeg-doc : Depends: libjs-bootstrap but it is not installed
    ffmpeg2theora : Depends: liboggkate1 (>= 0.3.0) but it is not installed
    ffmpegthumbs : Depends: libkf5kiowidgets5 (>= 4.99.0) but it is not installed
    kffmpegthumbnailer : Depends: libkio5 (>= 4:4.3.4) but it is not installed
    moc-ffmpeg-plugin : Depends: moc (= 1:2.6.0~svn-r2788-1) but it is not installed

    where do I get these packages from ? I dont want apt-get to download them for me as I want to be able to get the package files.

  • play video with secure link in laravel ffmpeg

    1er mars 2023, par abc abc

    I convert my video file to m3u8 with ffmpeg and upload in download host.&#xA;I have no problem when I want to display Blade in Laravel without a secure link.

    &#xA;

    Now, I am asking my friends to help me display those videos using a safe link, something like this link :

    &#xA;

    https://dl4.your-domain.com/stream.m3u8?path=path-to-your-video-of-m3u8&expires=1677764366&signature=3e302aedefa62b4414beba4957927afa

    &#xA;

    I did it myself without a secure link and got the output.&#xA;These are the routes I defined :

    &#xA;

    Route::get(&#x27;/video/secret/{key}&#x27;, function ($key) {&#xA;    return Storage::disk(&#x27;secrets&#x27;)->download(&#x27;29/&#x27; . $key);&#xA;})->name(&#x27;video.key&#x27;);&#xA; &#xA;Route::get(&#x27;/video/{playlist}&#x27;, function ($playlist) {&#xA;    return FFMpeg::dynamicHLSPlaylist()&#xA;        ->fromDisk(&#x27;static&#x27;)&#xA;        ->open("stream/video/29/{$playlist}")&#xA;        ->setKeyUrlResolver(function ($key) {&#xA;            return route(&#x27;video.key&#x27;, [&#x27;key&#x27; => $key]);&#xA;        })&#xA;        ->setMediaUrlResolver(function ($mediaFilename) {&#xA;            return Storage::disk(&#x27;static&#x27;)->url("stream/video/29/{$mediaFilename}");&#xA;        })&#xA;        ->setPlaylistUrlResolver(function ($playlistFilename) {&#xA;            return route(&#x27;video.playlist&#x27;, [&#x27;playlist&#x27; => $playlistFilename]);&#xA;        });&#xA;})->name(&#x27;video.playlist&#x27;);&#xA;

    &#xA;

    This is the source of the video :

    &#xA;

    <code class="echappe-js">&lt;script src=&quot;https://cdn.rawgit.com/video-dev/hls.js/18bb552/dist/hls.min.js&quot;&gt;&lt;/script&gt;&#xA;    &lt;script&gt;&amp;#xA;        document.addEventListener(&amp;#x27;DOMContentLoaded&amp;#x27;, () =&gt; {&amp;#xA;            const source = &quot;{{ route(&amp;#x27;video.playlist&amp;#x27;, [&amp;#x27;playlist&amp;#x27; =&gt; &amp;#x27;29.m3u8&amp;#x27;]) }}&quot;;&amp;#xA;            const video = document.querySelector(&amp;#x27;#video&amp;#x27;);&amp;#xA; &amp;#xA;            const defaultOptions = {};&amp;#xA; &amp;#xA;            if (!Hls.isSupported()) {&amp;#xA;                video.src = source;&amp;#xA;                var player = new Plyr(video, defaultOptions);&amp;#xA;            } else {&amp;#xA;                // For more Hls.js options, see https://github.com/dailymotion/hls.js&amp;#xA;                const hls = new Hls();&amp;#xA;                hls.loadSource(source);&amp;#xA; &amp;#xA;                // From the m3u8 playlist, hls parses the manifest and returns&amp;#xA;                        // all available video qualities. This is important, in this approach,&amp;#xA;                        // we will have one source on the Plyr player.&amp;#xA;                       hls.on(Hls.Events.MANIFEST_PARSED, function (event, data) {&amp;#xA; &amp;#xA;                           // Transform available levels into an array of integers (height values).&amp;#xA;                          const availableQualities = hls.levels.map((l) =&gt; l.height)&amp;#xA;                      availableQualities.unshift(0) //prepend 0 to quality array&amp;#xA; &amp;#xA;                          // Add new qualities to option&amp;#xA;                    defaultOptions.quality = {&amp;#xA;                        default: 0, //Default - AUTO&amp;#xA;                        options: availableQualities,&amp;#xA;                        forced: true,&amp;#xA;                        onChange: (e) =&gt; updateQuality(e),&amp;#xA;                    }&amp;#xA;                    // Add Auto Label&amp;#xA;                    defaultOptions.i18n = {&amp;#xA;                        qualityLabel: {&amp;#xA;                            0: &amp;#x27;Auto&amp;#x27;,&amp;#xA;                        },&amp;#xA;                    }&amp;#xA; &amp;#xA;                    hls.on(Hls.Events.LEVEL_SWITCHED, function (event, data) {&amp;#xA;                      var span = document.querySelector(&quot;.plyr__menu__container [data-plyr=&amp;#x27;quality&amp;#x27;][value=&amp;#x27;0&amp;#x27;] span&quot;)&amp;#xA;                      if (hls.autoLevelEnabled) {&amp;#xA;                        span.innerHTML = `AUTO (${hls.levels[data.level].height}p)`&amp;#xA;                      } else {&amp;#xA;                        span.innerHTML = `AUTO`&amp;#xA;                      }&amp;#xA;                    })&amp;#xA; &amp;#xA;                     // Initialize new Plyr player with quality options&amp;#xA;                     var player = new Plyr(video, defaultOptions);&amp;#xA;                 });&amp;#xA; &amp;#xA;            hls.attachMedia(video);&amp;#xA;                window.hls = hls;&amp;#xA;            }&amp;#xA; &amp;#xA;            function updateQuality(newQuality) {&amp;#xA;              if (newQuality === 0) {&amp;#xA;                window.hls.currentLevel = -1; //Enable AUTO quality if option.value = 0&amp;#xA;              } else {&amp;#xA;                window.hls.levels.forEach((level, levelIndex) =&gt; {&amp;#xA;                  if (level.height === newQuality) {&amp;#xA;                    console.log(&quot;Found quality match with &quot; &amp;#x2B; newQuality);&amp;#xA;                    window.hls.currentLevel = levelIndex;&amp;#xA;                  }&amp;#xA;                });&amp;#xA;              }&amp;#xA;            }&amp;#xA;        });&amp;#xA;    &lt;/script&gt;&#xA;

    &#xA;

    But these work without secure links and signatures.&#xA;I want to create a secure link using token, signature and expires for each part of the video.&#xA;It means to close the direct access on the download host and to access the video files only through Laravel.&#xA;Thank you if anyone knows how to help.

    &#xA;

    Something similar to the following link to display the video :

    &#xA;

    https://dl4.your-domain.com/stream.m3u8?path=path-to-your-video-of-m3u8&expires=1677764366&signature=3e302aedefa62b4414beba4957927afa

    &#xA;

  • How to cut out first 5 seconds with youtube_dl and ffmpeg in python

    23 février 2021, par SvenXP

    i have a python script to download and save a MP3 and i would like to add code to cut out 5 seconds from the beginning of the MP3.

    &#xA;

    def download():&#xA;    ydl_opts = {&#xA;        &#x27;format&#x27;: &#x27;bestaudio/best&#x27;,&#xA;        &#x27;outtmpl&#x27;: &#x27;c:/MP3/%(title)s.%(ext)s&#x27;,&#xA;        &#x27;cookiefile&#x27;: &#x27;cookies.txt&#x27;,&#xA;        &#x27;postprocessors&#x27;: [{&#xA;            &#x27;key&#x27;: &#x27;FFmpegExtractAudio&#x27;,&#xA;            &#x27;preferredcodec&#x27;: &#x27;mp3&#x27;,&#xA;            &#x27;preferredquality&#x27;: &#x27;192&#x27;,&#xA;        }],&#xA;    }&#xA;    with youtube_dl.YoutubeDL(ydl_opts) as ydl:&#xA;        ydl.download([inpYTLinkSong.get()])&#xA;

    &#xA;

    I found some code for command line to cut x seconds :

    &#xA;

    ffmpeg -ss 00:00:15.00 -i "OUTPUT-OF-FIRST URL" -t 00:00:10.00 -c copy out.mp4

    &#xA;

    So i think i have to get the -ss part into the postprocessor part in my script, something like :

    &#xA;

    &#x27;postprocessors&#x27;: [{&#xA;        &#x27;key&#x27;: &#x27;FFmpegExtractAudio&#x27;,&#xA;        &#x27;preferredcodec&#x27;: &#x27;mp3&#x27;,&#xA;        &#x27;preferredquality&#x27;: &#x27;192&#x27;,&#xA;        &#x27;ss&#x27;:&#x27;00:00:05.00&#x27;&#xA;    }],&#xA;

    &#xA;

    But of course its not working with 'ss' or 'duration' (found in ffmpeg docu).

    &#xA;

    So any ideas what i have to put there instead of 'ss' ?

    &#xA;