
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (77)
-
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...) -
Récupération d’informations sur le site maître à l’installation d’une instance
26 novembre 2010, parUtilité
Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...) -
Support de tous types de médias
10 avril 2011Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)
Sur d’autres sites (5141)
-
OpenCV on MacOS : Match Camera Index and Name
15 janvier, par rpi_guruI have a builtin camera and a USB webcam connected to my MacOS.


Here is a result of
system_profiler SPCameraDataType -xml
command :

<?xml version="1.0" encoding="UTF-8"?>

<plist version="1.0">
<array>
 <dict>
 <key>_SPCommandLineArguments</key>
 <array>
 <string>/usr/sbin/system_profiler</string>
 <string>-nospawn</string>
 <string>-xml</string>
 <string>SPCameraDataType</string>
 <string>-detailLevel</string>
 <string>full</string>
 </array>
 <key>_SPCompletionInterval</key>
 <real>1.1997909545898438</real>
 <key>_SPResponseTime</key>
 <real>1.2810090780258179</real>
 <key>_dataType</key>
 <string>SPCameraDataType</string>
 <key>_detailLevel</key>
 <integer>-1</integer>
 <key>_items</key>
 <array>
 <dict>
 <key>_name</key>
 <string>USB Camera</string>
 <key>spcamera_model-id</key>
 <string>UVC Camera VendorID_3141 ProductID_25453</string>
 <key>spcamera_unique-id</key>
 <string>0x11000000c45636d</string>
 </dict>
 <dict>
 <key>_name</key>
 <string>FaceTime HD Camera</string>
 <key>spcamera_model-id</key>
 <string>FaceTime HD Camera</string>
 <key>spcamera_unique-id</key>
 <string>EAB7A68F-EC2B-4487-AADF-D8A91C1CB782</string>
 </dict>
 </array>
 <key>_parentDataType</key>
 <string>SPHardwareDataType</string>
 <key>_properties</key>
 <dict>
 <key>_name</key>
 <dict>
 <key>_isColumn</key>
 <string>NO</string>
 <key>_isOutlineColumn</key>
 <string>NO</string>
 <key>_order</key>
 <string>0</string>
 </dict>
 <key>spcamera</key>
 <dict>
 <key>_order</key>
 <string>10</string>
 </dict>
 <key>spcamera_model-id</key>
 <dict>
 <key>_order</key>
 <string>30</string>
 </dict>
 <key>spcamera_unique-id</key>
 <dict>
 <key>_order</key>
 <string>40</string>
 </dict>
 <key>volumes</key>
 <dict>
 <key>_detailLevel</key>
 <string>0</string>
 </dict>
 </dict>
 <key>_timeStamp</key>
 <date>2024-11-29T21:57:28Z</date>
 <key>_versionInfo</key>
 <dict>
 <key>com.apple.SystemProfiler.SPCameraReporter</key>
 <string>1.2.0</string>
 </dict>
 </dict>
</array>
</plist>



As you can see, I have a couple of video input devices :
USB Camera
&FaceTime HD Camera


The problem is that when I use
cap = cv2.VideoCapture(0)
, it uses theFaceTime HD Camera
.

Can we match the camera index in OpenCV with the camera names ?


P.S. I tried
ffmpeg
, but it returned similar result :



ioreg | grep -i cam
result :



-
How can I remove every nth frame from raw video using ffmpeg ?
15 juin 2024, par DaveB44Question moved to SuperUser, please reply there


I have many cine films that have been digitally converted. They have been converted as a 25 fps with 2 frames in every 23 duplicated. I need to remove the duplicated frames using a bitstream filter so there is no decoding/encoding.


After removing the frames I will change to the original cine frame rate of 18 fps. I will then change the frame rate to 25 fps using duplicated frames. I don't want to interpolate as I want to preserve the jerky format of the cine. Finally I will video editing software that will do the final encoding.


All the additional steps will cause several stages of decoding/encoding, that I need to avoid.


First I used a combination of the answers to FFmpeg remove video frames at specific intervals and FFmpeg remove every 6th frame starting from the 3rd frame, on an mp4 file to check it works. I modified it to remove every 4th and 17th frame in 25.


ffmpeg -loglevel warning -i cine.mp4 -an -vf "select='if((mod(n-4,25)),(mod(n-17,25)))',setpts='N/FRAME_RATE/TB'" cine-23.mp4



This works fine, but I end up with a file a quarter the size.


I now used Gyan's answer in Using ffmpeg to change framerate to extract the raw bitstream.


ffmpeg -loglevel warning -i cine.mp4 -c copy -f h264 cine.h264



This created the h264 file as expected, surprisingly it was 16 kB smaller than the original (67 GB file size).


I then modified the code to use the .h264 file.


ffmpeg -loglevel warning -i cine.h264 -vf "select='if((mod(n-4,25)),(mod(n-17,25)))',setpts='N/FRAME_RATE/TB'" cine-23.h264



This gave the following error, but created the cine-23.h264 file although it was the same size as cine-23.mp4 in the test above


[h264 @ 00000245ec0bfb80] non-existing SPS 0 referenced in buffering period
 Last message repeated 1 times



I then checked the ffmpeg bitstream filter documentation and found the bitstream filter setts. I changed my code to the following.


ffmpeg -loglevel warning -i cine.h264 -bsf:v "select='if((mod(n-4,25)),(mod(n-17,25)))',setts=pts='N/FRAME_RATE/TB'" cine-23.h264



Which resulted in the following error.


[vost#0:0/libx264 @ 000002916cf173c0] Error parsing bitstream filter sequence 'select='if((mod(n-4,25)),(mod(n-17,25)))',setts=pts='N/FRAME_RATE/TB'': Bitstream filter not found
Error opening output file cine-23.h264.
Error opening output files: Bitstream filter not found



I'm assuming the error is because setts does not support select. Is there another way to achieve what I am looking for ?


I could use mpdecimate but as that has to compare each frame it is much slower than defining it only needs to delete frames 4 and 17 in every second.


This is the output of ffprobe on my original file.


ffprobe version 2023-11-28-git-47e214245b-full_build-www.gyan.dev Copyright (c) 2007-2023 the FFmpeg developers
 built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
 configuration: --enable-gpl --enable-version3 --enable-static --pkg-config=pkgconf --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-dxva2 --enable-d3d11va --enable-libvpl --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
 libavutil 58. 32.100 / 58. 32.100
 libavcodec 60. 35.100 / 60. 35.100
 libavformat 60. 18.100 / 60. 18.100
 libavdevice 60. 4.100 / 60. 4.100
 libavfilter 9. 14.100 / 9. 14.100
 libswscale 7. 6.100 / 7. 6.100
 libswresample 4. 13.100 / 4. 13.100
 libpostproc 57. 4.100 / 57. 4.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'cine.mp4':
 Metadata:
 major_brand : mp42
 minor_version : 19529864
 compatible_brands: mp42isom
 creation_time : 2024-02-19T21:01:10.000000Z
 Duration: 00:01:00.00, start: 0.000000, bitrate: 9245 kb/s
 Stream #0:0[0x1](eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 720x576 [SAR 35:32 DAR 175:128], 9243 kb/s, 25 fps, 25 tbr, 25 tbn (default)
 Metadata:
 creation_time : 2024-02-19T21:01:10.000000Z
 handler_name : Video Media Handler
 vendor_id : [0][0][0][0]
 encoder : AVC Coding



-
avformat/rcwtdec : add RCWT Closed Captions demuxer
2 avril 2024, par Marth64avformat/rcwtdec : add RCWT Closed Captions demuxer
RCWT (Raw Captions With Time) is a format native to ccextractor,
a commonly used OSS tool for processing 608/708 Closed Captions (CC).
RCWT can be used to archive the original extracted CC bitstream.
The muxer was added in January 2024. In this commit, add the demuxer.One can now demux RCWT files for rendering in ccaption_dec or interop
with ccextractor (which produces RCWT). Using the muxer/demuxer combo,
the CC bits can be kept for processing or rendering with either tool.
This can be an effective way to backup an original CC stream, including
format extensions like EIA-708 and overall original presentation.Signed-off-by : Marth64 <marth64@proxyid.net>