
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 (63)
-
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...) -
Installation en mode ferme
4 février 2011, parLe mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
C’est la méthode que nous utilisons sur cette même plateforme.
L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...) -
La sauvegarde automatique de canaux SPIP
1er avril 2010, parDans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)
Sur d’autres sites (12418)
-
Demuxing RTSP stream using GStreamer and sending to FFmpeg using MPEG-TS via TCP
25 janvier 2023, par Brian SchrameckI am trying to run a pipeline that will read an h264/aac stream from RTSP and push it to an FFmpeg TCP socket (that FFmpeg instance will re-publish as another RTSP stream, I know it's odd). Requirements :


- 

- The RTSP client at the start of this pipeline MUST be GStreamer (i.e. I can't use FFmpeg to read the RTSP stream, only to publish).
- The RTSP client at the end of the pipeline MUST be FFmpeg.






My pipeline works for video but adding audio has been a challenge. Here's the current GStreamer pipeline :


gst-launch-1.0 rtspsrc location=rtsp://{camIp}/live name=cam \
 cam. ! rtph264depay ! h264parse ! queue ! mux. \
 cam. ! rtpmp4gdepay ! aacparse ! queue ! mux. \
 mpegtsmux name=mux ! tcpclientsink host=${ip} port=${port} sync=false



Then, FFmpeg is listening like this :


ffmpeg -f mpegts -i tcp://${ip}:${port} \
 -rtsp_transport tcp -vcodec copy -an -f rtsp rtsp://${rtspIp}:${rtspPort}/d8a5bb19e63326d7



This pipeline works if I remove the audio by removing
cam. ! rtpmp4gdepay ! aacparse ! queue ! mux.
in my GStreamer chain. However, with audio added FFmpeg won't publish the data to my RTSP client ; FFmpeg starts probing the GStreamer output and then exits for no apparent reason.

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


-
How to setup ffmpeg in docker container
15 novembre 2022, par TorRI want to compress the video from project directory using ffmpeg in python


the video is saved from
cv2.VideoCapture(rtsp_url)


Normally it run without problem in my local machine, but when I dockerize my app it seems docker container can't recognize ffmpeg or I missed something.


def compress(name):
 with open(name) as f:
 output = name[0:-4] + "-f"+ ".mp4"
 input = name
 subprocess.run('ffmpeg -i ' + input + ' -vcodec libx264 ' + output)

video = cv2.VideoCapture(rtsp_url) # This is where the video comming from
fileName = saveToProjDir(video) # Save the video to project directory and return the name
compress(fileName) # Compress the video




It throws exception



Exception in thread Thread-8 (compress):
Traceback (most recent call last):
 File "/usr/local/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
 self.run()
 File "/usr/local/lib/python3.11/threading.py", line 975, in run
 self._target(*self._args, **self._kwargs)
 File "/app/main.py", line 59, in compress
 subprocess.run('ffmpeg -i ' + input + ' -vcodec libx264 ' + output)
 File "/usr/local/lib/python3.11/subprocess.py", line 546, in run
 with Popen(*popenargs, **kwargs) as process:
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/usr/local/lib/python3.11/subprocess.py", line 1022, in __init__
 self._execute_child(args, executable, preexec_fn, close_fds,
 File "/usr/local/lib/python3.11/subprocess.py", line 1899, in _execute_child
 raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'ffmpeg -i cam1_2022-11-15125845.avi -vcodec libx264 cam1_2022-11-15125845-f.mp4'




This is how I docker my python app.



FROM python:3.11.0

WORKDIR /app/

ENV VIRTUAL_ENV = /env
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"

COPY requirements.txt .

RUN pip install -r requirements.txt
RUN apt-get -y update
RUN apt-get install ffmpeg libsm6 libxext6 -y

ADD main.py .
CMD ["python","/app/main.py"]