
Recherche avancée
Médias (2)
-
Exemple de boutons d’action pour une collection collaborative
27 février 2013, par
Mis à jour : Mars 2013
Langue : français
Type : Image
-
Exemple de boutons d’action pour une collection personnelle
27 février 2013, par
Mis à jour : Février 2013
Langue : English
Type : Image
Autres articles (72)
-
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...) -
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 (...) -
Support de tous types de médias
10 avril 2011Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)
Sur d’autres sites (6994)
-
Check audio and video codec from base64 video file in Django
6 juillet 2024, par mahmudsajibI'm currently working on a Django project where I need to check the audio and video codec of a base64-encoded video file. To achieve this, I've implemented a function that decodes the base64 string into binary data and then attempts to load the video clip using MoviePy. However, I'm encountering an
AttributeError: '_io.BytesIO' object has no attribute 'endswith'
when trying to run the code.

Here's the relevant part of the code :


import base64
from io import BytesIO
from moviepy.editor import VideoFileClip

def get_video_codec_info(base64_data):
 # Decode base64 string into binary data
 _format, _file_str = base64_data.split(";base64,")
 binary_data = base64.b64decode(_file_str)

 # Load the video clip using MoviePy
 clip = VideoFileClip(BytesIO(binary_data))

 # Get information about the video codec
 codec_info = {
 'video_codec': clip.video_codec,
 'audio_codec': clip.audio_codec,
 }

 return codec_info



The error occurs at the line
clip = VideoFileClip(BytesIO(binary_data))
and it seems related to the use ofBytesIO
. I've tried to find a solution, but I'm stuck at the moment.

Any suggestions on how to resolve this issue or alternative approaches to check the audio and video codec of a base64-encoded video file in Django would be greatly appreciated. Thanks !


-
ffmpeg transconding one input video stream and multiple output video streams in the same file
13 mars 2013, par user2165262I am trying to transcode a single video file with 1 video stream and several audio streams to the file having same video stream in different bitrates/sizes with correct padding at the same time.
the command I use is :
ffmpeg -y -ss 600 -t 600 -i "INPUT.mkv" -map_chapters -1 -map 0:0 -c:v libx264 -keyint_min 48 -g 96 -bufsize 350k -b:v 350k -minrate 300k -maxrate 400k -profile:v baseline -level 3.0 -preset slow -vf "scale=iw*min(480/iw\,272/ih):ih*min(480/iw\,272/ih),pad=480:272 :(480-iw)/2 :(272-ih)/2" -map 0:0 -c:v libx264 -keyint_min 48 -g 96 -bufsize 650k -b:v 650k -minrate 500k -maxrate 800k -profile:v baseline -level 3.1 -preset slow -vf "scale=iw*min(640/iw\,360/ih):ih*min(640/iw\,360/ih),pad=640:360 :(640-iw)/2 :(360-ih)/2" -map 0:1 -c:a libfaac -b:a 32k -ar 44100 -f mpegts OUTPUT.m2ts
ffmpeg creates two video streams, however the bitrate and resolution for all of them are taken from the last video arguments - i.e. both streams are 640x360 :
Output #0, mpegts, to 'OUTPUT.m2ts' : Stream #0:0(eng) : Video : h264, yuv420p, 640x360 [SAR 559:560 DAR 559:315], q=-1—1, 650 kb/s, Stream #0:1(eng) : Video : h264, yuv420p, 640x360 [SAR 559:560 DAR 559:315], q=-1—1, 650 kb/s, 90k tbn, 23.98 tbc (default) Stream #0:2(rus) : Audio : aac, 44100 Hz, 5.1, s16, 32 kb/s (default) Stream mapping : Stream #0:0 -> #0:0 (h264 -> libx264) Stream #0:0 -> #0:1 (h264 -> libx264) Stream #0:1 -> #0:2 (aac -> libfaac) Press [q] to stop, [?] for help
Is it practically possible to make transcoding to several bitrates to the same file ?
-
save caca (ascii video) to an mp4 video [on hold]
8 juillet 2013, par user2559158No problems viewing a caca file from mplayer (mplayer -vo caca), and it's also possible view the video file as caca with ffmpeg (fmpeg -i file.mp4 -f caca -pix_fmt rgb24 outputfile.mp4), but neither saves the file. Is there anyway to do it ?