
Recherche avancée
Médias (91)
-
Chuck D with Fine Arts Militia - No Meaning No
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Paul Westerberg - Looking Up in Heaven
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Le Tigre - Fake French
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Thievery Corporation - DC 3000
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Dan the Automator - Relaxation Spa Treatment
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Gilberto Gil - Oslodum
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (45)
-
Demande de création d’un canal
12 mars 2010, parEn fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...) -
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir
Sur d’autres sites (7102)
-
avformat : remove deprecated FF_API_GET_DUR_ESTIMATE_METHOD
19 février, par James Almer -
FFMPEG convert videos using Automator [closed]
8 janvier, par FilipProI'm trying to use Apple Automator (v2.10, Sonoma 14.7.1, Apple M1) to select a folder and convert all MP4 files to WMV files using FFMPEG. The user is supposed to export files from Final Cut Pro in MP4, put them in a folder of their choice and then start the automation by having to select the folder where MP4 files are saved.


FFMPEG is installed via Homebrew and the installation folder was found via "which ffmpeg" ( /opt/homebrew/bin/ffmpeg ).


This is the worklow I currently have : Full Automator Workflow


- 

-
Run AppleScript


- 

- 

on run {input, parameters}

 tell application "System Events"
 activate
 return text returned of (display dialog "Enter administrator password" default answer "" with hidden answer)
 end tell

 return input
end run







- 

-
Run Shell script (/bin/zsh, no input required)


- 

- 

sudo -S id -u







- 

-
Ask for Finder elements


- 

- Select folder, starting from "Downloads" folder, no multiple selection




-
Run Shell script (/bin/zsh, input as arguments)


- 

- 

cd "$1"

for f in *.mp4; do
 osascript -e "display notification \"Converting file: $f \" with title \"Video Conversion\""
 sudo /opt/homebrew/bin/ffmpeg -i "$f" -c:v wmv2 -b:v 3000k -c:a wmav2 -b:c 192k "${f%.*}.wmv"
 if [ $? -eq 0 ]; then
 osascript -e "display notification \"Converted file: $f \" with title \"Video Conversion\""
 else
 osascript -e "display notification \"Error converting file: $f \" with title \"Video Conversion\""
 fi
done







- 











The actual script (step 4) works perfectly if handtyped in Terminal but FFMPEG return "Error opening output files : Invalid argument" when run within the Automator workflow.


This is the output of step 4 (I added *REDACTED FOR PRIVACY* instead of actual filenames) :


ffmpeg version 7.1 Copyright (c) 2000-2024 the FFmpeg developers
built with Apple clang version 16.0.0 (clang-1600.0.26.4)
configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/7.1_3 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags='-Wl,-ld_classic' --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libharfbuzz --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox --enable-neon
libavutil 59. 39.100 / 59. 39.100
libavcodec 61. 19.100 / 61. 19.100
libavformat 61. 7.100 / 61. 7.100
libavdevice 61. 3.100 / 61. 3.100
libavfilter 10. 4.100 / 10. 4.100
libswscale 8. 3.100 / 8. 3.100
libswresample 5. 3.100 / 5. 3.100
libpostproc 58. 3.100 / 58. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '*REDACTED FOR PRIVACY*':
Metadata:
major_brand : mp42
minor_version : 1
compatible_brands: isommp41mp42
creation_time : 2024-12-30T17:06:35.000000Z
Duration: 00:00:15.00, start: 0.000000, bitrate: 5122 kb/s
Stream #0:0[0x1](und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1920x1080, 5119 kb/s, SAR 1:1 DAR 16:9, 24 fps, 24 tbr, 24k tbn (default)
Metadata:
creation_time : 2024-12-30T17:06:35.000000Z
handler_name : Core Media Video
vendor_id : [0][0][0][0]
Trailing garbage at the end of a stream specifier: c
Error opening output file *REDACTED FOR PRIVACY*.
Error opening output files: Invalid argument”



-
-
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 :