
Recherche avancée
Autres articles (82)
-
Les vidéos
21 avril 2011, parComme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...) -
Use, discuss, criticize
13 avril 2011, parTalk 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. -
Publier sur MédiaSpip
13 juin 2013Puis-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
Sur d’autres sites (4967)
-
FFMpeg, libav, Problem with sws_scale and yuv to rgb conversion - colors are not correct
7 juillet 2022, par MilikaI've been trying to create my own video player in Delphi, and ffmpeg works great, until i hit a snag with color spaces, or color conversion.


Been trying everything for a couple of days, but can't figure it out.
I'm using AV_PIX_FMT_RGB48LE as output...


Old context creation :


videoConvContext := sws_getContext(AVStreamInit.codec.width, AVStreamInit.codec.height, AVStreamInit.codec.pix_fmt, AVStreamInit.codec.width, AVStreamInit.codec.height, AV_PIX_FMT_RGB48LE, SWS_POINT, nil, nil, nil);



New context creation :


dstRange := 1;
 srcRange := 1;
 if AVStreamInit.codec.color_range = AVCOL_RANGE_MPEG then
 srcRange := 0;

 videoConvContext := sws_alloc_context();

 av_opt_set_int(videoConvContext, 'sws_flags', SWS_POINT or SWS_PRINT_INFO, 0);

 av_opt_set_int(videoConvContext, 'srcw', AVStreamInit.codec.width, 0);
 av_opt_set_int(videoConvContext, 'srch', AVStreamInit.codec.height, 0);
 av_opt_set_int(videoConvContext, 'src_format', Integer(AVStreamInit.codec.pix_fmt), 0);

 av_opt_set_int(videoConvContext, 'dstw', AVStreamInit.codec.width, 0);
 av_opt_set_int(videoConvContext, 'dsth', AVStreamInit.codec.height, 0);
 av_opt_set_int(videoConvContext, 'dst_format', Integer(AV_PIX_FMT_RGB48LE), 0);

 i1 := sws_getCoefficients2(Integer(AVStreamInit.codec.colorspace));
 i2 := sws_getCoefficients2(SWS_CS_ITU709);

 ret := sws_setColorspaceDetails2(videoConvContext, i1, srcRange, i2, dstRange, 0, 1 shl 16, 1 shl 16);

 sws_init_context(videoConvContext, nil, nil);



Results are exactly the same....


Output from sws_scale does not have correct colors, here are 2 screenshot


ok - from mpc-hc



not ok - from my player via sws_scale (direct raw extract so no color processing done)



This video has pix_fmt AV_PIX_FMT_YUV420P10LE, but it happens on other YUV inputs, but not so obvious. Also on other RGB outputs(8bit etc)...
Here the Netflix logo is pure red, but sws_scale output gives orange-ish...


Sws_scale code just for reference :


sws_scale(videoConvContext, @AVPacketBuffer.AVFrameCopy.Data, @AVPacketBuffer.AVFrameCopy.linesize, 0, AVStream.codec.height, @BitmapXBuffer.data, @linesize);



BitmapXBuffer.data is a signle buffer of correct size...


AVFrameCopy - is a copy of original frame done with :


if Assigned(AVPacketBuffer.AVFrameCopy) then
 av_frame_free(@AVPacketBuffer.AVFrameCopy);

 AVPacketBuffer.AVFrameCopy := av_frame_alloc();
 AVPacketBuffer.AVFrameCopy.format := AVPacketBuffer.AVFrame.format;
 AVPacketBuffer.AVFrameCopy.width := AVPacketBuffer.AVFrame.width;
 AVPacketBuffer.AVFrameCopy.height := AVPacketBuffer.AVFrame.height;
 AVPacketBuffer.AVFrameCopy.channels := AVPacketBuffer.AVFrame.channels;
 AVPacketBuffer.AVFrameCopy.channel_layout := AVPacketBuffer.AVFrame.channel_layout;
 AVPacketBuffer.AVFrameCopy.nb_samples := AVPacketBuffer.AVFrame.nb_samples;
 av_frame_get_buffer(AVPacketBuffer.AVFrameCopy, 32);
 av_frame_copy(AVPacketBuffer.AVFrameCopy, AVPacketBuffer.AVFrame);
 av_frame_copy_props(AVPacketBuffer.AVFrameCopy, AVPacketBuffer.AVFrame);



Thanks !


-
ffmpeg : Unrecognized option 'alpha_quality'
16 avril 2024, par László MondaI want to make transparent videos work in Safari, which doesn't support WebM for this purpose but only H265 with alpha transparency.


According to this post, I used Shutter Encoder, but only some of its versions work for this purpose on Mac.


Instead of using Shutter Encoder on Mac, I want to use ffmpeg on my Linux PC. Shutter Encoder uses the following command in the background :


ffmpeg -threads 0 -hwaccel none -i input.mov -c:v hevc_videotoolbox -alpha_quality 1 -b:v 1000k -profile:v main -level 5.2 -map v:0 -an -pix_fmt yuva420p -sws_flags bicubic -tag:v hvc1 -metadata creation_time=2024-04-14T14:53:08.734684Z -y output.mp4


which yields the following output on my PC :


ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers
 built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
 configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
 WARNING: library configuration mismatch
 avcodec configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared --enable-version3 --disable-doc --disable-programs --enable-libaribb24 --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libtesseract --enable-libvo_amrwbenc --enable-libsmbclient
 libavutil 56. 70.100 / 56. 70.100
 libavcodec 58.134.100 / 58.134.100
 libavformat 58. 76.100 / 58. 76.100
 libavdevice 58. 13.100 / 58. 13.100
 libavfilter 7.110.100 / 7.110.100
 libswscale 5. 9.100 / 5. 9.100
 libswresample 3. 9.100 / 3. 9.100
 libpostproc 55. 9.100 / 55. 9.100
Unrecognized option 'alpha_quality'.
Error splitting the argument list: Option not found



When googling for "Unrecognized option 'alpha_quality'.", there are no results, which I find very odd.


What's going on, and how can I make ffmpeg work for this purpose without Shutter Encoder ?


-
Evolution #4148 : Augmenter la largeur de l’espace privé
6 février 2020, par tcharlss (*´_ゝ`)Hop je reprends le fil du ticket.
Pour rappel entre temps, il y a eu un fil de discussion sur feu la liste spip-zone : https://www.mail-archive.com/spip-zone@rezo.net/msg48847.html
Donc suite à cette discussion, voilà une proposition d’implémentation qui reprend ce dont on avait parlé : https://git.spip.net/spip/spip/pulls/17
Alors pour celleux qui veulent tester mais ont la flemme d’installer localement, il y a un site de test ici : https://dev.mukt.fr/labo/prive_large/ecrire/ (il y aura un 404 la 1ère fois : virer le slash en trop après mukt.fr, recharger et ça sera bon).
J’hésite un peu à lâcher les identifiants dans la nature même si ce n’est qu’un site de test, faites une demande en mp.Quelques précisions en plus du descriptif du PR :
- J’ai poussé à 1500px, mais on peut revenir à 1400px si ça paraît trop.
- Pour le support des vieux navigateurs : ça a été testé sur un vieux safari qui ne supporte pas les CSS grid, et nicod_ a regardé sur IE9. À priori c’est bon mais d’autres tests seraient souhaitables.