
Recherche avancée
Médias (91)
-
Head down (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Echoplex (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Discipline (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Letting you (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
1 000 000 (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
999 999 (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
Autres articles (6)
-
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...) -
Les thèmes de MediaSpip
4 juin 20133 thèmes sont proposés à l’origine par MédiaSPIP. L’utilisateur MédiaSPIP peut rajouter des thèmes selon ses besoins.
Thèmes MediaSPIP
3 thèmes ont été développés au départ pour MediaSPIP : * SPIPeo : thème par défaut de MédiaSPIP. Il met en avant la présentation du site et les documents média les plus récents ( le type de tri peut être modifié - titre, popularité, date) . * Arscenic : il s’agit du thème utilisé sur le site officiel du projet, constitué notamment d’un bandeau rouge en début de page. La structure (...) -
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)
Sur d’autres sites (1990)
-
avcodec/diracdec : Check slice numbers for overflows in relation to picture dimensions
22 juillet 2018, par Michael Niedermayeravcodec/diracdec : Check slice numbers for overflows in relation to picture dimensions
Fixes : signed integer overflow : 88 * 33685506 cannot be represented in type 'int'
Fixes : 9433/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5725943535501312Found-by : continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by : Michael Niedermayer <michael@niedermayer.cc> -
How to use the actual frame numbers in filenames using ffmpeg when extracting frames ? [closed]
2 juin 2024, par Joan VengeBasically I am using ffmpeg to extract every Nth frame from a video. But the filenames appear sequentially from 1 to X. I want to use the actual frame numbers so if it's every 30th frame, then the filenames should be 0, 30, 60, etc. Is this possible ?


I am doing this in Python using this function :


def extract_and_compress_frames(directory, frame_interval=1, crop_width=192, crop_height=108, offset_x=0, offset_y=0):
 for filename in os.listdir(directory):
 if filename.endswith(".trec"):
 # Construct full file path
 trec_path = os.path.join(directory, filename)
 mp4_path = os.path.join(directory, filename.replace(".trec", ".mp4"))
 frames_dir = os.path.join(directory, filename.replace(".trec", ""))
 
 # Rename .trec to .mp4
 os.rename(trec_path, mp4_path)
 
 # Create directory for frames
 os.makedirs(frames_dir, exist_ok=True)
 
 if frame_interval == 1:
 # Calculate crop positions for bottom-right corner after scaling to 1080p
 scaled_width = 1920
 scaled_height = 1080
 crop_x = scaled_width - crop_width - offset_x
 crop_y = scaled_height - crop_height - offset_y
 
 # Extract and compress all frames using ffmpeg with quality adjustment
 ffmpeg_cmd = [
 'ffmpeg', 
 '-i', mp4_path,
 '-vf', f"fps=60,scale=1920:1080,crop={crop_width}:{crop_height}:{crop_x}:{crop_y}", 
 '-q:v', '10', # Adjust the quality, 1 (best) to 31 (worst), 2 for good quality
 os.path.join(frames_dir, '%06d.jpg') # 6 digits for padding, starting from 0
 ]
 else:
 # Use frame interval and scale to 720p
 ffmpeg_cmd = [
 'ffmpeg',
 '-reinit_filter', '0',
 '-i', mp4_path,
 '-vf', f"fps=60,scale=1920:1080,crop={crop_width}:{crop_height}:{1920-crop_width-offset_x}:{1080-crop_height-offset_y},drawtext=text='%{{n}}':start_number=1:fontcolor=white:bordercolor=black:borderw=3:fontsize=50,select='not(mod(n\\,{frame_interval}))'",
 '-fps_mode', 'vfr',
 '-q:v', '10', # Adjust the quality, 1 (best) to 31 (worst), 2 for good quality
 os.path.join(frames_dir, '%06d.jpg') # 6 digits for padding, starting from 0
 ]
 
 subprocess.run(ffmpeg_cmd)
 
 # Rename back to .trec
 os.rename(mp4_path, trec_path)
 
 print(f"Processed {filename}")



But this gives me sequential numbers, not the actual frame numbers but the frame numbers I draw over the images, they represent the actual frame numbers.


Basically ffmpeg is able to get the current frame and draw it on the image using :


drawtext=text='%{{n}}'



The question is about getting that value out to the filenames.


-
can ffmpeg use actual frame number in stream instead of sequentially added image numbers
26 mars 2024, par Wangffmpeg -i test.mp4 -vf select="eq(pict_type\,I)" %d.png



above code create file name incremental by 1, like :


1.png
2.png
3.png
...



but I want the actual frame number in the source stream :


1.png
26.png
51.png
...



there is very old thread asking the same thing. But I wonder is there a solution right now ?