
Recherche avancée
Médias (1)
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (61)
-
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 -
Contribute to documentation
13 avril 2011Documentation is vital to the development of improved technical capabilities.
MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
To contribute, register to the project users’ mailing (...) -
Use, discuss, criticize
13 avril 2011, parTalk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
A discussion list is available for all exchanges between users.
Sur d’autres sites (9362)
-
FFMPEG reads fps of input h264 file wrong, resulting in wrong duration of output file
20 janvier 2015, par JolJolsI am trying to convert an .h264 file created with python from an incoming stream to xvid format with ffmpeg.
The file is 30min long and 12fps. However, the converted file automatically creates a file that is 25fps and thus 14.4min long. If I set fps like
ffmpeg -i test.h264 -r 12 test.avi
it creates a video of 14.4min long with a fps of 12.How can I set it to see the incoming video as 12fps ? I tried recording immediately in xvid coded in python using FOURCC but on mac OS X the only codec that seems to work is mp4v. I also tried using MP4Box, which creates the right video duration and fps but for which I cannot set it to the xvid coded (which I need).
-
How to concat the mp3 file and webm file into a new webm file ?
12 août 2015, par it_is_a_literatureThere is a webm file that contains no audio. I want to merge an audio file with this video. I’ve tried the following command :
ffmpeg -i /home/test.mp3 -i /home/output.webm -vcodec copy -acodec copy /home/newtest.webm
And received the error :
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument.
-
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"]