Recherche avancée

Médias (91)

Autres articles (97)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (6831)

  • Converting 3gp (amr) to mp3 using ffmpeg api calls

    13 mars 2012, par Sebastian L.

    Converting 3gp (amr) to mp3 using ffmpeg api calls

    I try to use libavformat (ffmpeg) to build my own function that converts 3gp audio files (recorded with an android mobile device) into mp3 files.

    I use av_read_frame() to read a frame from the input file and use avcodec_decode_audio3() to decode the data
    into a buffer and use this buffer to encode the data into mp3 with avcodec_encode_audio.
    This seems to give me a correct result for converting wav to mp3 and mp3 to wav (Or decode one mp3 and encode to another mp3) but not for amr to mp3.
    My resulting mp3 file seems to has the right length but only consists of noise.

    In another post I read that amr-decoder does not use the same sample format than mp3 does.
    AMR uses FLT and mp3 S16 or S32 und that I have to do resampling.
    So I call av_audio_resample_init() and audio_resample for each frame that has been decoded.
    But that does not solve my problem completely. Now I can hear my recorded voice and unsterstand what I was saying, but the quality is very low and there is still a lot of noise.
    I am not sure if I set the parameters of av_audio_resample correctly, especially the last 4 parameters (I think not) or if I miss something else.

    ReSampleContext* reSampleContext = av_audio_resample_init(1, 1, 44100, 8000, AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_FLT, 0, 0, 0, 0.0);

    while(1)
    {
       if(av_read_frame(ic, &avpkt) < 0)
       {
           break;
       }

       out_size = AVCODEC_MAX_AUDIO_FRAME_SIZE;
       int count;

       count = avcodec_decode_audio3(audio_stream->codec, (short *)decodedBuffer, &out_size, &avpkt);

       if(count < 0)
       {
           break;
       }

       if((audio_resample(reSampleContext, (short *)resampledBuffer, (short *)decodedBuffer, out_size / 4)) < 0)
       {
           fprintf(stderr, "Error\n");
           exit(1);
       }

       out_size = AVCODEC_MAX_AUDIO_FRAME_SIZE;

       pktOut.size = avcodec_encode_audio(c, outbuf, out_size, (short *)resampledBuffer);

       if(c->coded_frame && c->coded_frame->pts != AV_NOPTS_VALUE)
       {
           pktOut.pts = av_rescale_q(c->coded_frame->pts, c->time_base, outStream->time_base);
           //av_res
       }

       pktOut.pts = AV_NOPTS_VALUE;
       pktOut.dts = AV_NOPTS_VALUE;

       pktOut.flags |= AV_PKT_FLAG_KEY;
       pktOut.stream_index = audio_stream->index;
       pktOut.data = outbuf;

       if(av_write_frame(oc, &pktOut) != 0)
       {
           fprintf(stderr, "Error while writing audio frame\n");
           exit(1);
       }
    }
  • Anomalie #4562 : Suite #4468 : Unification des CSS pour les boutons et les icônes

    7 octobre 2020

    cedric signalait un problème dans la liste des plugins de SVP : parfois les boutons chevauchent la case à cocher.
    Plus précisément quand un plugin n’a pas de descriptif.

    Et pour cause : les boutons sont positionnés en absolute, calés en bas à droite de chaque ligne.
    Donc depuis le début ils pouvaient chevaucher le titre et le descriptif, et maintenant qu’ils sont un peu plus grands, ça empiète parfois sur la case à cocher (plus embêtant).

    Pour régler le problème à peu de frais on peut utiliser la variante .mini sur les boutons, mais c’est un peu cacher la misère sous le tapis je trouve.
    En fait ça fait partie des problèmes d’UX évoqués dans les tickets #4429 et #3017.

    En attendant l’implémentation de la solution proposée, on pourrait déjà faire quelques ajustements :

    • Boutons visibles tout le temps, pas juste au survol
    • Boutons calés à droite, pas en absolute. On a maintenant assez de place en largeur pour ça.

    Nb : dans la capture j’ai mis les logos en 50px (au lieu de 32px), mais c’était juste pour voir.

  • FFMPEG Seeking with concat demuxer causes video & audio to be out of sync

    20 février 2023, par Garuuk

    I have a very simple use case that's driving me bananas.

    


    My problem and question :

    


    I'm using ffmpeg version 5.1.2 on a MacOS and i'm using ffmpeg seeking and concat demuxer to cut many 1 minute videos into 15 seconds chopped up over 12 clips where every clip is just 2 seconds from the same video (kind of like a mini teasers for the video). I would really like to not have to re-encode to make the video processing as fast as possible.

    


    First, I take each 1 minute video and cut it up into 12 clips (I do all this programmatically in python fwiw)

    


    ffmpeg -ss 0 -i input.mp4 -t 2 -c copy -y cut_1.mp4
ffmpeg -ss 4 -i input.mp4 -t 2 -c copy -y cut_2.mp4
ffmpeg -ss 8 -i input.mp4 -t 2 -c copy -y cut_3.mp4
...
...


    


    I then write all the output file names to my concat_manifest.txt

    


    file cut_1.mp4
file cut_2.mp4
...
...


    


    Then I run my concat command :

    


    ffmpeg -f concat -i concat_manifest.txt -c copy -y concat_video.mp4


    


    This works really fast but the audio and video at the stitch point get out of sync and sometimes the video just chokes & lags. It's mostly not a smooth experience.

    


    What I have tried :

    


      

    1. using the concat protocol with intermediate profiles : ffmpeg.org/wiki/Concatenate#demuxer
    2. 


    3. Putting the -ss when I seek after the -i. This makes everything worse
    4. 


    5. Playing around with different -ss values. This has some noticeable affects but it's not obvious why yet.
    6. 


    7. I've also read from the ffmpeg resource regarding seeking and copying :
    8. 


    


    Which leads me to believe that maybe because ffmpeg is using timestamps instead of frames, seeking isn't accurate using -ss when using the concat demuxer

    


    Is there a way to get concat demuxer cutting and concatenating the video where the audio is somewhat in sync with the video ?

    


    Thanks

    


    EDIT : I found an answer and i'll be posting the solution in the coming few days.