
Recherche avancée
Médias (91)
-
Spitfire Parade - Crisis
15 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Wired NextMusic
14 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
-
Video d’abeille en portrait
14 mai 2011, par
Mis à jour : Février 2012
Langue : français
Type : Video
-
Sintel MP4 Surround 5.1 Full
13 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
-
Carte de Schillerkiez
13 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (112)
-
Soumettre améliorations et plugins supplémentaires
10 avril 2011Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...) -
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 -
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)
Sur d’autres sites (3104)
-
OSError : MoviePy error : the file guitar.mp4 could not be found
9 septembre 2023, par dunnjm814I'm working on a video to audio converter with react and flask/python.
I have received a 500 with this error :


raise IOError(("MoviePy error: the file %s could not be found!\n"
OSError: MoviePy error: the file guitar.mp4 could not be found!
Please check that you entered the correct path.



EDIT : As stated in comments, moviepy VideoFileClip is looking for a path. Per suggestion, I am now attempting to write the incoming video file to a temp directory housed in the backend of the app. The updated stack trace shows the filepath printing, however when presented to VideoFileClip it is still unhappy.


The following snippet is the onSubmit for the video file upload :


const onSubmit = async (e) => {
 e.preventDefault()
 const data = new FormData()
 console.log('hopefully the mp4', videoData)
 data.append('mp3', videoData)
 console.log('hopefully a form object with mp4', data)
 const response = await fetch('/api/convert', {
 method: "POST",
 body: data
 })
 if (response.ok) {
 const converted = await response.json()
 setMp3(converted)
 console.log(mp3)
 } else {
 window.alert("something went wrong :(");
 }
 }



Here is a link to an image depicting the console output of my file upload
from within init.py


app = Flask(__name__)

app.config.from_object(Config)
app.register_blueprint(convert, url_prefix='/api/convert')

CORS(app)




from within converter.py


import os
from flask import Blueprint, jsonify, request
import imageio
from moviepy.editor import *


convert = Blueprint('convert', __name__)

@convert.route('', methods=['POST'])
def convert_mp4():
 if request.files['mp3'].filename:
 os.getcwd()
 filename = request.files['mp3'].filename
 print('hey its a file again', filename)
 safe_filename = secure_filename(filename)
 video_file = os.path.join("/temp/", safe_filename)
 print('hey its the file path', video_file)
 video_clip = VideoFileClip(video_file)
 print('hey its the VideoFileClip', video_clip)
 audio_clip = video_clip.audio
 audio_clip.write_audiofile(os.path.join("/temp/", f"{safe_filename}-converted.mp3"))

 video_clip.close()
 audio_clip.close()

 return jsonify(send_from_directory(os.path.join("/temp/", f"{safe_filename}-converted.mp3")))
 else:
 return {'error': 'something went wrong :('}





In the stack trace below you can see file printing the name of the video, my only other thought on why this may not be working was because it was getting lost in the post request, however the fact it is printing after my
if file:
check is leaving me pretty confused.

hey its a file again guitar.mp4
hey its the file path /temp/guitar.mp4
127.0.0.1 - - [22/Apr/2021 12:12:15] "POST /api/convert HTTP/1.1" 500 -
Traceback (most recent call last):
 File "/home/jasondunn/projects/audioconverter/.venv/lib/python3.8/site-packages/flask/app.py", line 2464, in __call__
 return self.wsgi_app(environ, start_response)
 File "/home/jasondunn/projects/audioconverter/.venv/lib/python3.8/site-packages/flask/app.py", line 2450, in wsgi_app
 response = self.handle_exception(e)
 File "/home/jasondunn/projects/audioconverter/.venv/lib/python3.8/site-packages/flask_cors/extension.py", line 161, in wrapped_function
 return cors_after_request(app.make_response(f(*args, **kwargs)))
 File "/home/jasondunn/projects/audioconverter/.venv/lib/python3.8/site-packages/flask/app.py", line 1867, in handle_exception
 reraise(exc_type, exc_value, tb)
 File "/home/jasondunn/projects/audioconverter/.venv/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
 raise value
 File "/home/jasondunn/projects/audioconverter/.venv/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
 response = self.full_dispatch_request()
 File "/home/jasondunn/projects/audioconverter/.venv/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
 rv = self.handle_user_exception(e)
 File "/home/jasondunn/projects/audioconverter/.venv/lib/python3.8/site-packages/flask_cors/extension.py", line 161, in wrapped_function
 return cors_after_request(app.make_response(f(*args, **kwargs)))
 File "/home/jasondunn/projects/audioconverter/.venv/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
 reraise(exc_type, exc_value, tb)
 File "/home/jasondunn/projects/audioconverter/.venv/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
 raise value
 File "/home/jasondunn/projects/audioconverter/.venv/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
 rv = self.dispatch_request()
 File "/home/jasondunn/projects/audioconverter/.venv/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
 return self.view_functions[rule.endpoint](**req.view_args)
 File "/home/jasondunn/projects/audioconverter/back/api/converter.py", line 20, in convert_mp4
 video_clip = VideoFileClip(video_file)
 File "/home/jasondunn/projects/audioconverter/.venv/lib/python3.8/site-packages/moviepy/video/io/VideoFileClip.py", line 88, in __init__
 self.reader = FFMPEG_VideoReader(filename, pix_fmt=pix_fmt,
 File "/home/jasondunn/projects/audioconverter/.venv/lib/python3.8/site-packages/moviepy/video/io/ffmpeg_reader.py", line 35, in __init__
 infos = ffmpeg_parse_infos(filename, print_infos, check_duration,
 File "/home/jasondunn/projects/audioconverter/.venv/lib/python3.8/site-packages/moviepy/video/io/ffmpeg_reader.py", line 270, in ffmpeg_parse_infos
 raise IOError(("MoviePy error: the file %s could not be found!\n"
OSError: MoviePy error: the file /temp/guitar.mp4 could not be found!
Please check that you entered the correct path.



thanks in advance for taking a look/future advice. First official post on Stack Overflow :)


-
avfilter/vf_transpose_vulkan : add clock and cclock option
10 décembre 2021, par Wu Jianhuaavfilter/vf_transpose_vulkan : add clock and cclock option
The following command is on how to apply cclock option :
ffmpeg -init_hw_device vulkan -i input.264 -vf \
hwupload=extra_hw_frames=16,transpose_vulkan=dir=cclock,hwdownload,format=yuv420p \
output.264The following command is on how to apply clock_flip option :
ffmpeg -init_hw_device vulkan -i input.264 -vf \
hwupload=extra_hw_frames=16,transpose_vulkan=dir=clock_flip,hwdownload,format=yuv420p \
output.264The following command is on how to apply clock option :
ffmpeg -init_hw_device vulkan -i input.264 -vf \
hwupload=extra_hw_frames=16,transpose_vulkan=dir=clock,hwdownload,format=yuv420p \
output.264Signed-off-by : Wu Jianhua <jianhua.wu@intel.com>
-
How to overlay clock with real-time in screen recording using ffmpeg for Sharex open source ?
1er septembre 2022, par calengineerI currently have ShareX and using the following command but the clock with real time is not being added and the video gets considerably cut. A 30 second video turns out to be a 4 second video.


-hide_banner -f dshow -thread_queue_size 1024 -rtbufsize 256M -audio_buffer_size 80 -framerate 30 -i video="screen-capture-recorder":audio="virtual-audio-capturer" -f dshow -i audio="Microphone (HyperX QuadCast S)" -filter_complex amix=inputs=2:duration=longest -vf "drawtext=fontfile=/usr/share/fonts/dejavu/DejaVuSans-Bold.ttf: \ text='%{localtime\:%T}': fontcolor=white@0.8: x=7: y=700" -c:v libx264 -r 30 -preset ultrafast -tune zerolatency -crf 28 -pix_fmt yuv420p -movflags +faststart -c:a aac -ac 2 -b:a 128k -y "output.mp4"