Recherche avancée

Médias (0)

Mot : - Tags -/content

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (53)

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

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

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

Sur d’autres sites (5440)

  • ffmpeg "Time code of first frame" not making sense [closed]

    23 janvier, par Kevin Vasko

    I can't seem to make sense of where ffmpeg is coming up with the "Time code of first frame" value.

    


    My original file that I am using.

    


    This video has the general timestamps of the original encoding date (aka the start time of the video the way I understanding it) and a duration of 8 min and 52s

    


    $ mediainfo GL0100002_output.mp4 
General
Complete name                            : GL0100002_output.mp4
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom (isom/iso2/avc1/mp41)
File size                                : 93.7 MiB
Duration                                 : 8 min 52 s
Overall bit rate                         : 1 476 kb/s
Encoded date                             : UTC 2022-02-23 15:18:42
Tagged date                              : UTC 2022-02-23 15:18:42
Writing application                      : Lavf58.29.100

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L3
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 4 frames
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 8 min 52 s
Bit rate                                 : 1 342 kb/s
Width                                    : 848 pixels
Height                                   : 480 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 23.976 (24000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.138
Stream size                              : 85.2 MiB (91%)
Title                                    : GoPro AVC  
Writing library                          : x264 core 155 r2917 0a84d98
Encoding settings                        : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=23.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Language                                 : English
Encoded date                             : UTC 2022-02-23 15:18:42
Tagged date                              : UTC 2022-02-23 15:18:42
Color range                              : Full
Codec configuration box                  : avcC

Audio
ID                                       : 2
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Codec ID                                 : mp4a-40-2
Duration                                 : 8 min 52 s
Bit rate mode                            : Constant
Bit rate                                 : 129 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 8.16 MiB (9%)
Title                                    : GoPro AAC  
Language                                 : English
Default                                  : Yes
Alternate group                          : 1
Encoded date                             : UTC 2022-02-23 15:18:42
Tagged date                              : UTC 2022-02-23 15:18:42

Other
ID                                       : 3
Type                                     : Time code
Format                                   : QuickTime TC
Duration                                 : 8 min 52 s
Frame rate                               : 23.976 (24000/1001) FPS
Time code of first frame                 : 15:57:41:15
Time code, striped                       : Yes
Title                                    : GoPro AVC  
Language                                 : English
Default                                  : No
Encoded date                             : UTC 2022-02-23 15:18:42
Tagged date                              : UTC 2022-02-23 15:18:42


    


    Now if I run

    


    ffmpeg -y -nostdin -v error -ss 00:00:00.042 -i GL0100002_output.mp4 -t 00:00:25.192 -map 0 -map -0:d -c:v libx264 -preset fast -crf 21 -c:a aac -sn GL0100002_test.DSME_0001.mp4

    


    I get the following mediainfo

    


    $ mediainfo GL0100002_test.DSME_0001.mp4 
General
Complete name                            : GL0100002_test.DSME_0001.mp4
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom (isom/iso2/avc1/mp41)
File size                                : 4.54 MiB
Duration                                 : 25 s 234 ms
Overall bit rate                         : 1 510 kb/s
Writing application                      : Lavf58.29.100

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L3
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 4 frames
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 25 s 234 ms
Bit rate                                 : 1 376 kb/s
Width                                    : 848 pixels
Height                                   : 480 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 23.976 (24000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.141
Stream size                              : 4.14 MiB (91%)
Title                                    : GoPro AVC  
Writing library                          : x264 core 155 r2917 0a84d98
Encoding settings                        : cabac=1 / ref=2 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=6 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=1 / keyint=250 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=30 / rc=crf / mbtree=1 / crf=21.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Language                                 : English
Color range                              : Full
Codec configuration box                  : avcC

Audio
ID                                       : 2
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Codec ID                                 : mp4a-40-2
Duration                                 : 25 s 214 ms
Duration_LastFrame                       : -3 ms
Bit rate mode                            : Constant
Bit rate                                 : 129 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 398 KiB (9%)
Title                                    : GoPro AAC  
Language                                 : English
Default                                  : Yes
Alternate group                          : 1

Other
ID                                       : 3
Type                                     : Time code
Format                                   : QuickTime TC
Duration                                 : 25 s 234 ms
Frame rate                               : 23.976 (24000/1001) FPS
Time code of first frame                 : 15:57:41:15
Time code, striped                       : Yes
Title                                    : GoPro AVC  
Language                                 : English
Default                                  : No


    


    But what I don't understand is where Time code of first frame is coming from. I would expect it would be 00:00:00.042 or even UTC 2022-02-23 15:18:42 + .042 but appear to be.

    


    Time code of first frame                 : 15:57:41:15


    


    Is this potentially clobbering together something to get this time that isn't obvious ?

    


  • How correctly show video with transparency in Qt with OpenCV + FFMpeg

    11 avril 2022, par TheEnigmist

    I'm trying to show a video with transparency in a Qt6 application using OpenCV + FFMPEG.
Actually those are tool versions :

    


      

    • Win 11
    • 


    • Qt 6.3.0
    • 


    • OpenCV 4.5.5 (built with CMake)
    • 


    • FFMPEG 2022-04-03-git-1291568c98-full_build-www.gyan.dev
    • 


    


    I've used a base .mov video with transparency as test (link provided below).
First of all I've converted .mov video to .webm video (VP9) and I see in output text that alpha channel remains

    


    


    ffmpeg -i '.\Retro Bars.mov' -c:v libvpx-vp9 -crf 30 -b:v 0 output.webm

    


    


    Input #0, mov,mp4,m4a,3gp,3g2,mj2,
    ...
    Stream #0:0[0x1](eng): Video: qtrle (rle  / 0x20656C72), argb(progressive),
    ...

Output #0, webm, 
   ...
   Stream #0:0(eng): Video: vp9, yuva420p(tv, progressive),
   ...


    


    But when I show info of output file with ffmpeg it loses alpha channel :

    


    


    ffmpeg -i .\output.webm

    


    


    Input #0, matroska,webm,
    ...
    Stream #0:0(eng): Video: vp9 (Profile 0), yuv420p(tv, progressive),
    ...


    


    If I open output.webm with OBS it is shown correctly without a background, as shown in picture :
obs_load

    


    If I try to open it with OpenCV + FFMPEG it shows a black background under bars, as shown in picture :
Qt_out

    


    This is how I load video in Qt :

    


    cv::VideoCapture capture;
capture.open(filename, cv::CAP_FFMPEG);
capture.set(cv::CAP_PROP_CONVERT_RGB, false); // try forcing load alpha channel
... //in a thread
while (capture.read(frame)) {
    qDebug() << "c" << frame.channels() << "t" <<  frame.type() << "d" <<  frame.depth(); // output: c 3 t 16 d 0
    cv::cvtColor(frame, frame, cv::COLOR_BGR2RGBA); //useless since no alpha channel is detected
    img = QImage(frame.data, frame.cols, frame.rows, QImage::Format_RGBA8888);
    emit processedImage(img); // to show image in a QLabel with QPixmap::fromImage(img)
}


    


    I think the problem is when I load the video with OpenCV, it doens't detect alpha channel, since I can load correctly in other player (obs, html5, etc.)

    


    What I'm wrong with all process to show this video in Qt with transparency ?

    


    EDIT : Added dropbox link with test video + ffmpeg outputs :
sample items

    


  • Why convert wav to mp3 get different length

    13 avril 2022, par sybil

    I use NAudio and NAudio.Lame to convert a wav file to mp3 file,code like that :

    


    using var reader = new WaveFileReader(file);
using var ms = new MemoryStream();
var writer = new LameMP3FileWriter(ms, reader.WaveFormat, 32);
reader.CopyTo(writer);
writer.Flush();
File.WriteAllBytes(file.Replace("wav", "mp3"), ms.ToArray());


    


    the wav file length is 1500ms,but the mp3 file length is 1557ms.

    


    And I do the same thing by using ffmpeg.exe,command like that :

    


    ffmpeg -i c:\2\xxx.wav c:\2\xxx.mp3


    


    the output info :

    


    ffmpeg version 5.0.1-essentials_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 11.2.0 (Rev7, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband
  libavutil      57. 17.100 / 57. 17.100
  libavcodec     59. 18.100 / 59. 18.100
  libavformat    59. 16.100 / 59. 16.100
  libavdevice    59.  4.100 / 59.  4.100
  libavfilter     8. 24.100 /  8. 24.100
  libswscale      6.  4.100 /  6.  4.100
  libswresample   4.  3.100 /  4.  3.100
  libpostproc    56.  3.100 / 56.  3.100
Guessed Channel Layout for Input Stream #0.0 : mono
Input #0, wav, from 'c:\2\xxx.wav':
  Duration: 00:00:01.50, bitrate: 768 kb/s
  Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, mono, s16, 768 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s16le (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
Output #0, mp3, to 'c:\2\xxx.mp3':
  Metadata:
    TSSE            : Lavf59.16.100
  Stream #0:0: Audio: mp3, 48000 Hz, mono, s16p
    Metadata:
      encoder         : Lavc59.18.100 libmp3lame
size=      12kB time=00:00:01.51 bitrate=  66.2kbits/s speed= 137x
video:0kB audio:12kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.928711%


    


    And I get a mp3 file which length is 1536ms.
So,why the length changed ?
Thanks for reading.