
Recherche avancée
Autres articles (88)
-
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...) -
Participer à sa traduction
10 avril 2011Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
Actuellement MediaSPIP n’est disponible qu’en français et (...) -
Gestion des droits de création et d’édition des objets
8 février 2011, parPar défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;
Sur d’autres sites (12525)
-
Stream RAW8 video from camera using openCV and Python [Windows]
14 novembre 2022, par awinWe have a camera that streams RAW8 video at 1920x1080. The GUID used is GREY. We are able to stream video from this camera using ffmpeg on Windows with the below command :


ffmpeg -f dshow -pix_fmt gray -video_size 1920x1080 -i video="CAM0" -f nut - | ffplay -



We are now trying to grab images from this camera using OpenCV using the below code snippet, but its unable to grab any frame (frame_grabbed is always false)


import cv2
import numpy as np

# reading the video from CAM0
source = cv2.VideoCapture(1)

height = 1920
width = 1080

source.set(cv2.CAP_PROP_FRAME_WIDTH, width)
source.set(cv2.CAP_PROP_FRAME_HEIGHT, height)


image = np.zeros([height, width, 3], np.uint8)

while True:
 # Extracting the frames
 frame_grabbed , image = source.read()

 if (frame_grabbed ):
 colour1 = cv2.cvtColor(image, cv2.COLOR_BayerRG2BGR)
 cv2.imshow("Demosaiced image", colour1)
 else:
 print("No images grabbed")

#Exit on q
 key = cv2.waitKey(1)
 if key == ord("q"):
 break

# closing the window
cv2.destroyAllWindows()
source.release()




Are we missing something here ?


We then came across this post to pipe ffmpeg output to python (link). However, when we are passing the command as below :


command = [ 'ffmpeg.exe',
 '-f', 'dshow',
 '-i', 'video="CAM0"',
 '-pix_fmt', 'gray',
 '-video_size','1920x1080'
 '-f', 'nut', '-']



its throwing




Could not find video device with name ["CAM0"] among source devices
of type video. video="CAM0" : I/O error




I have verified that the camera is present using the below command :


command = [ 'ffmpeg.exe',
 '-list_devices', 'true',
 '-f', 'dshow',
 '-i', 'dummy']



This detects CAM0 as shown below :


ffmpeg version 5.0.1-full_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers
 built with gcc 11.2.0 (Rev7, 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-bzlib --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-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-liblensfun --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-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-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 57. 17.100 / 57. 17.100
 libavcodec 59. 18.100 / 59. 18.100
 libavformat 59. 16.100 / 59. 16.100
 libavdevice 59. 4.100 / 59. 4.100
 libavfilter 8. 24.100 / 8. 24.100
 libswscale 6. 4.100 / 6. 4.100
 libswresample 4. 3.100 / 4. 3.100
 libpostproc 56. 3.100 / 56. 3.100
[dshow @ 000001ea39e40600] "HP HD Camera" (video)
[dshow @ 000001ea39e40600] Alternative name "@device_pnp_\\?\usb#vid_04f2&pid_b6bf&mi_00#6&1737142c&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global"
[dshow @ 000001ea39e40600] "CAM0" (video)
[dshow @ 000001ea39e40600] Alternative name "@device_pnp_\\?\usb#vid_0400&pid_0011&mi_00#7&1affbd5b&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global"



In short, we are able to capture video using ffmpeg commandline, but unable to grab any frame using OpenCV videocapture or ffmpeg in opencv. Any pointers ?


Thanks !


-
Docker fails to import FFMPEG or does not find it
8 décembre 2022, par stxssSo I'm trying to create a telegram bot using python and ffmpeg and I want to deploy it to a server through a docker image.


I already looked through a lot of resources as I've been looking at the same 5 lines of code for the past three days and neither discords, stack overflow previous answers have helped me.


This is my dockerfile where half of the program works (apart from the ffmpeg functionality).


FROM python:3.9

RUN mkdir /app
WORKDIR /app

COPY requirements.txt ./
RUN pip3 install --no-cache-dir --user -r requirements.txt

COPY . .

ENTRYPOINT ["/usr/bin/python3", "./app.py" ]



With this code I get the following error when trying to use a function that invokes ffmpeg functionality.


Traceback (most recent call last):
File "/root/.local/lib/python3.9/site-packages/pyrogram/dispatcher.py", line 240, in handler_worker
await handler.callback(self.client, *args)
File "/app/./app.py", line 274, in choice_from_inline
await helpers.trim_file(trim_length, "audio", chat_id_for_join.strip())
File "/app/helpers.py", line 53, in trim_file
output = ffmpeg.output(
File "/root/.local/lib/python3.9/site-packages/ffmpeg/_run.py", line 313, in run
process = run_async(
File "/root/.local/lib/python3.9/site-packages/ffmpeg/_run.py", line 284, in run_async
return subprocess.Popen(
File "/usr/lib/python3.9/subprocess.py", line 951, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.9/subprocess.py", line 1823, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'ffmpeg'



Another issue is that when changing the ENTRYPOINT (or using CMD) to
["python3", "./app.py" ]
everything works well locally but as soon as I try to deploy, the deployment/docker container just doesn't work or crash because I get the error ofModuleNotFoundError: No module named 'ffmpeg'
.

I have already tried setting up different ENV PATH and ENV PYTHONPATH, does absolutely nothing.
I have tried to use
COPY --from=jrottenberg/ffmpeg /usr/local ./
and it also doesn't work.
I have tried to explicitly useRUN apt-get install -y ffmpeg
and similar commands, pip, pip3, etc.. it just doesn't work.

I tried to use the copy command to access the
/root/.local/lib/python3.9/site-packages/ffmpeg/_run.py
but I either get a permission denied or a file does not exist error.

I am also using the ffmpeg-python wrapper and am using a windows machine if that's of any importance.


At this point I'm contemplating of finding another way of implementing the functionality I want without using ffmpeg.


I think I added everything I had, if needed more I can provide.


-
Compress videofiles from context menu in Windows 11 using ffmpeg
11 janvier 2023, par RayearthI'd looking for an easy way to just right click on a folder in Windows and be able to loop through video files and compress them with ffmpeg with prepared command settings.


Been able to prepare the reg file to import but I think I'm missing something important here (working directory reference I think). How should I pass the working dir path inside a command like that for this mechanism to work ?


Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\Shell\Compress_videos]
@="Compress videos"

[HKEY_CLASSES_ROOT\Directory\Shell\Compress_videos\command]
@="cmd /c for \"%E\" in (.mp4, .mkv, .mov, .avi) do forfiles /m *\"%E\" /c \"cmd /c C:\\Windows\\System32\\ffmpeg.exe -hide_banner -y -hwaccel cuda -i @path -c:v hevc_nvenc -b:v 8000k -c:a copy @fname_compressed.mp4\""