
Recherche avancée
Médias (1)
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (92)
-
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 (...) -
Configuration spécifique pour PHP5
4 février 2011, parPHP5 est obligatoire, vous pouvez l’installer en suivant ce tutoriel spécifique.
Il est recommandé dans un premier temps de désactiver le safe_mode, cependant, s’il est correctement configuré et que les binaires nécessaires sont accessibles, MediaSPIP devrait fonctionner correctement avec le safe_mode activé.
Modules spécifiques
Il est nécessaire d’installer certains modules PHP spécifiques, via le gestionnaire de paquet de votre distribution ou manuellement : php5-mysql pour la connectivité avec la (...) -
ANNEXE : Les plugins utilisés spécifiquement pour la ferme
5 mars 2010, parLe site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)
Sur d’autres sites (7120)
-
Anomalie #4308 (Nouveau) : Objet sans statut : problème avec objet_instituer()
7 mars 2019, par tcharlss (*´_ゝ`)Le contexte
J’ai un objet éditorial sans statut, et avec une date.
La date est bien déclarée dans declarer_tables_objets_sql :'date' => 'date'
Le formulaire d’édition permet de modifier directement la date, sans avoir à passer par#FORMULAIRE_DATER
.Problème
La date saisies par l’utilisateur n’est pas enregistrée, ça remet systématiquement la date actuelle.
À la toute fin des traitements, dans la fonction objet_editer_heritage(), on retrouve bien la date correcte dans le tableau des champs à modifier qui est transmis à sql_updateq().
Par contre il y également le champ ’statut’, hors il n’a rien à faire là : ça provoque une erreur SQL.Voici ce que renvoie
var_dump($champs)
:array (size=2) ’statut’ => string ’’ (length=0) ’date’ => string ’2019-01-22 00:00:00’ (length=19)
C’est en amont dans objet_instituer() que le tabeau des champs à modifier est contruit.
Il semble qu’il y a des tests effectués pour vérifier la présence du champ de statut dans la table, pourtant même en son absence il se retrouve dans la liste.
Je n’arrive pas à mettre le doigt sur l’endroit exact où ça coince, RastaPopoulos me dit que ça doit se jouer vers la ligne 333Solution
Pas vraiment une solution, mais ça montre bien que c’est l’absence de statut qui fait tout planter : quand je retire la clé ’statut’ dans au moyen du pipeline
pre_edition
, ça marche. -
Banding/ Trailing while resizing GIF with transparency using FFMPEG
30 septembre 2019, par Arpit KumarI am trying to resize a gif using ffmpeg. link here
This is the command for resizing GIF
ffmpeg -i default.gif -filter_complex "[0:v] scale=320:-1:flags=lanczos,split [a][b]; [a] palettegen=reserve_transparent=on:transparency_color=ffffff [p]; [b][p] paletteuse" resize.gif
The problem is with the output. The output GIF has huge "banding/ trailing" effect
Sample output of the file is here Output here
I am not sure what is it that I am doing wrong and how can I fix this banding/ trailing effect.
I am using FFMPEG on macOS Mojave, ffmpeg version is 4.1.1. Below is the output of the command
ffmpeg version 4.1.1 Copyright (c) 2000-2019 the FFmpeg developers
built with Apple LLVM version 10.0.0 (clang-1000.11.45.5)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1.1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk/Contents/Home/include/darwin' --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-videotoolbox --disable-libjack --disable-indev=jack --enable-libaom --enable-libsoxr
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
Input #0, gif, from 'ear_s_01.gif':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: gif, bgra, 640x480, 12.50 fps, 12.50 tbr, 100 tbn, 100 tbc
Stream mapping:
Stream #0:0 (gif) -> scale
paletteuse -> Stream #0:0 (gif)
Press [q] to stop, [?] for help
Output #0, gif, to 'resize.gif':
Metadata:
encoder : Lavf58.20.100
Stream #0:0: Video: gif, pal8, 320x240, q=2-31, 200 kb/s, 12.50 fps, 100 tbn, 12.50 tbc
Metadata:
encoder : Lavc58.35.100 gif
[Parsed_palettegen_2 @ 0x7f7f19001180] 255(+1) colors generated out of 91324 colors; ratio=0.002792
[Parsed_palettegen_2 @ 0x7f7f19001180] Dupped color: FF100C0A
frame= 37 fps=0.0 q=-0.0 Lsize= 453kB time=00:00:02.89 bitrate=1283.8kbits/s speed=7.33x
video:452kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.237091% -
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 ?