Recherche avancée

Médias (1)

Mot : - Tags -/publishing

Autres articles (58)

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

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (13404)

  • How to take a video of what's happening in selenium

    5 février 2019, par fabio

    I’m using Selenium 3 webdriver and Python 3 in Windows 7.

    I want to record a video of what’s happening in my selenium tests.

    To do so I’m using FFmpeg and screen-capture-recorder but I can change programs.

    Here’s my code :

    import unittest
    from selenium import webdriver
    from subprocess import Popen
    #from subprocess import call


    cmd = 'ffmpeg -y -rtbufsize 2000M -f dshow -i video="screen-capture-recorder" -r 10 -t 20 screen-capture.mp4'

    class SearchProductTest(unittest.TestCase):
       def setUp(self):

           # start the recording of movie
           self.videoRecording = Popen(cmd)

           # create a new Firefox session
           self.driver = webdriver.Firefox()
           self.driver.implicitly_wait(30)
           self.driver.maximize_window()

           # navigate to the application home page
           self.driver.get("http://demo-store.seleniumacademy.com/")

       def test_search_by_category(self):
           # get the search textbox
           search_field = self.driver.find_element_by_name("q")
           search_field.clear()

           # enter search keyword and submit
           search_field.send_keys("phones")
           search_field.submit()

           # get all the anchor elements which have product names displayed
           # currently on result page using find_elements_by_xpath method
           products = self.driver.find_elements_by_xpath(
               "//h2[@class='product-name']/a")

           # check count of products shown in results
           self.assertEqual(3, len(products))
           #self.videoRecording.terminate()

       def test_something_else(self):
           pass

       def tearDown(self):
           # close the browser window
           self.driver.quit()

           # Stop the recording
           self.videoRecording.terminate()

       #def terminate(process):
           #if process.poll() is None:
           #    call('taskkill /F /T /PID ' + str(process.pid))

    if __name__ == '__main__':
       unittest.main(verbosity=2)

    The problems are :

    1) the cmd gives a max time per the movie (20" in the example). If the test last more the movie is created and it works (but is incomplete, only 20").

    2) if the test last less the file is created but it doesn’t work (the reader can’t read it and it’s just some bytes). This is the main error ! I’m not sure about where to start the movie and where (and how) to stop it.

    3) If I have more than one test I would like to have only one movie for all of them (so I want to record all the tests in the same movie).

    4) if possible I would prefer to record the webdriver window (the one where my tests are running) and not my screen so meanwhile the tests go I can do something else (they are slow).

    Thanks you for the help.

  • ffmpeg, /dev/video0, -f decklink

    20 mars 2019, par Camille Goudeseune

    I’m trying to capture video from a PCI card, the Blackmagic DeckLink Mini Recorder, via ffmpeg, on a headless host running Ubuntu 18.04.2 LTS, hopefully with a command like

    ffmpeg -f decklink -i /dev/video0 ...

    How can I make that work ? I have two obstacles.

    No /dev/video0

    ffmpeg -i /dev/video0 ... fails : /dev/video0: No such device or address.
    v4l2-ctl --list-devices fails with the same error message.

    I built /dev/video0, and it looks okay :

    mknod /dev/video0 c 81 0
    chown root.video /dev/video0
    chmod g+rw /dev/video0

    To compare this file with a working one, I ran strace cat /dev/video0 on this host, and on another host (Ubuntu 14) with a working /dev/video0. The outputs began to differ here (good, then bad) :

    fstat(1, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
    open("/dev/video0", O_RDONLY)           = 3  
    fstat(3, {st_mode=S_IFCHR|0660, st_rdev=makedev(81, 0), ...}) = 0
    fadvise64(3, 0, 0, POSIX_FADV_SEQUENTIAL) = 0
    ----

    fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
    openat(AT_FDCWD, "/dev/video0", O_RDONLY) = -1 ENXIO (No such device or address)

    So /dev/video0 is broken at a level lower than ffmpeg or v4l2 or even cat.

    On Ubuntu 14, man 8 MAKEDEV suggests that the error message means that "the kernel does not have the driver configured or loaded."

    This Ubuntu 18 host lacks that manpage, but it does have a few /snap/core/*/sbin/MAKEDEV, all the same, so I tried

    /snap/core/6350/sbin/MAKEDEV -n -v video

    It would have created over a hundred devices videoXX, radioXX, vtxXX, vbiXX. Those devices didn’t exist yet, so it seemed harmless to try it.

    rm /dev/video0; /snap/core/6350/sbin/MAKEDEV video

    That rebuilt /dev/video0, but "No such device" remains, from cat or ffmpeg.

    No decklink

    ffmpeg -f decklink ... fails with Unknown input format: 'decklink'.

    Neither black nor deck nor link is mentioned by ffmpeg -devices (fbdev, lavfi, oss, v4l2) and ffmpeg -formats (about 350), either for Ubuntu’s own version 3.4.4-0ubuntu0.18.04.1, or for version N-93330-g7ff89574c7 compiled from source on 2019 Mar 13 :

    git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg
    cd ffmpeg
    ./configure --enable-nonfree --disable-doc --disable-w32threads --enable-pthreads

    (Although ./configure --help mentions --enable-decklink, using that yielded "ERROR : DeckLinkAPI.h not found." updatedb && locate DeckLinkAPI.h finds no file with that name, either.)

    The DeckLink PCI card is recognized by hwinfo and lspci.

    lsmod reports the loaded modules blackmagic and blackmagic_io.

    Maybe the PCI card is installed ok, but ffmpeg just can’t reach it because I can’t configure it for that.

    Edit : Rebooting didn’t fix anything.

  • "Undefined Reference" when compiling FFMPEG with librtmp on Android

    5 mars 2019, par elBradford

    I have searched, and while Building FFMPEG with librtmp for android answered part of my question, I ran into other issues further along in the compilation process.

    First, I am trying to use the script in this github repo, changing the flags to include

     --enable-librtmp \
     --extra-cflags=-I/home/bradford/Development/FFMPEG/rtmp/rtmpdump/librtmp/ \
     --extra-ldflags=-L/home/bradford/Development/FFMPEG/rtmp/rtmpdump/librtmp"

    I build librtmp with polarSSL following S74ck3r’s instructions on his github repo and stream-recorder thread. That appears to work correctly, and I have a librtmp.so, librtmp.a and rtmp.h

    When I try to compile ffmpeg with librtmp, I get the error

    ERROR: librtmp not found

    This SO question helped, and I modified ffmpeg’s config file so that it wouldn’t look at pkg-config for librtmp (even though pkg-config was aware of librtmp...) :

    #enabled librtmp    && require_pkg_config librtmp librtmp/rtmp.h RTMP_Socket

    When I build now, it starts successfully, and I get the hopeful line :

    librtmp enabled           yes

    And later on I see more good news :

    ...
    Enabled protocols:
    applehttp       http            mmsh
    cache           httpproxy       mmst
    concat          librtmp         mmsu
    crypto          librtmpe        pipe
    fd          librtmps        rtp
    file            librtmpt        tcp
    gopher          librtmpte       udp
    hls         md5
    ...

    but finally, after compiling everything and during the installation phase, I get these types of errors :

    INSTALL   libavutil/libavutil.pc
    /tmp/FFMPEG/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: libavformat/librtmp.o: in function rtmp_get_file_handle:libavformat/librtmp.c:190: error: undefined reference to 'RTMP_Socket'
    /tmp/FFMPEG/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: libavformat/librtmp.o: in function rtmp_read_seek:libavformat/librtmp.c:180: error: undefined reference to 'RTMP_SendSeek'
    /tmp/FFMPEG/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: libavformat/librtmp.o: in function rtmp_read_pause:libavformat/librtmp.c:161: error: undefined reference to 'RTMP_Pause'
    /tmp/FFMPEG/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: libavformat/librtmp.o: in function rtmp_close:libavformat/librtmp.c:64: error: undefined reference to 'RTMP_Close'
    /tmp/FFMPEG/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: libavformat/librtmp.o: in function rtmp_write:libavformat/librtmp.c:145: error: undefined reference to 'RTMP_Write'
    /tmp/FFMPEG/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: libavformat/librtmp.o: in function rtmp_read:libavformat/librtmp.c:153: error: undefined reference to 'RTMP_Read'
    /tmp/FFMPEG/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: libavformat/librtmp.o: in function rtmp_open:libavformat/librtmp.c:96: error: undefined reference to 'RTMP_LogSetLevel'
    /tmp/FFMPEG/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: libavformat/librtmp.o: in function rtmp_open:libavformat/librtmp.c:97: error: undefined reference to 'RTMP_LogSetCallback'
    /tmp/FFMPEG/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: libavformat/librtmp.o: in function rtmp_open:libavformat/librtmp.c:118: error: undefined reference to 'RTMP_Init'
    /tmp/FFMPEG/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: libavformat/librtmp.o: in function rtmp_open:libavformat/librtmp.c:119: error: undefined reference to 'RTMP_SetupURL'
    /tmp/FFMPEG/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: libavformat/librtmp.o: in function rtmp_open:libavformat/librtmp.c:127: error: undefined reference to 'RTMP_Connect'
    /tmp/FFMPEG/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: libavformat/librtmp.o: in function rtmp_open:libavformat/librtmp.c:127: error: undefined reference to 'RTMP_ConnectStream'
    /tmp/FFMPEG/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: libavformat/librtmp.o: in function rtmp_open:libavformat/librtmp.c:125: error: undefined reference to 'RTMP_EnableWrite'
    collect2: ld returned 1 exit status

    And I can’t get past them. It sounds like it can’t find rtmp.h, which includes references to those functions, but that is present where it should be (afaik).

    Also, my project requires librtmp - the built-in rtmp features of ffmpeg are not sufficient because I require the authentication features of librtmp.