Recherche avancée

Médias (91)

Autres articles (79)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

Sur d’autres sites (12265)

  • mov : Fix handling of zero-length metadata values

    15 décembre 2014, par Martin Storsjö
    mov : Fix handling of zero-length metadata values
    

    Since 3cec81f4d4, a zero-length metadata value would try to
    allocate 2*0 bytes, where av_malloc() returns NULL.

    Always add one to the allocated length, to allow space for
    a null terminator in the zero-length case.

    Incidentally, this fixes fate-alac on RVCT 4.0, where a compiler
    bug seems to mess up the mov muxer to the point that it writes
    the wrong sort of metadata. Previously this bug was undetected,
    but since 3cec81f4d4 such mov files started returning
    AVERROR(ENOMEM) in the mov demuxer.

    Signed-off-by : Martin Storsjö <martin@martin.st>

    • [DBH] libavformat/mov.c
  • Additional : Add new BIN range for MasterCard. (#2088)

    9 octobre 2017, par RobJohnston
    Additional : Add new BIN range for MasterCard. (#2088)
    

    Fixes #1904

  • When I use ffmpeg to go from a video to frames, and then back to video, the duration is different between the videos

    24 février 2024, par bluepanda

    I am trying to use ffmpeg to convert from a .mp4 (or .mov) video into individual frames, do some processing on those frames, and then convert back to .mp4. The problem is that the resulting video I create is a different duration than the input - I can see this visually when I play the two videos side by side. The difference is not large (i.e. 00:00:00.50 for the input video and 00:00:00.52 for the output video), but when the videos are looped next to each other they get out of sync.

    &#xA;

    Here is information about the input video retrieved using fluent-ffmpeg's ffmpeg.ffprobe(videoPath) :

    &#xA;

    metadata {&#xA;  streams: [&#xA;    {&#xA;      index: 0,&#xA;      codec_name: &#x27;h264&#x27;,&#xA;      codec_long_name: &#x27;H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10&#x27;,&#xA;      profile: &#x27;High&#x27;,&#xA;      codec_type: &#x27;video&#x27;,&#xA;      codec_tag_string: &#x27;avc1&#x27;,&#xA;      codec_tag: &#x27;0x31637661&#x27;,&#xA;      width: 1080,&#xA;      height: 1920,&#xA;      coded_width: 1080,&#xA;      coded_height: 1920,&#xA;      closed_captions: 0,&#xA;      has_b_frames: 2,&#xA;      sample_aspect_ratio: &#x27;N/A&#x27;,&#xA;      display_aspect_ratio: &#x27;N/A&#x27;,&#xA;      pix_fmt: &#x27;yuv420p&#x27;,&#xA;      level: 40,&#xA;      color_range: &#x27;tv&#x27;,&#xA;      color_space: &#x27;bt709&#x27;,&#xA;      color_transfer: &#x27;bt709&#x27;,&#xA;      color_primaries: &#x27;bt709&#x27;,&#xA;      chroma_location: &#x27;left&#x27;,&#xA;      field_order: &#x27;unknown&#x27;,&#xA;      refs: 1,&#xA;      is_avc: &#x27;true&#x27;,&#xA;      nal_length_size: 4,&#xA;      id: &#x27;N/A&#x27;,&#xA;      r_frame_rate: &#x27;30000/1001&#x27;,&#xA;      avg_frame_rate: &#x27;27000/1001&#x27;,&#xA;      time_base: &#x27;1/30000&#x27;,&#xA;      start_pts: 0,&#xA;      start_time: 0,&#xA;      duration_ts: 15100,&#xA;      duration: 0.503333,&#xA;      bit_rate: 5660223,&#xA;      max_bit_rate: &#x27;N/A&#x27;,&#xA;      bits_per_raw_sample: 8,&#xA;      nb_frames: 36,&#xA;      nb_read_frames: &#x27;N/A&#x27;,&#xA;      nb_read_packets: &#x27;N/A&#x27;,&#xA;      tags: [Object],&#xA;      disposition: [Object]&#xA;    },&#xA;    {&#xA;      index: 1,&#xA;      codec_name: &#x27;aac&#x27;,&#xA;      codec_long_name: &#x27;AAC (Advanced Audio Coding)&#x27;,&#xA;      profile: &#x27;LC&#x27;,&#xA;      codec_type: &#x27;audio&#x27;,&#xA;      codec_tag_string: &#x27;mp4a&#x27;,&#xA;      codec_tag: &#x27;0x6134706d&#x27;,&#xA;      sample_fmt: &#x27;fltp&#x27;,&#xA;      sample_rate: 48000,&#xA;      channels: 2,&#xA;      channel_layout: &#x27;stereo&#x27;,&#xA;      bits_per_sample: 0,&#xA;      id: &#x27;N/A&#x27;,&#xA;      r_frame_rate: &#x27;0/0&#x27;,&#xA;      avg_frame_rate: &#x27;0/0&#x27;,&#xA;      time_base: &#x27;1/48000&#x27;,&#xA;      start_pts: 0,&#xA;      start_time: 0,&#xA;      duration_ts: 24160,&#xA;      duration: 0.503333,&#xA;      bit_rate: 248416,&#xA;      max_bit_rate: &#x27;N/A&#x27;,&#xA;      bits_per_raw_sample: &#x27;N/A&#x27;,&#xA;      nb_frames: 27,&#xA;      nb_read_frames: &#x27;N/A&#x27;,&#xA;      nb_read_packets: &#x27;N/A&#x27;,&#xA;      tags: [Object],&#xA;      disposition: [Object]&#xA;    }&#xA;  ],&#xA;  format: {&#xA;    filename: &#x27;/Users/name/images/input.mp4&#x27;,&#xA;    nb_streams: 2,&#xA;    nb_programs: 0,&#xA;    format_name: &#x27;mov,mp4,m4a,3gp,3g2,mj2&#x27;,&#xA;    format_long_name: &#x27;QuickTime / MOV&#x27;,&#xA;    start_time: 0,&#xA;    duration: 0.503333,&#xA;    size: 963879,&#xA;    bit_rate: 15319941,&#xA;    probe_score: 100,&#xA;    tags: {&#xA;      major_brand: &#x27;mp42&#x27;,&#xA;      minor_version: &#x27;1&#x27;,&#xA;      compatible_brands: &#x27;isommp41mp42&#x27;,&#xA;      creation_time: &#x27;2024-02-14T01:21:12.000000Z&#x27;&#xA;    }&#xA;  },&#xA;  chapters: []&#xA;}&#xA;

    &#xA;

    and here is from running ffprobe directly :

    &#xA;

    ffprobe &#x27;/Users/name/images/input.mp4&#x27;&#xA;ffprobe version 6.1.1 Copyright (c) 2007-2023 the FFmpeg developers&#xA;  built with Apple clang version 15.0.0 (clang-1500.1.0.2.5)&#xA;  configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/6.1.1_2 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags=&#x27;-Wl,-ld_classic&#x27; --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libharfbuzz --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopenvino --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox --enable-neon&#xA;  libavutil      58. 29.100 / 58. 29.100&#xA;  libavcodec     60. 31.102 / 60. 31.102&#xA;  libavformat    60. 16.100 / 60. 16.100&#xA;  libavdevice    60.  3.100 / 60.  3.100&#xA;  libavfilter     9. 12.100 /  9. 12.100&#xA;  libswscale      7.  5.100 /  7.  5.100&#xA;  libswresample   4. 12.100 /  4. 12.100&#xA;  libpostproc    57.  3.100 / 57.  3.100&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;/Users/name/images/input.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : mp42&#xA;    minor_version   : 1&#xA;    compatible_brands: isommp41mp42&#xA;    creation_time   : 2024-02-14T01:21:12.000000Z&#xA;  Duration: 00:00:00.50, start: 0.000000, bitrate: 15319 kb/s&#xA;  Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1080x1920, 5660 kb/s, 26.97 fps, 29.97 tbr, 30k tbn (default)&#xA;    Metadata:&#xA;      creation_time   : 2024-02-14T01:21:12.000000Z&#xA;      handler_name    : Core Media Video&#xA;      vendor_id       : [0][0][0][0]&#xA;      encoder         : AVC Coding&#xA;  Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 248 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2024-02-14T01:21:12.000000Z&#xA;      handler_name    : Core Media Audio&#xA;      vendor_id       : [0][0][0][0]&#xA;

    &#xA;

    And this is my command to go from video to frames :

    &#xA;

    ffmpeg -i /Users/name/images/input.mp4 -y -f image2 /Users/name/images/frames/%d.png&#xA;

    &#xA;

    After which I convert the frames back to video with this - note that I get by seeing avg_frame_rate is 27000/1001 = 26.97302697 :

    &#xA;

    ffmpeg -r 26.973026973026972 -i /Users/name/images/frames/%d.png -y -r 26.973026973026972 -b:v 5660223k -f mp4 -pix_fmt yuv420p -t 0.503333 /Users/name/images/output.mp4&#xA;

    &#xA;

    And if I then run fluent-ffmpeg's ffmpeg.ffprobe(videoPath) I get :

    &#xA;

    metadata {&#xA;  streams: [&#xA;    {&#xA;      index: 0,&#xA;      codec_name: &#x27;h264&#x27;,&#xA;      codec_long_name: &#x27;H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10&#x27;,&#xA;      profile: &#x27;High&#x27;,&#xA;      codec_type: &#x27;video&#x27;,&#xA;      codec_tag_string: &#x27;avc1&#x27;,&#xA;      codec_tag: &#x27;0x31637661&#x27;,&#xA;      width: 1080,&#xA;      height: 1920,&#xA;      coded_width: 1080,&#xA;      coded_height: 1920,&#xA;      closed_captions: 0,&#xA;      has_b_frames: 2,&#xA;      sample_aspect_ratio: &#x27;1:1&#x27;,&#xA;      display_aspect_ratio: &#x27;9:16&#x27;,&#xA;      pix_fmt: &#x27;yuv420p&#x27;,&#xA;      level: 62,&#xA;      color_range: &#x27;unknown&#x27;,&#xA;      color_space: &#x27;unknown&#x27;,&#xA;      color_transfer: &#x27;unknown&#x27;,&#xA;      color_primaries: &#x27;unknown&#x27;,&#xA;      chroma_location: &#x27;left&#x27;,&#xA;      field_order: &#x27;unknown&#x27;,&#xA;      refs: 1,&#xA;      is_avc: &#x27;true&#x27;,&#xA;      nal_length_size: 4,&#xA;      id: &#x27;N/A&#x27;,&#xA;      r_frame_rate: &#x27;27000/1001&#x27;,&#xA;      avg_frame_rate: &#x27;27000/1001&#x27;,&#xA;      time_base: &#x27;1/27000&#x27;,&#xA;      start_pts: 0,&#xA;      start_time: 0,&#xA;      duration_ts: 14014,&#xA;      duration: 0.519037,&#xA;      bit_rate: 52138429,&#xA;      max_bit_rate: &#x27;N/A&#x27;,&#xA;      bits_per_raw_sample: 8,&#xA;      nb_frames: 14,&#xA;      nb_read_frames: &#x27;N/A&#x27;,&#xA;      nb_read_packets: &#x27;N/A&#x27;,&#xA;      tags: [Object],&#xA;      disposition: [Object]&#xA;    }&#xA;  ],&#xA;  format: {&#xA;    filename: &#x27;/Users/name/images/output.mp4&#x27;,&#xA;    nb_streams: 1,&#xA;    nb_programs: 0,&#xA;    format_name: &#x27;mov,mp4,m4a,3gp,3g2,mj2&#x27;,&#xA;    format_long_name: &#x27;QuickTime / MOV&#x27;,&#xA;    start_time: 0,&#xA;    duration: 0.52,&#xA;    size: 3383708,&#xA;    bit_rate: 52057046,&#xA;    probe_score: 100,&#xA;    tags: {&#xA;      major_brand: &#x27;isom&#x27;,&#xA;      minor_version: &#x27;512&#x27;,&#xA;      compatible_brands: &#x27;isomiso2avc1mp41&#x27;,&#xA;      encoder: &#x27;Lavf60.3.100&#x27;&#xA;    }&#xA;  },&#xA;  chapters: []&#xA;}&#xA;

    &#xA;

    and here is from running ffprobe directly :

    &#xA;

    ffprobe &#x27;/Users/name/images/output.mp4&#x27;&#xA;ffprobe version 6.1.1 Copyright (c) 2007-2023 the FFmpeg developers&#xA;  built with Apple clang version 15.0.0 (clang-1500.1.0.2.5)&#xA;  configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/6.1.1_2 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags=&#x27;-Wl,-ld_classic&#x27; --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libharfbuzz --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopenvino --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox --enable-neon&#xA;  libavutil      58. 29.100 / 58. 29.100&#xA;  libavcodec     60. 31.102 / 60. 31.102&#xA;  libavformat    60. 16.100 / 60. 16.100&#xA;  libavdevice    60.  3.100 / 60.  3.100&#xA;  libavfilter     9. 12.100 /  9. 12.100&#xA;  libswscale      7.  5.100 /  7.  5.100&#xA;  libswresample   4. 12.100 /  4. 12.100&#xA;  libpostproc    57.  3.100 / 57.  3.100&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;/Users/name/images/output.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : isom&#xA;    minor_version   : 512&#xA;    compatible_brands: isomiso2avc1mp41&#xA;    encoder         : Lavf60.3.100&#xA;  Duration: 00:00:00.52, start: 0.000000, bitrate: 52153 kb/s&#xA;  Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1080x1920 [SAR 1:1 DAR 9:16], 52138 kb/s, 26.97 fps, 26.97 tbr, 27k tbn (default)&#xA;    Metadata:&#xA;      handler_name    : VideoHandler&#xA;      vendor_id       : [0][0][0][0]&#xA;      encoder         : Lavc60.3.100 libx264&#xA;

    &#xA;

    This seems like it should be a fairly common scenario, but I have not been able to find examples of this, and the other questions about incorrect durations on Stack Overflow are about bigger differences (i.e. 3 seconds instead of 10 seconds : Wrong video duration when recording with ffmpeg).

    &#xA;

    Some other details :

    &#xA;

      &#xA;
    • I am running this through a Node.js script with fluent-ffmpeg, but I have also tried running the commands directly in the terminal and the result is the same.
    • &#xA;

    • I am fine with the output frames being .png / .jpg / other formats.
    • &#xA;

    • I am fine with setting this to a different frame rate than the original as long as the two output videos end up with the same duration.
    • &#xA;

    • One suspicious thing is that I set -t 0.503333 when creating the video, but it doesn't seem to work as the result video shows duration: 0.519037 / 00:00:00.52.
    • &#xA;

    &#xA;

    Thank you for any help !

    &#xA;