
Recherche avancée
Médias (1)
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (72)
-
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...) -
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 ) (...)
Sur d’autres sites (7214)
-
Extracting Y only (of YUV420p) frame from an MP4 file using fmpeg ?
7 janvier 2020, par Anidh SinghMy main objective is to extract the I’th, I+1’th (next), I-1’th (previous) frames in the form of Y only (of YUV 420) from an mp4 video. The procedure which I am using right now is
-
I extracted the list of all the I frames from a video using the command -
ffprobe "input.mp4" -show_frames | grep 'pict_type=I' -A 1 > frame_info.txt
-
Next, I used a python script to parse through this txt file to find the numbers of all of the I frames and then extracting all of the frames using the command -
ffmpeg -i input.mp4 -vf select='eq(n\,{1}),setpts=N/25/TB,extractplanes=y' -vsync 0 -pix_fmt gray {1}.yuv
This is happening via a subprocess call from python. -
This is working fine for small resolution videos like 240p or 480p but as soon as I move to 1080p videos the time to extract even a single frame increases exponentially. As the ffmpeg seeks to that frame number to extract it and it has to decode the mp4 file till that point.
I have a lot of 1080p files and I was looking to decrease the time. The solution which I was thinking was to extract all of the Y frames (of YUV 420) from mp4 and then selecting only I frames as I’ve got the list of all of the I frames from step 1.. The command I am using for this is -
ffmpeg -y -i input.mp4 -vf "fps=59.94" -pix_fmt gray file_name.yuv
-
The problem with the above code is that it continuously appends the to yuv file only but I want an individual y file for one frame of the mp4 video.
-
My restriction is to use FFmpeg only as FFmpeg’s Y value is matching with what I want.
TL:DR - I want to extract the Y part only (of YUV 420p) from an mp4 video. The y frames are the I’th and I-1th and I+1th frames.
Thanks for helping out.
-
-
calling ffmpeg from python in a loop
22 juin 2018, par Steffen LeschI am currently writing my first python script to split large audio files into smaller ones. (Splitting Albums into individual tracks) :
import subprocess
def genList():
with open("commands.txt") as file:
ffmpeg_template_str = 'ffmpeg -i audio.FLAC -acodec copy -ss START_TIME -to END_TIME LITTLE_FILE'
lines = file.readlines()
results = []
for line in lines:
argument_list = line.split(' ')
result = ffmpeg_template_str
results.append(result.replace('START_TIME', argument_list[0]).replace('END_TIME', argument_list[1]).replace('LITTLE_FILE', argument_list[2]))
return results;
def split():
commands = genList()
for command in commands:
subprocess.call(command.split(' '))
split()When i execute the script, many command line windows will pop up, but only the last delivers the desired result.
So if i want to split an audio file into smaller files only the last split operation seems to executed correctly.
Additionally if i dont use a for loop and just paste subprocess.call multiple times into the code it works just fine.
subprocess.call(command1)
subprocess.call(command2)
subprocess.call(command3)Any help will be greatly appreciated.
-
Higher quality of JPEG frames extracted with FFMPEG from MP4 video [on hold]
5 juin 2019, par 2006pmachI got a 4k mp4 video file and my goal is to extract the individual frames. Unfortunately, the video is quite big 10GB and storing all the frames lossless (e.g. using png, results in 12MB per frame) is not an option. Therefore, I tired to save directly JPEG images. For me quality is more important than a small file size around 1MB would be good.
To do so I used FFMPEG as follows :ffmpeg -ss 00:04:52 -i video.MP4 -qscale:v $quality -frames:v 1 output-$quality.jpg
I tried the full range from 2 to 31 for $quality and obtained the blue curve in the plot (PSNR vs. File size)
Additionally, I extracted the frame and saved it as PNG and used convert from ImageMagick to compress the PNG file as follows :
convert -quality $quality% frame.png output-$quality.jpg
Again I tried the full range for $quality from 10 to 100 and obtained the orange line in the plot (The highest quality is 50dB but uses 6MB, so I only show the results up to 2MB).
Now, my questions are as follows. Why is the quality of ffmpeg that much worse than when using ImageMagick ? Is it possible to increase the quality of the JPEG frames using ffmpeg directly or do I need to go via the PNG and then to JPEG. The later method is somehow suboptimal because it requires storing the png and will be much slower. Any suggestions ? My guess is that ffmpeg trades quality vs. speed...