
Recherche avancée
Autres articles (77)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
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 (8087)
-
How to download a part of mp3 from server ?
20 août 2020, par Sharukh MohammedUse Case


My use case is roughly equal to, adding a 15-second mp3 file to a 1 min video. All transcoding merging part will be done by FFmpeg-android so that's not the concern right now.


The flow is as follows


- 

- User can select any 15 seconds (ExoPlayer-streaming) of an mp3 (considering 192Kbps/44.1KHz of 3mins = up to 7MB)
- Then download ONLY the 15 second part and add it to the video's audio stream. (using FFmpeg)
- Use the obtained output








Tried solutions


- 

-
Extracting fragment of audio from a url


RANGE_REQUEST - I have replicated the exact same algorithm/formula in Kotlin using the exact sample file provided. But the output is not accurate
(± 1.5 secs * c) where c is proportional to startTime


-
How to crop a mp3 from x to x+n using ffmpeg ?


FFMPEG_SS - This works flawlessly with remote URLs as input, but there are two downsides,


- 

- as
startTime
increases, the size of downloaded bytes are closer to the actual size of the mp3. ffmpeg-android
does not support network requests module (at least the way we complied)






- as






So above two solutions have not been fruitful and currently, I am downloading the whole file and trimming it locally, which is definitely a bad UX.
I wonder how Instagram's music addition to story feature works because that's close to what I wanted to implement.


-
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 : chromakey without green edges
5 septembre 2020, par IgniterI have a video of a person on green background and I'm trying to turn background transparent by this :


ffmpeg -i bg.mp4 -i man.mp4 -filter_complex '[1:v]colorkey=0x00ff00:0.3:0.3[ckout];[0:v][ckout]overlay[out]' -map '[out]' result.mp4



Colorkey gives this quite noticeable green edge around the person's figure.

Any attempts to increase opacity or blend parameters result in disappearing facial features.



Is there any smart way to change pure green
0x00ff00
pixels with transparent ones ?