Recherche avancée

Médias (91)

Autres articles (81)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Menus personnalisés

    14 novembre 2010, par

    MediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
    Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
    Menus créés à l’initialisation du site
    Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...)

Sur d’autres sites (7687)

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

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

  • Issues with using FFmpeg to generate MPEG-DASH files

    26 septembre 2022, par Tina J

    I am using the following ffmpeg command to generate MPEG DASH files and manifest. I use single_file 1 to have a single file for each representation ; so no chunking. But IDK why when I want to play the manifest using ExoPlayer, the video doesn't play from the beginning (rather it starts from around 50s).

    &#xA;

    ffmpeg -re -i .\video-h264.mkv -map 0 -map 0 -c:a aac -c:v libx264 -b:v:0 800k -b:v:1 300k -s:v:1 320x170 -profile:v:1 baseline -profile:v:0 main -bf 1 -keyint_min 120 -g 120 -sc_threshold 0 -b_strategy 0 -ar:a:1 22050 -use_timeline 1 -single_file 1 -use_template 1 -window_size 5 -adaptation_sets "id=0,streams=v id=1,streams=a" -f dash out.mpd&#xA;

    &#xA;

    What is wrong with this ? Is the manifest correct ? Here is the generated mpd :

    &#xA;

    &lt;?xml version="1.0" encoding="utf-8"?>&#xA;<mpd xmlns="urn:mpeg:dash:schema:mpd:2011" profiles="urn:mpeg:dash:profile:isoff-live:2011" type="static" mediapresentationduration="PT1M20.1S" maxsegmentduration="PT5.0S" minbuffertime="PT16.0S">&#xA;    <programinformation>&#xA;    </programinformation>&#xA;    <servicedescription>&#xA;    </servicedescription>&#xA;    <period start="PT48.0S">&#xA;        <adaptationset contenttype="video" startwithsap="1" segmentalignment="true" bitstreamswitching="true" framerate="30/1" maxwidth="960" maxheight="540" par="517072:290799" lang="eng">&#xA;            <representation mimetype="video/mp4" codecs="avc1.4d401f" bandwidth="800000" width="960" height="540" sar="32317:32311">&#xA;                <baseurl>out-stream0.mp4</baseurl>&#xA;                <segmentlist timescale="1000000" duration="5000000" startnumber="7">&#xA;                    <initialization range="0-832"></initialization>&#xA;                    <segmenturl mediarange="4800141-5599188" indexrange="4800141-4800192"></segmenturl>&#xA;                    <segmenturl mediarange="5599189-6243069" indexrange="5599189-5599240"></segmenturl>&#xA;                    <segmenturl mediarange="6243070-7224302" indexrange="6243070-6243121"></segmenturl>&#xA;                    <segmenturl mediarange="7224303-8138118" indexrange="7224303-7224354"></segmenturl>&#xA;                    <segmenturl mediarange="8138119-8232111" indexrange="8138119-8138170"></segmenturl>&#xA;                </segmentlist>&#xA;            </representation>&#xA;            <representation mimetype="video/mp4" codecs="avc1.42c00d" bandwidth="300000" width="320" height="170" sar="549389:581598">&#xA;                <baseurl>out-stream2.mp4</baseurl>&#xA;                <segmentlist timescale="1000000" duration="5000000" startnumber="7">&#xA;                    <initialization range="0-832"></initialization>&#xA;                    <segmenturl mediarange="1782920-2005667" indexrange="1782920-1782971"></segmenturl>&#xA;                    <segmenturl mediarange="2005668-2229412" indexrange="2005668-2005719"></segmenturl>&#xA;                    <segmenturl mediarange="2229413-2615209" indexrange="2229413-2229464"></segmenturl>&#xA;                    <segmenturl mediarange="2615210-2975346" indexrange="2615210-2615261"></segmenturl>&#xA;                    <segmenturl mediarange="2975347-2999288" indexrange="2975347-2975398"></segmenturl>&#xA;                </segmentlist>&#xA;            </representation>&#xA;        </adaptationset>&#xA;        <adaptationset contenttype="audio" startwithsap="1" segmentalignment="true" bitstreamswitching="true" lang="eng">&#xA;            <representation mimetype="audio/mp4" codecs="mp4a.40.2" bandwidth="69000" audiosamplingrate="44100">&#xA;                <audiochannelconfiguration schemeiduri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="1"></audiochannelconfiguration>&#xA;                <baseurl>out-stream1.mp4</baseurl>&#xA;                <segmentlist timescale="1000000" duration="5000000" startnumber="12">&#xA;                    <initialization range="0-764"></initialization>&#xA;                    <segmenturl mediarange="491493-536039" indexrange="491493-491544"></segmenturl>&#xA;                    <segmenturl mediarange="536040-580657" indexrange="536040-536091"></segmenturl>&#xA;                    <segmenturl mediarange="580658-625158" indexrange="580658-580709"></segmenturl>&#xA;                    <segmenturl mediarange="625159-669825" indexrange="625159-625210"></segmenturl>&#xA;                    <segmenturl mediarange="669826-713289" indexrange="669826-669877"></segmenturl>&#xA;                </segmentlist>&#xA;            </representation>&#xA;            <representation mimetype="audio/mp4" codecs="mp4a.40.2" bandwidth="69000" audiosamplingrate="22050">&#xA;                <audiochannelconfiguration schemeiduri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="1"></audiochannelconfiguration>&#xA;                <baseurl>out-stream3.mp4</baseurl>&#xA;                <segmentlist timescale="1000000" duration="5000000" startnumber="12">&#xA;                    <initialization range="0-764"></initialization>&#xA;                    <segmenturl mediarange="486188-530059" indexrange="486188-486239"></segmenturl>&#xA;                    <segmenturl mediarange="530060-574175" indexrange="530060-530111"></segmenturl>&#xA;                    <segmenturl mediarange="574176-618922" indexrange="574176-574227"></segmenturl>&#xA;                    <segmenturl mediarange="618923-663118" indexrange="618923-618974"></segmenturl>&#xA;                    <segmenturl mediarange="663119-706121" indexrange="663119-663170"></segmenturl>&#xA;                </segmentlist>&#xA;            </representation>&#xA;        </adaptationset>&#xA;    </period>&#xA;</mpd>&#xA;

    &#xA;