
Recherche avancée
Médias (91)
-
Les Miserables
9 décembre 2019, par
Mis à jour : Décembre 2019
Langue : français
Type : Textuel
-
VideoHandle
8 novembre 2019, par
Mis à jour : Novembre 2019
Langue : français
Type : Video
-
Somos millones 1
21 juillet 2014, par
Mis à jour : Juin 2015
Langue : français
Type : Video
-
Un test - mauritanie
3 avril 2014, par
Mis à jour : Avril 2014
Langue : français
Type : Textuel
-
Pourquoi Obama lit il mes mails ?
4 février 2014, par
Mis à jour : Février 2014
Langue : français
-
IMG 0222
6 octobre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Image
Autres articles (28)
-
Contribute to translation
13 avril 2011You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
MediaSPIP is currently available in French and English (...) -
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 (...) -
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...)
Sur d’autres sites (4546)
-
avfilter/scale_vulkan : add dynamic crop region and aspect ratio match
26 novembre 2024, par Koushik Duttaavfilter/scale_vulkan : add dynamic crop region and aspect ratio match
The scale_vulkan filter initializes the shader once, with the crop
region set by the original frame. However, subsequent frames may
specify a different crop region than the first frame. This change
updates the cropping to match the behavior present on the other
hardware frame scale filters.The scale filter should also allow negative values
that respect aspect ratio, similar to other scale filters.Signed-off-by : Koushik Dutta <koushd@gmail.com>
-
FFmpeg h264_v4l2m2m encoder changing aspect ratio from 16:9 to 1:1 with black bars
8 janvier, par LycoReco2007When switching from libx264 to h264_v4l2m2m encoder in FFmpeg for YouTube streaming, the output video's aspect ratio changes from 16:9 to 1:1 with black bars on the sides, despite keeping the same resolution settings.


Original working command (with libx264) :


ffmpeg -f v4l2 \
 -input_format yuyv422 \
 -video_size 1280x720 \
 -framerate 30 \
 -i /dev/video0 \
 -f lavfi \
 -i anullsrc=r=44100:cl=stereo \
 -c:v libx264 \
 -preset ultrafast \
 -tune zerolatency \
 -b:v 2500k \
 -c:a aac \
 -b:a 128k \
 -ar 44100 \
 -f flv rtmp://a.rtmp.youtube.com/live2/[STREAM-KEY]



When I replaced
libx264
withh264_v4lm2m
, it always produce a square resolution, and it automatically adds black bars to the top and the bottom of the sides of the camera. I currently using a Rasberry Pi 4 model B, with a webcam that I believe supports the 16:9 ratio (I've verified usingv4l2-ctl --list-formats-ext -d /dev/video0
command)

I've tried the follows :


- 

- Adding
-aspect 16:9
parameter in the ffmpeg command - Adding video filters such as
-vf "scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:(ow-iw)/2:(oh-ih)/2,setsar=1"

None of these give me the correct aspect ratio.






How can I make the h264_v4l2m2m encoder maintain the original 16:9 aspect ratio without adding black bars ? Is this a known limitation of the encoder, or am I missing some required parameters ?


- Adding
-
Editing Caption in Video Message Changes Aspect Ratio to Square
12 octobre 2024, par Shayki AbramczykI'm working on a Telegram bot that processes videos by adding a watermark and then edits the original message to replace the video in a channel post. The issue I'm encountering is that when I edit the message with the new video, the aspect ratio changes, and the video becomes a square, even though the original video is in vertical format.


Here’s a simplified version of the code I’m using to edit the message with the processed video :


video_file = await video.get_file()
print(video_file)
random = randint(0,9999)
input_path = f"input_{user_id}_{random}.mp4"
output_path = f"output_{user_id}_{random}.mp4"
await video_file.download_to_drive(input_path)

loop = asyncio.get_event_loop()
executor = ThreadPoolExecutor()
await loop.run_in_executor(executor, process_video_sync, input_path, output_path, watermark_path, settings)

try:
 if return_file:
 return open(output_path, 'rb')
 if channel:
 chat_id = post.chat_id
 message_id = post.message_id
 caption = post.caption if post.caption else ""
 if settings['has_signature']:
 signature = settings['signature']
 else:
 caption = post.caption_html if post.caption_html else (post.caption or "")
 video_clip = VideoFileClip(output_path)
 await context.bot.edit_message_media(
 chat_id=chat_id,
 message_id=message_id,
 media=InputMediaVideo(media=open(output_path, 'rb'), width=video_clip.w, height=video_clip.h, caption=caption, parse_mode="HTML")
 )
 elif update.message:
 caption = update.message.caption if update.message.caption else ""
 video_clip = VideoFileClip(output_path)
 
 with open(output_path, 'rb') as video_file:
 await update.message.reply_video(
 video=InputFile(video_file),
 caption=caption,
 width=video_clip.w,
 height=video_clip.h,
 supports_streaming=True
 )
except Exception as e:
 logger.error("Error in sending video. Exception Type:", e.args[0][0], "Message:", e.args[0][1])
finally:
 os.remove(input_path)
 os.remove(output_path)



When editing the message in a channel, the video’s aspect ratio changes from vertical to square (if the video is horizonal it's ok). However, if I send the video as a new message, the aspect ratio remains correct.


How can I ensure that when I edit the video in the channel, the aspect ratio stays the same as the original, and doesn’t get cropped or turned into a square ?


EDIT :


I found it's because I editing the video caption and added there some HTML elements which cause it.


If I just add a simple text it's ok.


Why ?