Recherche avancée

Médias (1)

Mot : - Tags -/ogv

Autres articles (60)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette 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, par

    Mediaspip 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, par

    Unlike 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 Khirnov
    fftools/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.

    • [DH] fftools/sync_queue.c
    • [DH] tests/ref/fate/shortest
  • Per second frame count using ffmpeg

    11 janvier 2023, par mab

    I 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 &#xA;</desired>

    &#xA;

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

    &#xA;

    ffprobe -v error -select_streams v:0 -count_frames -show_entries stream=nb_read_frames -print_format csv &#xA;

    &#xA;

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

    &#xA;

  • Unable To Get Frame Count Using ffmpeg To Stich To Beginning

    23 décembre 2022, par SopMe

    I 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

    &#xA;

    video_filename = "test_video.webm"&#xA;import ffmpeg&#xA;&#xA;# Open the input video file&#xA;input_video = ffmpeg.input(video_filename)&#xA;&#xA;# Get the video stream from the input video&#xA;video_stream = next(s for s in input_video.streams if s.type == &#x27;video&#x27;)&#xA;&#xA;# Get the total number of frames in the stream&#xA;num_frames = video_stream.frame_count&#xA;&#xA;# Calculate the middle frame number&#xA;middle_frame = num_frames // 2&#xA;&#xA;# Extract the middle frame from the input video&#xA;middle_frame_extract = input_video.trim(start_frame=middle_frame, end_frame=middle_frame&#x2B;1).setpts(&#x27;PTS-STARTPTS&#x27;)&#xA;&#xA;# Save the extracted frame to an image file&#xA;ffmpeg.output(middle_frame_extract, &#x27;middle_frame.jpg&#x27;).run()&#xA;&#xA;# Open the image file&#xA;middle_frame_image = ffmpeg.input(&#x27;middle_frame.jpg&#x27;)&#xA;&#xA;# Concatenate the image file with the rest of the video&#xA;output_video = ffmpeg.concat(middle_frame_image, input_video, v=1, a=0).setpts(&#x27;PTS&#x2B;STARTPTS&#x27;)&#xA;&#xA;# Save the output video to a file&#xA;ffmpeg.output(output_video, &#x27;output.mp4&#x27;).run()&#xA;

    &#xA;

    I get this error though

    &#xA;

    AttributeError                            Traceback (most recent call last)&#xA;&#xA; in <module>&#xA;      6 &#xA;      7 # Get the video stream from the input video&#xA;----> 8 video_stream = next(s for s in input_video.streams if s.type == &#x27;video&#x27;)&#xA;      9 &#xA;     10 # Get the total number of frames in the stream&#xA;&#xA;AttributeError: &#x27;FilterableStream&#x27; object has no attribute &#x27;streams&#x27;&#xA;&#xA;</module>

    &#xA;

    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 ?

    &#xA;