
Recherche avancée
Autres articles (86)
-
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 ;
-
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 -
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs
Sur d’autres sites (15293)
-
How to Bulk Speed UP and Crop Videos FFMPEG
6 septembre 2023, par Usemo ShankI have videos in (input) folder that is located on the root of the script, I also have output folder on the root, The input folder has several videos that i want to speed up in bulk by 1.1 percent, I also want to cropt the videos by 90 percent (Meaning 90 Percent of original video is visible).


I have a code that does not function well. Here is the code I have


import os
import subprocess

# Define input and output directories
input_folder = "input"
output_folder = "output"

# Create the output directory if it doesn't exist
if not os.path.exists(output_folder):
 os.makedirs(output_folder)

# List all video files in the input directory
input_files = [f for f in os.listdir(input_folder) if f.endswith(('.mp4', '.avi', '.mkv'))]

# Speed up and crop each video
for input_file in input_files:
 input_path = os.path.join(input_folder, input_file)
 output_file = os.path.splitext(input_file)[0] + "_speed_crop.mp4"
 output_path = os.path.join(output_folder, output_file)

 # FFmpeg command to speed up video by 1.1x and crop to 90%
 ffmpeg_command = [
 "ffmpeg",
 "-i", input_path,
 "-vf", "setpts=1.1*PTS,crop=in_w*0.9:in_h*0.9",
 "-c:v", "libx264",
 "-crf", "20",
 "-c:a", "aac",
 "-strict", "experimental",
 output_path
 ]

 # Run FFmpeg command
 subprocess.run(ffmpeg_command)

print("Conversion complete.")



-
lavf : move AVStream.info to AVStreamInternal
9 octobre 2020, par Anton Khirnovlavf : move AVStream.info to AVStreamInternal
This struct is for internal use of avformat_find_stream_info(), so it
should not be exposed in public headers. Keep a stub pointer in its
place to avoid changing AVStream layout, since e.g. ffmpeg.c accesses
some fields located after it (even though they are marked as private). -
oggenc : Support flushing the muxer
29 mai 2014, par Martin Storsjöoggenc : Support flushing the muxer
This allows the caller to write all buffered data to disk, allowing
the caller to know at what byte position in the file a certain
packet starts (any packet written after the flush will be located
after that byte position).Signed-off-by : Martin Storsjö <martin@martin.st>