
Recherche avancée
Médias (91)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
-
avec chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
sans chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
config chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
Autres articles (66)
-
Qualité du média après traitement
21 juin 2013, parLe bon réglage du logiciel qui traite les média est important pour un équilibre entre les partis ( bande passante de l’hébergeur, qualité du média pour le rédacteur et le visiteur, accessibilité pour le visiteur ). Comment régler la qualité de son média ?
Plus la qualité du média est importante, plus la bande passante sera utilisée. Le visiteur avec une connexion internet à petit débit devra attendre plus longtemps. Inversement plus, la qualité du média est pauvre et donc le média devient dégradé voire (...) -
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Pas question de marché, de cloud etc...
10 avril 2011Le vocabulaire utilisé sur ce site essaie d’éviter toute référence à la mode qui fleurit allègrement
sur le web 2.0 et dans les entreprises qui en vivent.
Vous êtes donc invité à bannir l’utilisation des termes "Brand", "Cloud", "Marché" etc...
Notre motivation est avant tout de créer un outil simple, accessible à pour tout le monde, favorisant
le partage de créations sur Internet et permettant aux auteurs de garder une autonomie optimale.
Aucun "contrat Gold ou Premium" n’est donc prévu, aucun (...)
Sur d’autres sites (6880)
-
Anomalie #4729 : problème d’affichage dans la colone date
16 avril 2021En fait quel est le problème ?
Parce que "2019-W16" ça veut dire Semaine 16 de 2019…
C’est ça qui te gène ?C’est un format de date normalisé aussi.
https://en.wikipedia.org/wiki/ISO_week_date -
Anomalie #4729 : problème d’affichage dans la colone date
17 avril 2021Non : on ne remplace pas une date qui a un sens avec W17 par autre chose avec un S17 qui n’en a aucun pour personne. Soit c’est remplacé par "2019 - Semaine 17" soit on laisse comme ça. Et là je suis plutôt d’avis de laisser comme ça.
-
ffmpeg can't access to usb webcam from python subprocess.Popen in windows
29 avril 2021, par TomezIf I run the following ffmpeg command from windows cmd it works


ffmpeg -f dshow -i video="USB Video Device" -s 1280x720 -f rawvideo -pix_fmt rgb24 pipe:



I then tried to execute the same in python

Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)] on win32

args = [
 'ffmpeg', '-f', 'dshow', '-i', 'video=USB Video Device', '-s', '1280x720',
 '-f', 'rawvideo', '-pix_fmt','rgb24', 'pipe:'
]
ffmpeg_proc = subprocess.Popen(args, stdout=subprocess.PIPE)



but I get this error


D:\Projects\Applications\VideoCapture\Virtualenv\Scripts\python.exe D:/Projects/Applications/VideoCapture/Sources/Application/video_capture.py "USB Video Device" 1280 720
ffmpeg version 4.4-full_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers
 built with gcc 10.2.0 (Rev6, Built by MSYS2 project)
 configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libglslang --enable-vulkan --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-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 56. 70.100 / 56. 70.100
 libavcodec 58.134.100 / 58.134.100
 libavformat 58. 76.100 / 58. 76.100
 libavdevice 58. 13.100 / 58. 13.100
 libavfilter 7.110.100 / 7.110.100
 libswscale 5. 9.100 / 5. 9.100
 libswresample 3. 9.100 / 3. 9.100
 libpostproc 55. 9.100 / 55. 9.100
Input #0, dshow, from 'video=USB Video Device':
 Duration: N/A, bitrate: N/A
 Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 640x480, 30 fps, 30 tbr, 10000k tbn, 10000k tbc
Stream mapping:
 Stream #0:0 -> #0:0 (rawvideo (native) -> rawvideo (native))
Press [q] to stop, [?] for help
video=USB Video Device: I/O error
Output #0, rawvideo, to 'pipe:':
 Metadata:
 encoder : Lavf58.76.100
 Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 1280x720, q=2-31, 663552 kb/s, 30 fps, 30 tbn
 Metadata:
 encoder : Lavc58.134.100 rawvideo
frame= 0 fps=0.0 q=0.0 Lsize= 0kB time=00:00:00.00 bitrate=N/A speed= 0x 
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)



The inportant row is USB Video Device : I/O error

I've tried also to add shell=True to the Popen but with the same result.

Doing some tests I found that using pycharm debug mode or simply lunching the same code inside "Pycharm Python Console" no more I/O error and all seems to work. I think something changes in the environment created for the subrocess but I wasn't able to understand what PyCharm is doing under the hood.


Here the output inside PyCharm Python Console


D:\Projects\Applications\VideoCapture\Virtualenv\Scripts\python.exe "C:\Program Files\JetBrains\PyCharm Community Edition 2019.1.1\plugins\python-ce\helpers\pydev\pydevconsole.py" --mode=client --port=65058
import sys; print('Python %s on %s' % (sys.version, sys.platform))
sys.path.extend(['D:\\Projects\\Applications\\VideoCapture', 'D:\\Projects\\Applications\\VideoCapture\\Sources\\Application', 'D:\\Projects\\Applications\\VideoCapture\\Sources\\Compiler', 'D:/Projects/Applications/VideoCapture'])
PyDev console: starting.
Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)] on win32
runfile('D:/Projects/Applications/VideoCapture/Sources/Application/video_capture.py', args=['USB Video Device', '1280', '720'], wdir='D:/Projects/Applications/VideoCapture/Sources/Application')
ffmpeg version 4.4-full_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers
 built with gcc 10.2.0 (Rev6, Built by MSYS2 project)
 configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libglslang --enable-vulkan --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-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 56. 70.100 / 56. 70.100
 libavcodec 58.134.100 / 58.134.100
 libavformat 58. 76.100 / 58. 76.100
 libavdevice 58. 13.100 / 58. 13.100
 libavfilter 7.110.100 / 7.110.100
 libswscale 5. 9.100 / 5. 9.100
 libswresample 3. 9.100 / 3. 9.100
 libpostproc 55. 9.100 / 55. 9.100
Input #0, dshow, from 'video=USB Video Device':
 Duration: N/A, start: 111984.462000, bitrate: N/A
 Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 640x480, 30 fps, 30 tbr, 10000k tbn, 10000k tbc
Stream mapping:
 Stream #0:0 -> #0:0 (rawvideo (native) -> rawvideo (native))
Press [q] to stop, [?] for help
Output #0, rawvideo, to 'pipe:':
 Metadata:
 encoder : Lavf58.76.100
 Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24(pc, progressive), 1280x720, q=2-31, 663552 kb/s, 30 fps, 30 tbn
 Metadata:
 encoder : Lavc58.134.100 rawvideo
av_interleaved_write_frame(): Invalid argument
 Last message repeated 1 times
Error writing trailer of pipe:: Invalid argument
frame= 118 fps= 30 q=-0.0 Lsize= 313200kB time=00:00:03.93 bitrate=652306.1kbits/s dup=53 drop=0 speed= 1x



Does anyone now how to fix this problem or have any knowledge on how PyCharm Python Console works ?