Recherche avancée

Médias (91)

Autres articles (45)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

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

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (5009)

  • Youtube DL Unable to get local issuer certificate - CERTIFICATE_VERIFY_FAILED

    24 novembre 2022, par Casper Kristiansson

    I'm trying to use youtube DL with FFmpeg to download an m3u8 stream. Just recently I started receiving this error :

    


    ERROR: Unable to download webpage: <urlopen error="error" verify="verify" unable="unable" to="to" get="get" local="local" issuer="issuer" certificate="certificate">&#xA;(caused by URLError(SSLCertVerificationError(1,&#xA;&#x27;[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed:&#xA;unable to get local issuer certificate (_ssl.c:992)&#x27;)))&#xA;</urlopen>

    &#xA;

    I know Youtube DL supports an option for nocheckcertificate but by enabling this after a couple of minutes the target machine will refuse the connection. When trying to use the same m3u8 stream on another computer, I could download the stream without any issues.

    &#xA;

    I know that someone from Youtubedl CERTIFICATE_VERIFY_FAILED suggested fixing "your system's CA certificate list". What is the process of doing this ?

    &#xA;

    I tried upgrading/reinstalling python and reinstalling the latest Windows update

    &#xA;

    I also want to mention that there hasn't been any issue with downloading for the past year but recently stumbled upon this when switching proxy providers. But because the same setup works on another PC without any issue it's probably not the reason.

    &#xA;

    The system the program is running on is Windows

    &#xA;

    Edit : Another note is that downloading other public m3u8 streams works perfectly fine, so the problem is probably with the system CA SSL.

    &#xA;

  • fluent-ffmpeg is having trouble setting creation_time (metadata) for mp4 video

    26 février 2023, par LycalopX

    So, basically, I have 2000 photos/videos that are, incorrectly, saved with random creation dates, and I wish to try and organize them. And, the solution I found was : getting the correct time through their name (they are already all named correctly), in the following format :

    &#xA;

    YYMMDD HH:MM:SS

    &#xA;

    That way, as I didn't want to go one by one writing all of the correct timestamps, I tried to change the metadata for all the files using javascript, and chose Fluent-FFMPeg for the job. I have ffmpeg installed on my computer, and I can successfully change the date of an MP4 file using the following command, in Windows Powershell (for that mp4 video) :

    &#xA;

    ffmpeg -i 20150408_143303.mp4 -metadata creation_time="2015-05-08T17:33:03.000Z" newFile.mp4&#xA;

    &#xA;

    But, the code I wrote doesn't seem to work, at least to change the date of the file. I tested most of the metadata fields (author, title, etc.), and it seems to work fine with them, just not the Media Creation Date (creation_time).

    &#xA;

    Here is the code, for reference :

    &#xA;

        // node-module&#xA;    var ffmpeg = require(&#x27;fluent-ffmpeg&#x27;);&#xA;&#xA;    // File location&#xA;    const filePath = &#x27;./&#x27;&#xA;    var fileName = "20150408_143303.mp4"&#xA;&#xA;&#xA;    var year = fileName.slice(0, 4)&#xA;    var month = fileName.slice(4, 6)&#xA;    var day = fileName.slice(6, 8)&#xA;    var hours = fileName.slice(9, 11)&#xA;    var minutes = fileName.slice(11, 13)&#xA;    var seconds = fileName.slice(13, 15)&#xA;&#xA;    var date = new Date(year, month, day, hours, minutes, seconds)&#xA;&#xA;    //2015-05-08T17:33:03.000Z&#xA;    console.log(date)&#xA;&#xA;&#xA;    // First try (doesn&#x27;t work)&#xA;    const file = filePath &#x2B; fileName&#xA;    ffmpeg(file).inputOptions(`-metadata`, `title="Movie"`)&#xA;&#xA;&#xA;    // ffmpeg -i 20150408_143303.mp4 -metadata creation_time="2015-05-08T17:33:03.000Z" newFile.mp4&#xA;&#xA;    // second try&#xA;    ffmpeg.ffprobe(file, function(err, metadata) {&#xA;&#xA;        ffmpeg(file)&#xA;        .inputFormat(&#x27;mp4&#x27;)&#xA;        .outputOptions([`-metadata`, `creation_time=${date}`])&#xA;        .save(&#x27;newFile.mp4&#x27;)&#xA;        .on("progress", function(progress) {&#xA;            console.log("Processing: " &#x2B; progress.timemark);&#xA;          })&#xA;          .on("error", function(err, stdout, stderr) {&#xA;            console.log("Cannot process video: " &#x2B; err.message);&#xA;          })&#xA;          .on("end", function(stdout, stderr) {&#xA;            console.log((metadata.format.tags))&#xA;          })&#xA;        .run();&#xA;&#xA;    })&#xA;

    &#xA;

    Console.log : https://imgur.com/a/gR93xLE&#xA;
    There are no console errors, and everything seems to run smoothly, but the creation_time really does not change. Any idea as to why this is occurring is very welcome...

    &#xA;

  • Pygame : Frame ghosting ?

    5 octobre 2022, par Sam Tubb

    I am working on a animation environment in python using pygame. The user draw's each frame, and then using ffmpeg the animation is saved as an .avi movie. I would like to implement a feature, but am not sure how.. frame ghosting. Like display the previous frame while you draw the current.

    &#xA;&#xA;

    I tried creating a surface called ghost that copies the current frame when the next-frame key is pressed. Then draws it with an alpha level of 10, but this didn't work out correctly.

    &#xA;&#xA;

    I am not sure what to do, here is the source code for anyone that thinks they have an idea :

    &#xA;&#xA;

    #Anim8&#xA;&#xA;import pygame,subprocess,shutil&#xA;from os import makedirs&#xA;from pygame.locals import *&#xA;from random import randrange&#xA;pygame.init()&#xA;screen=pygame.display.set_mode((740,580))&#xA;draw=pygame.Surface((740,540))&#xA;draw.fill((200,200,200))&#xA;bcol=(200,200,200)&#xA;gui=pygame.Surface((740,40))&#xA;gui.fill((50,50,50))&#xA;size=2&#xA;color=(0,0,0)&#xA;screen.fill((200,200,200))&#xA;prevcol=0&#xA;newcol=0&#xA;f=0&#xA;msg=&#x27;&#x27;&#xA;framerate=60&#xA;try:&#xA;    makedirs(&#x27;anim&#x27;)&#xA;except:&#xA;    pass&#xA;def DrawColors(x,y):&#xA;    pygame.draw.rect(gui, (255,0,0), (x&#x2B;3,y&#x2B;3,15,15),0)&#xA;    pygame.draw.rect(gui, (0,0,0), (x&#x2B;3,y&#x2B;21,15,15),0)&#xA;    pygame.draw.rect(gui, (0,255,0), (x&#x2B;21,y&#x2B;3,15,15),0)&#xA;    pygame.draw.rect(gui, (200,200,200), (x&#x2B;21,y&#x2B;21,15,15),0)&#xA;    pygame.draw.rect(gui, (0,0,255), (x&#x2B;39,y&#x2B;3,15,15),0)&#xA;while True:&#xA;    pygame.display.set_caption(&#x27;Anim8 - Sam Tubb - &#x27;&#x2B;&#x27;Frame: &#x27;&#x2B;str(f)&#x2B;&#x27; &#x27;&#x2B;str(msg))&#xA;    mse=pygame.mouse.get_pos()&#xA;    screen.blit(gui, (0,0))&#xA;    DrawColors(0,0)&#xA;    screen.blit(draw,(0,40))&#xA;    key=pygame.key.get_pressed()&#xA;    if key[K_1]:&#xA;        framerate=10&#xA;        msg=&#x27;Frame Rate set to 10&#x27;&#xA;    if key[K_2]:&#xA;        framerate=20&#xA;        msg=&#x27;Frame Rate set to 20&#x27;&#xA;    if key[K_3]:&#xA;        framerate=30&#xA;        msg=&#x27;Frame Rate set to 30&#x27;&#xA;    if key[K_4]:&#xA;        framerate=40&#xA;        msg=&#x27;Frame Rate set to 40&#x27;&#xA;    if key[K_5]:&#xA;        framerate=50&#xA;        msg=&#x27;Frame Rate set to 50&#x27;&#xA;    if key[K_6]:&#xA;        framerate=60&#xA;        msg=&#x27;Frame Rate set to 60&#x27;&#xA;    if key[K_7]:&#xA;        framerate=70&#xA;        msg=&#x27;Frame Rate set to 70&#x27;&#xA;    if key[K_8]:&#xA;        framerate=80&#xA;        msg=&#x27;Frame Rate set to 80&#x27;&#xA;    if key[K_9]:&#xA;        framerate=90&#xA;        msg=&#x27;Frame Rate set to 90&#x27;&#xA;    if key[K_0]:&#xA;        framerate=100&#xA;        msg=&#x27;Frame Rate set to 100&#x27;&#xA;&#xA;    if key[K_a]:&#xA;        pygame.image.save(draw, &#x27;anim/frame&#x27;&#x2B;str(f)&#x2B;&#x27;.png&#x27;)&#xA;        f&#x2B;=1&#xA;    for e in pygame.event.get():&#xA;        if e.type==QUIT:&#xA;            shutil.rmtree(&#x27;anim&#x27;)&#xA;            exit()&#xA;        if e.type==KEYDOWN:&#xA;            if e.key==K_s:&#xA;                msg=&#x27;Added Frame!&#x27;&#xA;                pygame.image.save(draw, &#x27;anim/frame&#x27;&#x2B;str(f)&#x2B;&#x27;.png&#x27;)&#xA;                f&#x2B;=1&#xA;            if e.key==K_c:&#xA;                draw.fill(bcol)&#xA;            if e.key==K_r:&#xA;                name=&#x27;anim&#x27;&#x2B;str(randrange(0,999))&#x2B;str(randrange(0,999))&#x2B;&#x27;.avi&#x27;&#xA;                msg=&#x27;Rendering: &#x27;&#x2B;name&#xA;                pygame.display.set_caption(&#x27;Anim8 - Sam Tubb - &#x27;&#x2B;&#x27;Frame: &#x27;&#x2B;str(f)&#x2B;&#x27; &#x27;&#x2B;str(msg))&#xA;                subprocess.call(&#x27;ffmpeg -f image2 -s 640x480 -i anim/frame%01d.png -r &#x27;&#x2B;str(framerate)&#x2B;&#x27; &#x27;&#x2B;name,shell=True)&#xA;                msg=&#x27;Done!&#x27;&#xA;            if e.key==K_p:&#xA;                subprocess.call(&#x27;ffplay &#x27;&#x2B;name,shell=True)&#xA;        if e.type==MOUSEBUTTONDOWN:&#xA;            if e.button==1:&#xA;                try:&#xA;                    prevcol=color&#xA;                    newcol=gui.get_at(mse)&#xA;                    if newcol==(50,50,50):&#xA;                        newcol=prevcol&#xA;                    color=newcol&#xA;                except:&#xA;                    pass&#xA;            if e.button==3:&#xA;                try:&#xA;                    prevcol=bcol&#xA;                    newcol=gui.get_at(mse)&#xA;                    if newcol==(50,50,50):&#xA;                        newcol=prevcol&#xA;                    draw.fill(newcol)&#xA;                    bcol=newcol&#xA;                except:&#xA;                    pass&#xA;            if e.button==4:&#xA;                size&#x2B;=1&#xA;                if size>7:&#xA;                    size=7&#xA;            if e.button==5:&#xA;                size-=1&#xA;                if size==0:&#xA;                    size=1 &#xA;        if e.type == pygame.MOUSEMOTION:&#xA;            lineEnd = pygame.mouse.get_pos()&#xA;            lineEnd = (lineEnd[0],lineEnd[1]-40)&#xA;            if pygame.mouse.get_pressed() == (1, 0, 0):&#xA;                    pygame.draw.line(draw, color, lineStart, lineEnd, size)&#xA;            lineStart = lineEnd&#xA;&#xA;    pygame.display.flip()&#xA;

    &#xA;&#xA;

    Oh, and on another note, just if anyone was curious, here is what the output looks like.. I made a little new year's animation :

    &#xA;&#xA;

    Animation Test

    &#xA;