Recherche avancée

Médias (91)

Autres articles (86)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

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

Sur d’autres sites (12089)

  • Reading images from AXIS ip camera using OpenCV

    14 juin 2016, par batuman

    I am trying to access AXIS IP camera from my program using OpenCV.
    My OpenCV version is 3.1. I follow this tutorial link.

    I have all libraries installed.
    My following program can load mp4 video successfully. That means ffmpeg and necessary libraries are working fine.

    #include <iostream>
    #include <opencv2></opencv2>opencv.hpp>

    using namespace std;
    int main() {
       cv::VideoCapture vcap("test.mp4");
       cv::Mat image;
    //    const string address = "rtsp://root:pass@192.168.0.90/axis-media/media.amp?camera=1";
    //    if(!vcap.open(address)){
    //      std::cout &lt;&lt; "Error opening video stream or file " &lt;&lt; std::endl;
    //      return -1;
    //    }
       for(;;){
           if(!vcap.read(image)){
               std::cout &lt;&lt; "No frame" &lt;&lt; std::endl;
               cv::waitKey(0);
           }
           cv::imshow("Display", image);
           cv::waitKey(1);
       }
       return 0;
    }
    </iostream>

    When I tried to access the IP Camera as follow

    cv::VideoCapture vcap("rtsp://root:pass@192.168.0.90/axis-media/media.amp?camera=1");

    I have the following error

    GStreamer Plugin: Embedded video playback halted; module source reported: Could
    not open resource for reading and writing.
    OpenCV Error: Unspecified error (GStreamer: unable to start pipeline
    ) in cvCaptureFromCAM_GStreamer, file /home/Softwares/opencv/opencv/modules
    /videoio/src/cap_gstreamer.cpp, line 818
    terminate called after throwing an instance of 'cv::Exception'
     what():  /home/Softwares/opencv/opencv/modules/videoio/src/cap_gstreamer.
    cpp:818: error: (-2) GStreamer: unable to start pipeline
    in function cvCaptureFromCAM_GStreamer

    User is root and password is pass and ip 192.168.0.90 are all defaults.

    My if config gave me

    ifconfig
    eth0      Link encap:Ethernet  HWaddr b8:2a:72:c6:b8:13  
             inet6 addr: fe80::ba2a:72ff:fec6:b813/64 Scope:Link
             UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
             RX packets:723959 errors:0 dropped:0 overruns:0 frame:0
             TX packets:116637 errors:0 dropped:0 overruns:0 carrier:0
             collisions:0 txqueuelen:1000
             RX bytes:199422245 (199.4 MB)  TX bytes:13701699 (13.7 MB)

    lo        Link encap:Local Loopback  
             inet addr:127.0.0.1  Mask:255.0.0.0
             inet6 addr: ::1/128 Scope:Host
             UP LOOPBACK RUNNING  MTU:65536  Metric:1
             RX packets:24829 errors:0 dropped:0 overruns:0 frame:0
             TX packets:24829 errors:0 dropped:0 overruns:0 carrier:0
             collisions:0 txqueuelen:0
             RX bytes:2502903 (2.5 MB)  TX bytes:2502903 (2.5 MB)

    wlan0     Link encap:Ethernet  HWaddr a0:a8:cd:99:92:60  
             UP BROADCAST MULTICAST  MTU:1500  Metric:1
             RX packets:0 errors:0 dropped:0 overruns:0 frame:0
             TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
             collisions:0 txqueuelen:1000
             RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

    What could be the problem for this access to the camera ?

    Thanks

  • Ffmpeg not able to access file on aws labmda

    1er septembre 2016, par Surendra Agarwal

    I am using ffmpeg to create video thumbnails on AWS Lambda. I downloaded the file in /tmp directory but ffmpeg is not able to access it and giving error

    [Error : meta data contains no duration, aborting screenshot creation]

    when I am checking the media info using ffmpeg then it is giving the output

    { ffmpegversion: 0, title: '', artist: '', album: '', track: '', date: '', durationraw: '', durationsec: 0, synched: false, major_brand: undefined, video: { container: '', bitrate: 0, codec: '', resolution: { w: 0, h: 0 }, resolutionSquare: { w: 0, h: NaN }, rotate: 0, fps: 0, stream: 0, aspect: 0, pixel: 0 }, audio: { codec: '', bitrate: 0, sample_rate: 0, stream: 0 } }

    I used fs module to check file existance on that location and it is giving the output

    { dev: 1793, mode: 33204, nlink: 1, uid: 496, gid: 495, rdev: 0, blksize: 4096, ino: 11, size: 21152, blocks: 48, atime: Thu Sep 01 2016 13:30:46 GMT+0000 (UTC), mtime: Thu Sep 01 2016 13:30:46 GMT+0000 (UTC), ctime: Thu Sep 01 2016 13:30:46 GMT+0000 (UTC), birthtime: Thu Sep 01 2016 13:30:46 GMT+0000 (UTC) }
  • How do I properly enable ffmpeg for matplotlib.animation ?

    7 mars 2017, par spanishgum

    I have covered a lot of ground on stack so far trying to get ffmpeg going so I can make a timelapse video.

    I am on a CentOS 7 machine, running python3.7.0a0.

    python3
    >>> import numpy as np
    >>> np.__version__
    '1.12.0'
    >>> import matplotlib as mpl
    >>> mpl.__version__
    '2.0.0'
    >>> import mpl_toolkits.basemap as base
    >>> base.__version__
    '1.0.7'

    I found this github gist on installing ffmpeg. I used the chromium source, and installed without a prefix option (using the default).

    I have confirmed that ffmpeg is installed, although I don’t know anything about testing whether it works.

    which ffmpeg
    /usr/local/bin/ffmpeg

    ffmpeg -version
    ffmpeg version N-83533-gada281d Copyright (c) 2000-2017 the FFmpeg dev elopers
    built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-11
    configuration:
    libavutil      55. 47.100 / 55. 47.100
    libavcodec     57. 80.100 / 57. 80.100
    libavformat    57. 66.102 / 57. 66.102
    libavdevice    57.  2.100 / 57.  2.100
    libavfilter     6. 73.100 /  6. 73.100
    libswscale      4.  3.101 /  4.  3.101
    libswresample   2.  4.100 /  2.  4.100

    I tried to run a few sample examples I found online :

    [1] http://matplotlib.org/examples/animation/basic_example_writer.html

    [2] http://stackoverflow.com/a/23098090/3454650

    Everything works fine up until I try to save the animation file.

    [1]

    anim.save('basic_animation.mp4', writer = FFwriter, fps=30, extra_args=['-vcodec', 'libx264'])

    [2]

    im_ani.save('im.mp4', writer=writer)

    I found here that explictly setting the path to ffmpeg might be necessary so I added this to the top of the test scripts :

    plt.rcParams['animation.ffmpeg_path'] = '/usr/local/bin/ffmpeg'

    I tried a few more tweaks in the code but always get the same response, which I do not know how to begin deciphering :

    Traceback (most recent call last):
     File "testanim.py", line 27, in <module>
       writer.grab_frame()
     File "/usr/local/lib/python3.7/contextlib.py", line 100, in __exit__
       self.gen.throw(type, value, traceback)
     File "/usr/local/lib/python3.7/site-packages/matplotlib/animation.py", line 256, in saving
       self.finish()
     File "/usr/local/lib/python3.7/site-packages/matplotlib/animation.py", line 276, in finish
       self.cleanup()
     File "/usr/local/lib/python3.7/site-packages/matplotlib/animation.py", line 311, in cleanup
       out, err = self._proc.communicate()
     File "/usr/local/lib/python3.7/subprocess.py", line 836, in communicate
       stdout, stderr = self._communicate(input, endtime, timeout)
     File "/usr/local/lib/python3.7/subprocess.py", line 1474, in _communicate
       selector.register(self.stdout, selectors.EVENT_READ)
     File "/usr/local/lib/python3.7/selectors.py", line 351, in register
       key = super().register(fileobj, events, data)
     File "/usr/local/lib/python3.7/selectors.py", line 237, in register
       key = SelectorKey(fileobj, self._fileobj_lookup(fileobj), events, data)
     File "/usr/local/lib/python3.7/selectors.py", line 224, in _fileobj_lookup
       return _fileobj_to_fd(fileobj)
     File "/usr/local/lib/python3.7/selectors.py", line 39, in _fileobj_to_fd
       "{!r}".format(fileobj)) from None
    ValueError: Invalid file object: &lt;_io.BufferedReader name=6>
    </module>

    Is there something with my configuration that is malformed ? I searched google for this error for some time but never found anything relevant to animations / ffmpeg. Any help would be greatly appreciated.


    UPDATE :

    @LordNeckBeard pointed me here : https://trac.ffmpeg.org/wiki/CompilationGuide/Centos

    I ran into problems with installing the x264 encoding dependency. Some files in libavcodec/*.c (in the make output) were reporting undefined references to several functions. After a wild goose chase found this : https://mailman.videolan.org/pipermail/x264-devel/2015-February/010971.html

    To fix the x264 installation, I simply added some configure flags :

    ./configure --enable-static --enable-shared --extra-ldflags="-lswresample -llzma"

    UPDATE :

    So everything installed fine after fixing the libx264 problems. I went ahead and copied the ffmpeg binary from the ffmpeg_build folder into /usr/local/bin/ffmpeg.

    After running the script I was getting problems where ffmpeg could not find the libx264 shared object. I think I will have to recompile everything using different prefixes. My intuition tells me there are old files laying around after I have messed with everything, using some configuration that is broken.

    So I decided maybe I should just try to use NUX : http://linoxide.com/linux-how-to/install-ffmpeg-centos-7/
    I installed ffmpeg using the new rpm, but to no avail. I still was not able to run ffmpeg because of a missing shared object.

    Finally, instead of usiong files copied into my /usr/local/bin folder, I ran ffmpeg directly from the build bin directory. Turns out that this does work properly !

    So in essence, if I want to install ffmpeg system wide, I need to manually compile from sources again but using a nonlocal prefix.