Recherche avancée

Médias (91)

Autres articles (111)

  • L’utiliser, en parler, le critiquer

    10 avril 2011

    La première attitude à adopter est d’en parler, soit directement avec les personnes impliquées dans son développement, soit autour de vous pour convaincre de nouvelles personnes à l’utiliser.
    Plus la communauté sera nombreuse et plus les évolutions seront rapides ...
    Une liste de discussion est disponible pour tout échange entre utilisateurs.

  • Les statuts des instances de mutualisation

    13 mars 2010, par

    Pour des raisons de compatibilité générale du plugin de gestion de mutualisations avec les fonctions originales de SPIP, les statuts des instances sont les mêmes que pour tout autre objets (articles...), seuls leurs noms dans l’interface change quelque peu.
    Les différents statuts possibles sont : prepa (demandé) qui correspond à une instance demandée par un utilisateur. Si le site a déjà été créé par le passé, il est passé en mode désactivé. publie (validé) qui correspond à une instance validée par un (...)

  • MediaSPIP Init et Diogène : types de publications de MediaSPIP

    11 novembre 2010, par

    À l’installation d’un site MediaSPIP, le plugin MediaSPIP Init réalise certaines opérations dont la principale consiste à créer quatre rubriques principales dans le site et de créer cinq templates de formulaire pour Diogène.
    Ces quatre rubriques principales (aussi appelées secteurs) sont : Medias ; Sites ; Editos ; Actualités ;
    Pour chacune de ces rubriques est créé un template de formulaire spécifique éponyme. Pour la rubrique "Medias" un second template "catégorie" est créé permettant d’ajouter (...)

Sur d’autres sites (6802)

  • Video Codec For Commercial Use [on hold]

    17 décembre 2015, par mFeinstein

    I am new in video programming and I need to make a commercial application that needs to export some video. I was going to use OpenCV, but the documentation says it can’t write a video larger than 2Gb and that’s not something that my project can tolerate.

    I have an industrial camera and I will receive each frame of the camera in my C++ code and I want to transform the frames in a video. So far I am thinking about using FFmpeg for the video generation, but I am afraid of all these patented codecs.

    Are there any codecs that are free for commercial use ?

    Edit :

    Some are flaging this post as not related to programing or opinion based.

    1. I am not asking for an opinion, but a list of commercial free codecs. I am not asking which are good or bad (which is opinion based) I just can’t find a list online.

    2. This is about programing, there are lots of posts here in SO about legal issues on software like licensing, there is even one with a "legal" tag. I found many posts related to codecs licenses but none with a list of free ones. Of course this is programing related, I will develop and architecture my code around my options.

  • OpenCV VideoCapture can't read from stream

    18 décembre 2018, par Josep Valls

    I can open a stream in VLC but in OpenCV I cannot capture frames. (Python 2.7, OpenCV 3.4.3 binary distribution x86, Windows 10). I’ve been following this guide : https://medium.com/@tomgrek/hackers-guide-to-the-aws-deeplens-1b8281bc6e24 but I cannot seem to read from random streams online (not sure whether I should be able to, I saw this question opencv videocapture can’t open MJPEG stream about compiling with ffmpeg but I just downloaded the binary available in Sourceforge).

    • I am using an AWS Deeplens, updated to the latest version.

    • Installed ffmpeg, latest version.

    Then, in /etc/ffserver.conf I added :

    <stream>
    File "/opt/awscam/out/ch1_out.h264"
    VideoFrameRate 6
    VideoSize 320x240
    NoAudio
    </stream>

    <stream>
    File "/opt/awscam/out/ch2_out.mjpeg"
    VideoFrameRate 3
    VideoSize 640x480
    Format mjpeg
    NoAudio
    </stream>
    • I start ffserver -f /etc/ffserver.conf
    • On my Windows machine, I use WSL and open an SSH tunnel into the AWS Deeplens ssh -L 8090:localhost:8090 aws_cam@192.168.0.10
    • At this point, in my Windows machine I can open VLC and if I point to http://localhost:8090/camera.mjpeg I can see the stream from the camera.

    But if I run the following code :

    cam = cv2.VideoCapture("http://localhost:8090/camera.mjpeg")
    success, frame = cam.read()
    opened = cam.isOpened()
    success, frame, opened

    I get :

    False, None, False

    If I browse to http://localhost:8090/stat.html, I see :

    Available Streams
    Path    Served Conns     bytes  Format  Bit rate kbits/s    Video kbits/s   Codec   Audio kbits/s    Codec  Feed
    test1.mpg   0   0   mpeg    96  64  mpeg1video  32  mp2 feed1.ffm
    test.asf    0   0   asf_stream  320 256 msmpeg4 64  wmav2   feed1.ffm
    stat.html   17  42150   -   -   -       -  
    index.html  0   0   -   -   -       -  
    camera.h264 3   6805k   h264    0   0   libx264 0       /opt/awscam/out/ch1_out.h264
    camera.mjpeg    12  41073k  mjpeg   0   0   mjpeg   0       /opt/awscam/out/ch2_out.mjpeg

    And every time I call VideoCapture() I see how the number of Served for the camera.mjpeg stream increased by a 2 or 3 and the bytes, increases a few megabytes but I don’t see anything in OpenCV. I have not tried any other video device in my Windows 10 but I can read images no problem. I also tried a random stream online, also opens in VLC but not in OpenCV, tried this one : http://136.176.70.200/mjpg/video.mjpg

    Any ideas ?

  • ffmpeg detects a videofile path when it does not exist

    17 novembre 2020, par Nejc Kejzar

    this is boggling my mind. I am using ffmpeg to compress videos within the following python script :

    &#xA;

    import re&#xA;import os&#xA;&#xA;kage = &#x27;MH5&#x27;&#xA;year = &#x27;2020&#x27;&#xA;month = &#x27;11&#x27;&#xA;day = &#x27;10&#x27;&#xA;&#xA;# Set output dir; create it if it doesn&#x27;t exist yet&#xA;downsampled_video_dir = home_data_dir &#x2B; f&#x27;piCamera/downsampled_videos/{kage}/{year}/{month}/{day}/&#x27;&#xA;Path(downsampled_video_dir).mkdir(parents=True, exist_ok=True)&#xA;    &#xA;for i, video in enumerate(videos):&#xA;        # Set ffmpeg video compression terminal command and output directory for downsampled videos&#xA;        video_name = re.findall(&#x27;\d&#x2B;_\d&#x2B;.mp4&#x27;, video)[0]&#xA;        ds_output = downsampled_video_dir &#x2B; video_name&#xA;        compress_command = f"ffmpeg -i {video} -vf scale={video_res[0]}:-2 {ds_output}"&#xA;        &#xA;        # Run ffmpeg video compression&#xA;        os.system(compress_command)&#xA;

    &#xA;

    videos is a list of full video paths of the videos that I wish to compress, and ds_output is a full path of where to write the compressed video. video_res[0] contains the desired height of the video with the following -2 automatically calculating the width so that the aspect ratio is preserved.

    &#xA;

    For some reason when running this, ffmpeg detects some of the videos in the output directory as already existing and asks if I wish to overwrite them. The videos of course aren't there yet, so when I pass y, ffmpeg complains that no such file exists. Here is an example output for one of the problematic videos :

    &#xA;

    ffmpeg -y -i &#x27;/home/piCamera/MH4/2020/11/10/20201110_085451.mp4&#x27; -vf scale=400:300  &#x27;/home/piCamera/downsampled_videos/MH4/2020/11/10/20201110_085451.mp4&#x27;&#xA;ffmpeg version 4.2.4-1ubuntu0.1 Copyright (c) 2000-2020 the FFmpeg developers&#xA;  built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)&#xA;  configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared&#xA;  libavutil      56. 31.100 / 56. 31.100&#xA;  libavcodec     58. 54.100 / 58. 54.100&#xA;  libavformat    58. 29.100 / 58. 29.100&#xA;  libavdevice    58.  8.100 / 58.  8.100&#xA;  libavfilter     7. 57.100 /  7. 57.100&#xA;  libavresample   4.  0.  0 /  4.  0.  0&#xA;  libswscale      5.  5.100 /  5.  5.100&#xA;  libswresample   3.  5.100 /  3.  5.100&#xA;  libpostproc    55.  5.100 / 55.  5.100&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;/home/piCamera/MH4/2020/11/10/20201110_085451.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : isom&#xA;    minor_version   : 512&#xA;    compatible_brands: isomiso2avc1mp41&#xA;    encoder         : Lavf58.20.100&#xA;  Duration: 00:03:58.84, start: 0.000000, bitrate: 1190 kb/s&#xA;    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 960x720, 1190 kb/s, 5 fps, 5 tbr, 10240 tbn, 20480 tbc (default)&#xA;    Metadata:&#xA;      handler_name    : VideoHandler&#xA;/home/piCamera/downsampled_videos/MH4/2020/11/10/20201110_085451.mp4: No such file or directory&#xA;

    &#xA;

    This happens with about 3 videos out of 53, the rest run normally. I've tried restarting the terminal, deleted the whole created downsampled_video_dir and run again, but no matter how many times I restart, the same videos are the problem. The only thing that appears to help is if I change the output directory name. Any ideas of why this strange error is happening ?

    &#xA;

    This is being run on Ubuntu20 with python3.7.9 in a Jupyter Notebook.

    &#xA;

    Many, many thanks for all the insights !

    &#xA;