
Recherche avancée
Médias (5)
-
ED-ME-5 1-DVD
11 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
-
Valkaama DVD Cover Outside
4 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
Valkaama DVD Label
4 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Image
-
Valkaama DVD Cover Inside
4 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
Autres articles (33)
-
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 (...) -
Participer à sa documentation
10 avril 2011La documentation est un des travaux les plus importants et les plus contraignants lors de la réalisation d’un outil technique.
Tout apport extérieur à ce sujet est primordial : la critique de l’existant ; la participation à la rédaction d’articles orientés : utilisateur (administrateur de MediaSPIP ou simplement producteur de contenu) ; développeur ; la création de screencasts d’explication ; la traduction de la documentation dans une nouvelle langue ;
Pour ce faire, vous pouvez vous inscrire sur (...) -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (5689)
-
Best way to cut by audio level in ffmpeg ?
17 octobre 2019, par Aayla PozhoI have several hundred video files with varying amounts of frames that are silent but not blank at the beginning (5-10 seconds). I need to remove these few seconds of silence based on the audio levels, and I would prefer to do it as efficiently as possible as I have several hundred of these files to process.
I recently found this post and confirmed that all audio tracks have a value of "-inf" until the point I want to cut, but I’m not entirely sure where to proceed from here.
-
FFMPEG set ZxY width and height thumbnail while keeping aspect ratio with padding
22 janvier 2023, par AlanSTACKI have been searching Stack Overflow for code to create thumbnails using FFmpeg.


But the options I've come across either result in distorted thumbnails when using the -s 100x100 and a specific frame, or only correctly scale one side of the image when using -vf 100 :-1. This is an issue for me as all thumbnails need to be the same size.


Is there a way to achieve both a set height/width and maintain a consistent aspect ratio, such as filling in blank spaces with black boxes ?


-
Transcoding Videos Using FastAPI and ffmpeg
15 janvier 2024, par Sanji VinsmokeI created an API using Fast API where I upload one or more videos, may specify the resolution of transcoding, and the output is transcoded video from 240p upto the resolution I specified. Available resolutions are - 240p, 360p, 480p, 720p, 1080p. I used ffmpeg for the transcoding job.


The problem that is bugging me since yesterday is that, after deploying to the s3 bucket and adding the url for the index.m3u8 file in any hls player, the video is blank. Only the audio and streaming are working. I have tried tweaking with the parameters in the ffmpeg parameters, the error is still there. I tried manually transcoding a video file locally, even that video's index.m3u8 file is blank in live version. I added the relevant codes for this project. I implemented each feature one by one, but I simply cannot find the reason why the video is totally blank on live.


def transcode_video(input_path, output_folder, res, video_id, video_resolution, progress_bar=None):
 # Transcode the video into .m3u8 format with segment format
 output_path = os.path.join(output_folder, f"{res}_{video_id}.m3u8")

 # Use subprocess for command execution
 chunk_size = 1 # Specify the desired chunk size in seconds

 transcode_command = [
 "ffmpeg", "-i", input_path, "-vf", f"scale={res}:'trunc(ow/a/2)*2'", "-c:a", "aac", "-strict", "-2",
 "-f", "segment", "-segment_time", str(chunk_size), "-segment_list", output_path, "-segment_format", "ts",
 f"{output_path.replace('.m3u8', '_%03d.ts')}"
 ]

 try:
 subprocess.run(transcode_command, check=True, capture_output=True)
 except subprocess.CalledProcessError as e:
 print(f"Error during transcoding: {e}")
 print(f"FFmpeg error output: {e.stderr}")
 # Continue with the next video even if an error occurs
 return False

 # Update the progress bar
 if progress_bar:
 progress_bar.update(1)
 return True


def get_bandwidth(resolution):
 # Define a simple function to calculate bandwidth based on resolution
 resolutions_and_bandwidths = {
 240: 400000,
 360: 850000,
 480: 1400000,
 720: 2500000,
 1080: 4500000,
 }
 
 return resolutions_and_bandwidths.get(resolution, 0)
def create_index_m3u8(video_id, resolutions_to_transcode):
 # Write the index.m3u8 file
 index_m3u8_path = os.path.join(OUTPUT_FOLDER, f"index_{video_id}.m3u8")
 with open(index_m3u8_path, "w") as index_file:
 index_file.write("#EXTM3U\n")
 index_file.write("#EXT-X-VERSION:3\n")

 for res in resolutions_to_transcode:
 aspect_ratio = 16 / 9
 folder_name = f"{res}p_{video_id}"
 resolution_file_name = f"{res}_{video_id}.m3u8"
 index_file.write(
 f"#EXT-X-STREAM-INF:BANDWIDTH={get_bandwidth(res)},RESOLUTION={int(res * aspect_ratio)}x{res}\n{folder_name}/{resolution_file_name}\n"
 )



I tried reducing or increasing chunk size, adding codecs, setting up dimensions. Where am I doing wrong ?


My python version is 3.8.18, ffmpeg version-4.4.4, ffmpeg-python version-0.2.0