Recherche avancée

Médias (1)

Mot : - Tags -/Rennes

Autres articles (37)

  • 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

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

  • 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 (7532)

  • Merge remote-tracking branch ’cehoyos/master’

    4 septembre 2013, par Michael Niedermayer
    Merge remote-tracking branch ’cehoyos/master’
    

    * cehoyos/master :
    Show subtitle resolution in avcodec_string().

    Merged-by : Michael Niedermayer <michaelni@gmx.at>

    • [DH] libavcodec/utils.c
  • Encoding real, source duration of a timelapse into MP4 container using FFMPEG (GoPro) [closed]

    13 août 2024, par Marek Towarek

    Footage recorded with GoPro TimeLapse / TimeWarp, indicates the total, real-time duration of recorded data, while the video stream is of reduced length by the timelapse interval.

    &#xA;

    General&#xA;Complete name               : E:\Video\GoPro\GoPro\GH010656.MP4&#xA;Format                      : MPEG-4&#xA;Format profile              : Base Media / Version 1&#xA;Codec ID                    : mp41 (mp41)&#xA;File size                   : 1.94 GiB&#xA;Duration                    : 22 min 55 s&#xA;Overall bit rate mode       : Variable&#xA;Overall bit rate            : 12.1 Mb/s&#xA;&#xA;Video&#xA;ID                          : 1&#xA;Format                      : AVC&#xA;Format/Info                 : Advanced Video Codec&#xA;Format profile              : High@L5&#xA;Format settings             : CABAC / 2 Ref Frames&#xA;Format settings, CABAC      : Yes&#xA;Format settings, Reference  : 2 frames&#xA;Format settings, GOP        : M=1, N=15&#xA;Codec ID                    : avc1&#xA;Codec ID/Info               : Advanced Video Coding&#xA;Duration                    : 4 min 35 s&#xA;Bit rate mode               : Variable&#xA;Bit rate                    : 60.0 Mb/s&#xA;Width                       : 1 920 pixels&#xA;Height                      : 1 440 pixels&#xA;Display aspect ratio        : 4:3&#xA;Rotation                    : 180&#xB0;&#xA;Frame rate mode             : Constant&#xA;Frame rate                  : 29.970 (30000/1001) FPS&#xA;Color space                 : YUV&#xA;Chroma subsampling          : 4:2:0&#xA;Bit depth                   : 8 bits&#xA;Scan type                   : Progressive&#xA;Bits/(Pixel*Frame)          : 0.724&#xA;Stream size                 : 1.92 GiB (99%)&#xA;Title                       : GoPro AVC  &#xA;Language                    : English&#xA;Color range                 : Limited&#xA;colour_range_Original       : Full&#xA;Color primaries             : BT.709&#xA;Transfer characteristics    : BT.709&#xA;Matrix coefficients         : BT.709&#xA;Codec configuration box     : avcC&#xA;&#xA;Other #1&#xA;ID                          : 2&#xA;Type                        : Time code&#xA;Format                      : QuickTime TC&#xA;Duration                    : 4 min 35 s&#xA;Bit rate mode               : Constant&#xA;Frame rate                  : 29.970 (30000/1001) FPS&#xA;Title                       : GoPro TCD  &#xA;Language                    : English&#xA;&#xA;Other #2&#xA;Type                        : meta&#xA;Duration                    : 22 min 55 s&#xA;Source duration             : 4 min 35 s&#xA;Bit rate mode               : Variable&#xA;Stream size                 : 15.0 MiB&#xA;Source stream size          : 15.0 MiB&#xA;

    &#xA;

    This information could be omitted.
    &#xA;But it becomes quite important for correctness of GPS Data stored in Stream #2.

    &#xA;

    Unfortunately, all the settings I have tried for FFMPEG, do not preserve the duration of Stream #2.&#xA;& the output ends up looking like this :

    &#xA;

    General&#xA;Complete name               : C:\Video_Encode\GoPro\GH010656.mp4&#xA;Format                      : MPEG-4&#xA;Format profile              : Base Media&#xA;Codec ID                    : isom (isom/iso2/mp41)&#xA;File size                   : 717 MiB&#xA;Duration                    : 4 min 35 s&#xA;Overall bit rate            : 21.9 Mb/s&#xA;Encoded date                : UTC 2026-03-29 11:28:23&#xA;Tagged date                 : UTC 2026-03-29 11:28:23&#xA;Writing application         : Lavf61.5.101&#xA;&#xA;Video&#xA;ID                          : 1&#xA;Format                      : HEVC&#xA;Format/Info                 : High Efficiency Video Coding&#xA;Format profile              : Main@L5@Main&#xA;Codec ID                    : hvc1&#xA;Codec ID/Info               : High Efficiency Video Coding&#xA;Duration                    : 4 min 35 s&#xA;Bit rate                    : 21.4 Mb/s&#xA;Width                       : 1 920 pixels&#xA;Height                      : 1 440 pixels&#xA;Display aspect ratio        : 4:3&#xA;Frame rate mode             : Constant&#xA;Frame rate                  : 29.970 (30000/1001) FPS&#xA;Color space                 : YUV&#xA;Chroma subsampling          : 4:2:0 (Type 0)&#xA;Bit depth                   : 8 bits&#xA;Scan type                   : Progressive&#xA;Bits/(Pixel*Frame)          : 0.258&#xA;Stream size                 : 702 MiB (98%)&#xA;Title                       : GoPro AVC  &#xA;Writing library             : x265 3.6&#x2B;35-dd594f59d:[Windows][GCC 14.1.0][64 bit] 8bit&#x2B;10bit&#x2B;12bit&#xA;Language                    : English&#xA;Encoded date                : UTC 2026-03-29 11:28:23&#xA;Tagged date                 : UTC 2026-03-29 11:28:23&#xA;Color range                 : Full&#xA;Color primaries             : BT.709&#xA;Transfer characteristics    : BT.709&#xA;Matrix coefficients         : BT.709&#xA;Codec configuration box     : hvcC&#xA;&#xA;Other #1&#xA;ID                          : 2&#xA;Type                        : Time code&#xA;Format                      : QuickTime TC&#xA;Duration                    : 4 min 35 s&#xA;Frame rate                  : 29.970 (30000/1001) FPS&#xA;Time code of first frame    : 17:55:35:02&#xA;Time code of last frame     : 18:00:09:28&#xA;Time code, stripped         : Yes&#xA;Title                       : GoPro TCD  &#xA;Language                    : English&#xA;Default                     : Yes&#xA;Alternate group             : 2&#xA;Encoded date                : UTC 2026-03-29 11:28:23&#xA;Tagged date                 : UTC 2026-03-29 11:28:23&#xA;mdhd_Duration               : 275175&#xA;&#xA;Other #2&#xA;Type                        : meta&#xA;Duration                    : 4 min 35 s&#xA;Bit rate mode               : Variable&#xA;

    &#xA;

    Any ideas how to preserve that real time duration indicator ?
    &#xA;Here is the FFMPEG binary I use to get the TMCD & GMPD data to copy : GitHub Link

    &#xA;

  • moviepy VideoFileClip IndexError : list index out of range, OSError : MoviePy error : failed to read the duration of file

    21 mai 2022, par Mohamed Medhat

    We are recording videos from the browser with the following encoding&#xA;'video/webm ; codecs="vp8, opus"', then we upload these videos to an AWS S3 bucket.&#xA;Our ML model works on these videos, and one of the models needs to extarct the audio and process it.&#xA;Here is a code snapit for extracting the audio

    &#xA;

    import speech_recognition as sr&#xA;import moviepy.editor as me&#xA;from denoise2 import denoise&#xA;from sentence_transformers import SentenceTransformer&#xA;from sklearn.metrics.pairwise import cosine_similarity&#xA;import math&#xA;&#xA;model_name = &#x27;bert-base-nli-mean-tokens&#x27;&#xA;model = SentenceTransformer(model_name)&#xA;&#xA;&#xA;class recomm:&#xA;    y = 0.0&#xA;&#xA;    def __init__(self, path, keywords):&#xA;        video_clip = me.VideoFileClip(r"{}".format(path))&#xA;        path2 = "y2.wav"&#xA;        video_clip.audio.write_audiofile(r"{}".format(path2), nbytes=2)&#xA;        recognizer = sr.Recognizer()&#xA;        """a = AudioSegment.from_wav(path2)&#xA;        a = a &#x2B; 5&#xA;        a.export(path2, "wav")"""&#xA;        audio_clip = sr.AudioFile("{}".format(path2))&#xA;        with audio_clip as source:&#xA;            audio_file = recognizer.record(source)&#xA;        sent = []&#xA;        result = ""&#xA;        try:&#xA;            result = recognizer.recognize_google(audio_file)&#xA;        except sr.UnknownValueError:&#xA;            print("Can not process audio ")&#xA;        if not result:&#xA;            self.y = 0&#xA;        else:&#xA;            print(result)&#xA;            sent.append(result)&#xA;            sent = sent &#x2B; keywords&#xA;            sent_vec3 = model.encode(sent)&#xA;            x = cosine_similarity(&#xA;                [sent_vec3[0]],&#xA;                sent_vec3[1:]&#xA;            )&#xA;            for i in range(len(x)):&#xA;                self.y = self.y &#x2B; x[0][i]&#xA;            self.y = (self.y / (len(sent) - 1)) * 1000.0&#xA;&#xA;    def res(self):&#xA;        if self.y &lt; 0:&#xA;            self.y = 0&#xA;        return self.y&#xA;

    &#xA;

    And that's the traceback,&#xA;the error occurred at this line

    &#xA;

    video_clip = me.VideoFileClip(r"{}".format(path))&#xA;

    &#xA;

    Traceback (most recent call last):&#xA;File "/home/medo/Dev/Smart-remotely-interviewing-system/backend/Process-interview/test/lib/python3.8/site-packages/moviepy/video/io/ffmpeg_reader.py", line 286, in ffmpeg_parse_infos&#xA;match = re.findall("([0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9])", line)[0]&#xA;IndexError: list index out of range&#xA;&#xA;During handling of the above exception, another exception occurred:&#xA;&#xA;Traceback (most recent call last):&#xA;File "main.py", line 90, in&#xA;main()&#xA;File "main.py", line 85, in main&#xA;interviews_channel.start_consuming()&#xA;File "/home/medo/Dev/Smart-remotely-interviewing-system/backend/Process-interview/test/lib/python3.8/site-packages/pika/adapters/blocking_connection.py", line 1865, in start_consuming&#xA;self._process_data_events(time_limit=None)&#xA;File "/home/medo/Dev/Smart-remotely-interviewing-system/backend/Process-interview/test/lib/python3.8/site-packages/pika/adapters/blocking_connection.py", line 2026, in _process_data_events&#xA;self.connection.process_data_events(time_limit=time_limit)&#xA;File "/home/medo/Dev/Smart-remotely-interviewing-system/backend/Process-interview/test/lib/python3.8/site-packages/pika/adapters/blocking_connection.py", line 833, in process_data_events&#xA;self._dispatch_channel_events()&#xA;File "/home/medo/Dev/Smart-remotely-interviewing-system/backend/Process-interview/test/lib/python3.8/site-packages/pika/adapters/blocking_connection.py", line 567, in _dispatch_channel_events&#xA;impl_channel._get_cookie()._dispatch_events()&#xA;File "/home/medo/Dev/Smart-remotely-interviewing-system/backend/Process-interview/test/lib/python3.8/site-packages/pika/adapters/blocking_connection.py", line 1492, in _dispatch_events&#xA;consumer_info.on_message_callback(self, evt.method,&#xA;File "main.py", line 79, in callback&#xA;processing(json.loads(body))&#xA;File "main.py", line 34, in processing&#xA;r = recomm(path, keywords)&#xA;File "/home/medo/Dev/Smart-remotely-interviewing-system/backend/Process-interview/recommendation.py", line 17, in init&#xA;video_clip = me.VideoFileClip(r"{}".format(path))&#xA;File "/home/medo/Dev/Smart-remotely-interviewing-system/backend/Process-interview/test/lib/python3.8/site-packages/moviepy/video/io/VideoFileClip.py", line 88, in init&#xA;self.reader = FFMPEG_VideoReader(filename, pix_fmt=pix_fmt,&#xA;File "/home/medo/Dev/Smart-remotely-interviewing-system/backend/Process-interview/test/lib/python3.8/site-packages/moviepy/video/io/ffmpeg_reader.py", line 35, in init&#xA;infos = ffmpeg_parse_infos(filename, print_infos, check_duration,&#xA;File "/home/medo/Dev/Smart-remotely-interviewing-system/backend/Process-interview/test/lib/python3.8/site-packages/moviepy/video/io/ffmpeg_reader.py", line 289, in ffmpeg_parse_infos&#xA;raise IOError(("MoviePy error: failed to read the duration of file %s.\n"&#xA;OSError: MoviePy error: failed to read the duration of file 74b74292-3642-486a-8319-255bb7e7da5a-1647363285285.webm.&#xA;Here are the file infos returned by ffmpeg:&#xA;&#xA;ffmpeg version 4.2.2-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2019 the FFmpeg developers&#xA;built with gcc 8 (Debian 8.3.0-6)&#xA;configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg&#xA;libavutil 56. 31.100 / 56. 31.100&#xA;libavcodec 58. 54.100 / 58. 54.100&#xA;libavformat 58. 29.100 / 58. 29.100&#xA;libavdevice 58. 8.100 / 58. 8.100&#xA;libavfilter 7. 57.100 / 7. 57.100&#xA;libswscale 5. 5.100 / 5. 5.100&#xA;libswresample 3. 5.100 / 3. 5.100&#xA;libpostproc 55. 5.100 / 55. 5.100&#xA;Input #0, matroska,webm, from &#x27;74b74292-3642-486a-8319-255bb7e7da5a-1647363285285.webm&#x27;:&#xA;Metadata:&#xA;encoder : Chrome&#xA;Duration: N/A, start: 0.000000, bitrate: N/A&#xA;Stream #0:0(eng): Audio: opus, 48000 Hz, mono, fltp (default)&#xA;Stream #0:1(eng): Video: vp8, yuv420p(progressive), 640x480, SAR 1:1 DAR 4:3, 29.42 fps, 29.42 tbr, 1k tbn, 1k tbc (default)&#xA;Metadata:&#xA;alpha_mode : 1&#xA;At least one output file must be specified&#xA;

    &#xA;