
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (51)
-
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...) -
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 (3475)
-
Editing Video in Channel Changes Aspect Ratio to Square
11 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 ?


-
look for a specific filetype in a directory in php and send it to a different directory after conversion
12 juin 2019, par flashI have a directory in which there is a mp4 file (including other files as well) which I want to convert into mp3 and then send it to different directory. I have used the following command line command to covert into mp3 and its working perfectly fine.
ffmpeg -i 36031P.mp4 -map 0:2 -ac 1 floor_english.mp3
mp4 file is inside in_folder. Using ffmpeg, I want to convert mp4 file into mp3 and send it to out_folder.
<?php
$dir = 'in_folder';
$files1 = scandir($dir);
print_r($files1); /* It lists all the files in a directory including mp4 file*/
?>print_r($files1) lists all the file in a directory including mp4file.
Problem Statement :
I am wondering what php code I need to write so that it looks for only mp4 file inside the directory and send it to different directory (let say out_folder) after converting into mp3.
The pictorial representation of what I want :
-
avfilter/vsrc_gradients : add square type
26 novembre 2023, par Paul B Mahol