Recherche avancée

Médias (0)

Mot : - Tags -/configuration

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

Autres articles (25)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Contribute to documentation

    13 avril 2011

    Documentation is vital to the development of improved technical capabilities.
    MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
    To contribute, register to the project users’ mailing (...)

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

Sur d’autres sites (3622)

  • 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

    


  • 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 ?

    


  • Two character glob pattern

    18 octobre 2022, par eSlavko

    I have camera capturing image every 10 seconds and store in folder with image name as timestamp like
/2022-05-10_19:11:50.jpg
Each week is stored in separate folder.
Now I want to make video from that images using ffmpeg.
It works with images declared as -pattern_type glob -i "*.jpg" Now I want to make video from images captured only in daytime. For example from images /2022-05-10_XX:11:50.jpg where XX is in range from 05, 06, 07 .. 20, 21. I try with glob patterns but seems that it can work only over single digit.