
Recherche avancée
Médias (91)
-
Corona Radiata
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Lights in the Sky
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Head Down
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Echoplex
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Discipline
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Letting You
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (35)
-
L’espace de configuration de MediaSPIP
29 novembre 2010, parL’espace de configuration de MediaSPIP est réservé aux administrateurs. Un lien de menu "administrer" est généralement affiché en haut de la page [1].
Il permet de configurer finement votre site.
La navigation de cet espace de configuration est divisé en trois parties : la configuration générale du site qui permet notamment de modifier : les informations principales concernant le site (...) -
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) (...)
-
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)
Sur d’autres sites (5736)
-
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...
-
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.
-
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.
-