
Recherche avancée
Autres articles (38)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
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
Sur d’autres sites (6668)
-
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 ?
-
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 - Turn a 1280x720 video into 720x1280 video and add blur
6 janvier 2021, par offishI've searched around and found multiple solutions. I've found one that works well, but the final video ends up being too big which makes the rendering slow.


I'm giving it a 1280x720 video and want it to turn out like shown here with 720x1280 as the resolution.


-lavfi "[0:v]scale=256/81*iw:256/81*ih,boxblur=luma_radius=min(h\,w)/40:luma_power=3:chroma_radius=min(cw\,ch)/40:chroma_power=1[bg];[bg][0:v]overlay=(W-w)/2:(H-h)/2,setsar=1,crop=w=iw*81/256"



This video ends up being 1280x2274 instead of 720x1280, everything else is fine except the speed and resolution.


-lavfi [0:v]scale=16/9*iw:16/9*ih,boxblur=luma_radius=min(h\,w)/40:luma_power=3:chroma_radius=min(cw\,ch)/40:chroma_power=1[bg];[bg][0:v]overlay=(W-w)/2:(H-h)/2,setsar=1,crop=w=720:h=1280



This cuts the original video, but ends up being 720x1280, faster than the first solution.


-lavfi "[0:v]scale=256/81*iw:256/81*ih,boxblur=luma_radius=min(h\,w)/40:luma_power=3:chroma_radius=min(cw\,ch)/40:chroma_power=1[bg];[bg][0:v]overlay=(W-w)/2:(H-h)/2,setsar=1,crop=w=iw*81/256,scale=720:1280"



This is the same as the first one, but it gets scaled again. It has the correct resolution, but is way to slow for my liking (only about 3.6 it/s, when I've tried other solutions which fluctuates around 35 it/s).


I guess my scaling is wrong, but I don't understand what I should multiply and divide by, to get the result I'm looking for.


Thanks.