Recherche avancée

Médias (1)

Mot : - Tags -/framasoft

Autres articles (55)

  • Le plugin : Podcasts.

    14 juillet 2010, par

    Le problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
    Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
    Types de fichiers supportés dans les flux
    Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • Les images

    15 mai 2013

Sur d’autres sites (7935)

  • frame appears 0.000057 second before pts_time using ffmpeg

    17 septembre 2020, par Lincolnhuj

    This video is created using ffmpeg command from a series of images with number and expected timestamp on it (assuming 120 fps constant frame rate) :

    


    ffmpeg -framerate 120 -i %03d.png -crf 0 -x264opts keyint=1:min-keyint=1 120.mp4


    


    It's supposed to be constant frame rate, and all the frames are I frames.
I expect frame 6 will show up exactly at time 0.05 second [0.05, 0.0583333), as the pts_time shown in ffmpeg and ffprobe :

    


    


    [Parsed_showinfo_0 @ 0x7fba11404080] n : 6 pts : 768 pts_time:0.05
pos : 36021 fmt:yuv444p sar:0/1 s:1552x878 i:P iskey:1 type:I
checksum:2CDED07A plane_checksum :[A86DBAAD C4CB8EF2 DDC586CC]
mean :[163 133 121 ] stdev :[9.0 0.6 0.8 ]

    


    [FRAME]
media_type=video
stream_index=0
key_frame=1
pkt_pts=768
pkt_pts_time=0.050000
pkt_dts=768
pkt_dts_time=0.050000
best_effort_timestamp=768
best_effort_timestamp_time=0.050000
pkt_duration=128
pkt_duration_time=0.008333
pkt_pos=36021
pkt_size=2531
width=1552
height=878
pix_fmt=yuv444p
sample_aspect_ratio=N/A
pict_type=I
coded_picture_number=6
display_picture_number=0
interlaced_frame=0
top_field_first=0
repeat_pict=0
color_range=unknown
color_space=unknown
color_primaries=unknown
color_transfer=unknown
chroma_location=left
[/FRAME]


    


    


    But in reality, it shows up since 0.049943 second. I use ffmpeg to extract that time with 0.0001 second duration

    


    ffmpeg -ss 00:00:00.049943 -i 120_keyint_1.mp4 -t 00:00:00.0001 out.mp4


    


    and get this video, which shows frame 6.

    


    I also tried playing this video on chrome, and set the currentTime of videoNode. It shows frame 5 at 0.049943, but shows frame 6 since 0.049968 (before 0.05 !).

    


    However, I tried another encoding method and get another constant frame rate video :

    


    ffmpeg -framerate 120 -i %03d.png -vcodec libx264 -f mp4 -movflags faststart 120.mp4


    


    theoretically frame 6 should also appear in time range [0.05, 0.0583333), but in Chrome frame 6 will not show up until currentTime >= 0.051 second. More interestingly, I get frame 6 at 0.049943 second using ffmpeg, the same extraction command above.

    


    Does this mean in MPEG4 h.264 video, we cannot rely on pts_time from ffmpeg to determine exact show time of a specific frame and it's video player specific ?

    


  • Splitting webm video to png with transparency

    31 août 2020, par Stephen Emslie

    I need to split a webm encoded video into png frames, without losing transparency. I use the following ffmpeg command :

    



    ffmpeg -i dancer1.webm -pix_fmt rgba frames/%04d.png


    



    This produces a directory of pngs, but why is each output frame is missing transparency ?

    



    I have used this example video, which contains an alpha channel. See it playing over a background here. Here's an example output frame from ffmpeg :

    



    missing transparency?

    



    ffmpeg produces the following output when it runs :

    



    ffmpeg version N-60294-g549f052 Copyright (c) 2000-2014 the FFmpeg developers                                             [1/2471]
  built on Feb  2 2014 05:41:56 with gcc 4.6 (Debian 4.6.3-1)
  configuration: --prefix=/root/ffmpeg-static/64bit --extra-cflags='-I/root/ffmpeg-static/64bit/include -static' --extra-ldflags='-L/root/ffmpeg-static/64bit/lib -static' --extra-libs='-lxml2 -lexpat -lfreetype' --enable-static --disable-shared --disable-ffserver --disable-doc --enable-bzlib --enable-zlib --enable-postproc --enable-runtime-cpudetect --enable-libx264 --enable-gpl --enable-libtheora --enable-libvorbis --enable-libmp3lame --enable-gray --enable-libass --enable-libfreetype --enable-libopenjpeg --enable-libspeex --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-version3 --enable-libvpx
  libavutil      52. 63.100 / 52. 63.100
  libavcodec     55. 49.101 / 55. 49.101
  libavformat    55. 28.101 / 55. 28.101
  libavdevice    55.  7.100 / 55.  7.100
  libavfilter     4.  1.101 /  4.  1.101
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.104 /  0. 17.104
  libpostproc    52.  3.100 / 52.  3.100
Input #0, matroska,webm, from 'dancer1.webm':
  Metadata:
    encoder         : libwebm-0.2.1.0
  Duration: 00:01:02.83, start: 0.000000, bitrate: 520 kb/s
    Stream #0:0(eng): Video: vp8, yuv420p, 640x360, SAR 1:1 DAR 16:9, 30 tbr, 1k tbn, 1k tbc (default)
    Metadata:
      alpha_mode      : 1
Output #0, image2, to 'frames/%04d.png':
  Metadata:
    encoder         : Lavf55.28.101
    Stream #0:0(eng): Video: png, rgba, 640x360 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 90k tbn, 30 tbc (default)
Metadata:
  alpha_mode      : 1
Stream mapping:
  Stream #0:0 -> #0:0 (vp8 -> png)


    



    Running identify on an output png produces this :

    



    $ identify 0001.png
0001.png PNG 640x360 640x360+0+0 8-bit DirectClass 94.1KB 0.000u 0:00.000


    



    file has this to say about the png :

    



    $ file 0001.png
0001.png: PNG image data, 640 x 360, 8-bit/color RGBA, non-interlaced


    



    Everything looks about right to me, so why don't the output images contain an alpha channel ?

    


  • ffmpeg segmentation fails with floating point exception

    19 août 2020, par painfulenglish

    I'm trying to segment a video using the following command :

    


    ffmpeg -i /home/user/videos/0001.MP4 -codec copy -map 0 -f segment -segment_frames 66 /tmp/boos/0001/0001_%03d.MP4


    


    After working for a few seconds, the output being

    


    frame=  251 fps=0.0 q=-1.0 size=N/A time=00:00:10.02 bitrate=N/A speed=19.6x    


    


    the process fails with a floating point exception. The full output is given below. I have a suspicion that the problem may be specific to GoPro videos due to the following observations :

    


      

    1. The same video is segmented successfully if I first re-encode it using ffmpeg.
    2. 


    3. Other videos (non-GoPro) do not cause the problem.
    4. 


    


    I would appreciate any suggestions on how to track down or even solve the problem.

    


    Full output :

    


    ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers&#xA;  built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)&#xA;  configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared&#xA;  libavutil      55. 78.100 / 55. 78.100&#xA;  libavcodec     57.107.100 / 57.107.100&#xA;  libavformat    57. 83.100 / 57. 83.100&#xA;  libavdevice    57. 10.100 / 57. 10.100&#xA;  libavfilter     6.107.100 /  6.107.100&#xA;  libavresample   3.  7.  0 /  3.  7.  0&#xA;  libswscale      4.  8.100 /  4.  8.100&#xA;  libswresample   2.  9.100 /  2.  9.100&#xA;  libpostproc    54.  7.100 / 54.  7.100&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &amp;apos;/home/broadbelt/videos/0001.MP4&amp;apos;:&#xA;  Metadata:&#xA;    major_brand     : mp41&#xA;    minor_version   : 538120216&#xA;    compatible_brands: mp41&#xA;    creation_time   : 2019-11-18T13:55:42.000000Z&#xA;    firmware        : HD7.01.01.80.00&#xA;  Duration: 00:17:38.22, start: 0.000000, bitrate: 30245 kb/s&#xA;    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 30000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc (default)&#xA;    Metadata:&#xA;      creation_time   : 2019-11-18T13:55:42.000000Z&#xA;      handler_name    : GoPro AVC  &#xA;      encoder         : GoPro AVC encoder&#xA;      timecode        : 13:55:42:21&#xA;    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 189 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2019-11-18T13:55:42.000000Z&#xA;      handler_name    : GoPro AAC  &#xA;      timecode        : 13:55:42:21&#xA;    Stream #0:2(eng): Data: none (tmcd / 0x64636D74) (default)&#xA;    Metadata:&#xA;      creation_time   : 2019-11-18T13:55:42.000000Z&#xA;      handler_name    : GoPro TCD  &#xA;      timecode        : 13:55:42:21&#xA;    Stream #0:3(eng): Data: none (gpmd / 0x646D7067), 37 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2019-11-18T13:55:42.000000Z&#xA;      handler_name    : GoPro MET  &#xA;    Stream #0:4(eng): Data: none (fdsc / 0x63736466), 9 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2019-11-18T13:55:42.000000Z&#xA;      handler_name    : GoPro SOS  &#xA;<span style="background-color:#2E3436"><font color="#FF87FF">[segment @ 0x562a95062f40] </font></span>Opening &amp;apos;/tmp/boost/0001/0001_000.MP4&amp;apos; for writing&#xA;<span style="background-color:#2E3436"><font color="#FF87FF">[mp4 @ 0x562a9506a600] </font></span><span style="background-color:#2E3436"><font color="#FF0000">Timecode frame rate must be specified</font></span>&#xA;Output #0, segment, to &amp;apos;/tmp/boost/0001/0001_%03d.MP4&amp;apos;:&#xA;  Metadata:&#xA;    major_brand     : mp41&#xA;    minor_version   : 538120216&#xA;    compatible_brands: mp41&#xA;    firmware        : HD7.01.01.80.00&#xA;    encoder         : Lavf57.83.100&#xA;    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 30000 kb/s, 25 fps, 25 tbr, 12800 tbn, 25 tbc (default)&#xA;    Metadata:&#xA;      creation_time   : 2019-11-18T13:55:42.000000Z&#xA;      handler_name    : GoPro AVC  &#xA;      encoder         : GoPro AVC encoder&#xA;      timecode        : 13:55:42:21&#xA;    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 189 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2019-11-18T13:55:42.000000Z&#xA;      handler_name    : GoPro AAC  &#xA;      timecode        : 13:55:42:21&#xA;    Stream #0:2(eng): Data: none (tmcd / 0x64636D74) (default)&#xA;    Metadata:&#xA;      creation_time   : 2019-11-18T13:55:42.000000Z&#xA;      handler_name    : GoPro TCD  &#xA;      timecode        : 13:55:42:21&#xA;    Stream #0:3(eng): Data: none (gpmd / 0x646D7067), 37 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2019-11-18T13:55:42.000000Z&#xA;      handler_name    : GoPro MET  &#xA;    Stream #0:4(eng): Data: none (fdsc / 0x63736466), 9 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2019-11-18T13:55:42.000000Z&#xA;      handler_name    : GoPro SOS  &#xA;Stream mapping:&#xA;  Stream #0:0 -&amp;gt; #0:0 (copy)&#xA;  Stream #0:1 -&amp;gt; #0:1 (copy)&#xA;  Stream #0:2 -&amp;gt; #0:2 (copy)&#xA;  Stream #0:3 -&amp;gt; #0:3 (copy)&#xA;  Stream #0:4 -&amp;gt; #0:4 (copy)&#xA;Press [q] to stop, [?] for help&#xA;**Floating point exception (core dumped)me=00:00:01.00 bitrate=N/A speed=0.143x**   &#xA;

    &#xA;