
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (60)
-
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
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 -
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
Sur d’autres sites (7885)
-
fftools/sync_queue : make sure audio duration matches sample count
22 mars 2023, par Anton Khirnovfftools/sync_queue : make sure audio duration matches sample count
For audio AVFrames, nb_samples is typically more trustworthy than
duration. Since sync queues look at durations, make sure they match the
sample count.The last audio frame in the fate-shortest test is now gone. This is more
correct, since it outlasts the last video frame. -
Per second frame count using ffmpeg
11 janvier 2023, par mabI need to count the number of frames in a video captured by a camera on a per-second basis. I haven't found a solution using ffmpeg or ffprobe (or something else) to output the number of frames per second (maintaining a constant frame rate is not guaranteed because of the capture mechanism and needs to be verified).


So far, I've needed to run ffmpeg and ffprobe separately. First, I run ffmpeg to trim the video :


ffmpeg -ss 00:00:00 -to <desired time="time" in="in" seconds="seconds"> -i -c copy 
</desired>


Then, I run ffprobe to count the number of frames in the snippet :


ffprobe -v error -select_streams v:0 -count_frames -show_entries stream=nb_read_frames -print_format csv 



Is there one command to output the number of frames for each second in the video ?


-
Unable To Get Frame Count Using ffmpeg To Stich To Beginning
23 décembre 2022, par SopMeI am using Python to make a script with ffmpeg where the script exports the middle frame into a jpg file and then stitches it back into beginning of the video. This is my script


video_filename = "test_video.webm"
import ffmpeg

# Open the input video file
input_video = ffmpeg.input(video_filename)

# Get the video stream from the input video
video_stream = next(s for s in input_video.streams if s.type == 'video')

# Get the total number of frames in the stream
num_frames = video_stream.frame_count

# Calculate the middle frame number
middle_frame = num_frames // 2

# Extract the middle frame from the input video
middle_frame_extract = input_video.trim(start_frame=middle_frame, end_frame=middle_frame+1).setpts('PTS-STARTPTS')

# Save the extracted frame to an image file
ffmpeg.output(middle_frame_extract, 'middle_frame.jpg').run()

# Open the image file
middle_frame_image = ffmpeg.input('middle_frame.jpg')

# Concatenate the image file with the rest of the video
output_video = ffmpeg.concat(middle_frame_image, input_video, v=1, a=0).setpts('PTS+STARTPTS')

# Save the output video to a file
ffmpeg.output(output_video, 'output.mp4').run()



I get this error though


AttributeError Traceback (most recent call last)

 in <module>
 6 
 7 # Get the video stream from the input video
----> 8 video_stream = next(s for s in input_video.streams if s.type == 'video')
 9 
 10 # Get the total number of frames in the stream

AttributeError: 'FilterableStream' object has no attribute 'streams'

</module>


The issue is that there is little documentation to do this and I only found this snippet of code online. How do I modify it to make it work for my use case ?