Recherche avancée

Médias (2)

Mot : - Tags -/kml

Autres articles (37)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

Sur d’autres sites (7162)

  • From URL of Video GetThumbnail Using Nreco

    8 février 2016, par Muhammad Abid Fahad

    I working on a sharepoint project in which i have to upload the videos in the document library as videoset. after creating a video set i have have to upload the video and fetch the thumbnail from the video and upload it. video is uploaded succesfully using

    spfile = item.Folder.Files.Add(fuUpload.FileName, fuUpload.PostedFile.InputStream, true);

    I am using using Nreco to get thumbnail from the video. However my code works fine on local machine but its giving error "http://mysite/Download/abc/abc.mp4 : Server returned 401 Unauthorized (authorization failed) (exit code : 1)" when i am using my application from other pc browsers.

    ffMpeg.GetVideoThumbnail(videoPath, ms, 10) ; the error line.

    here is the code i am using

    private MemoryStream SaveThumbnail(string videoPath)
       {
           MemoryStream ms;
           try
           {
               videoPath = "http://mysitehttp/Download/abc/abc.mp4"
               ms = new MemoryStream();
               SPSecurity.RunWithElevatedPrivileges(delegate() {

                   var ffMpeg = new NReco.VideoConverter.FFMpegConverter();
                   ffMpeg.GetVideoThumbnail(videoPath, ms, 10);
               });


           }
           catch(Exception ex)
           {
               throw ex;
           }

           return ms;
       }
  • FFmpeg watermark duration

    4 mai 2016, par user2364292

    I am developing an Android app, which will work with FFmpeg library which only applies multiple watermarks on some test.mp4 video. For that case I am using the Android java library for FFmpeg binary from that source : [http://writingminds.github.io/ffmpeg-android-java/] which is working fine for some examples, but I just can not use commands like these :

    -i /storage/emulated/0/Download/test.mp4 -vf "movie=/storage/emulated/0/Download/test.mp4 [logo]; [in][logo] overlay=W-w-10:H-h-10, fade=in:0:20 [out]" /storage/emulated/0/Download/test.mp4

    Please note these quotes after -vf flag and these [in], [logo] flags. These just throw me an errors like

    [NULL @ 0xb5bf3200] Unable to find a suitable output format for '[logo];'
    [logo];: Invalid argument

    and so on. The quotes in the command are also the problem which throws me an error like :

    [AVFilterGraph @ 0xb5c092c0] No such filter: 'overlay=main_w-50:main_h-50,overlay=0:0'
    Error initializing complex filters.
    Invalid argument".

    Am I even using proper library for that case ? I also want to show the watermark in specific duration of the video. For example if video is 10 seconds long, I only want watermark to be shown starting from 3rd second of the video to 7th second. I can show the overlay images like this :

    -i /storage/emulated/0/Download/test.mp4 -i /storage/emulated/0/Download/test.jpg -i /storage/emulated/0/Download/test.jpg -filter_complex overlay=main_w-50:main_h-50,overlay=0:0 -codec:a copy /storage/emulated/0/Download/test_edited.mp4

    but they’re shown for the whole video duration. Where can I set the duration start/end for the specific overlay ?

    Thank you very much !

  • C++ FFmpeg pitch issue

    24 janvier 2016, par David Andrei Norgren

    I’m using swr_convert to lower/raise the pitch of incoming audio and store it in a .mp3. To change the pitch, I’m dividing the out sample rate by a factor. However, the resulting audio is slightly distorted when this factor is anything other than 1. Here’s my conversion code :

    ...

    // Set up resample context
    swrContext = swr_alloc();
    if (!swrContext)
       throw -15;

    av_opt_set_int(swrContext, "in_channel_count", codecContext->channels, 0);
    av_opt_set_int(swrContext, "in_channel_layout", codecContext->channel_layout, 0);
    av_opt_set_int(swrContext, "in_sample_rate", codecContext->sample_rate, 0);
    av_opt_set_sample_fmt(swrContext, "in_sample_fmt", codecContext->sample_fmt, 0);

    av_opt_set_int(swrContext, "out_channel_count", STREAM_AUDIO_CHANNELS, 0);
    av_opt_set_int(swrContext, "out_channel_layout", STREAM_AUDIO_CHANNEL_LAYOUT, 0);
    av_opt_set_int(swrContext, "out_sample_rate", STREAM_AUDIO_SAMPLE_RATE / pitch, 0);
    av_opt_set_sample_fmt(swrContext, "out_sample_fmt", STREAM_AUDIO_SAMPLE_FORMAT_GM, 0);

    if (swr_init(swrContext))
       throw -16;

    // Allocate re-usable frame
    frameDecoded = av_frame_alloc();
    if (!frameDecoded)
       throw -17;

    frameDecoded->format = codecContext->sample_fmt;
    frameDecoded->channel_layout = codecContext->channel_layout;
    frameDecoded->channels = codecContext->channels;
    frameDecoded->sample_rate = codecContext->sample_rate;

    // Load frames
    inPacket.data = NULL;
    inPacket.size = 0;

    int gotFrame, samples = 0;

    while (av_read_frame(formatContext, &inPacket) >= 0) {

       if (inPacket.stream_index != streamId)
           continue;

       if (avcodec_decode_audio4(codecContext, frameDecoded, &gotFrame, &inPacket) < 0)
           throw -18;

       if (!gotFrame)
           continue;

       // Begin conversion
       if (swr_convert(swrContext, NULL, 0, (const uint8_t **)frameDecoded->data, frameDecoded->nb_samples) < 0)
           throw -19;

       while (swr_get_out_samples(swrContext, 0) >= RAW_AUDIO_FRAME_SIZE) {

           // Allocate data
           uint8_t **convertedData = NULL;
           if (av_samples_alloc_array_and_samples(&convertedData, NULL, STREAM_AUDIO_CHANNELS, RAW_AUDIO_FRAME_SIZE, STREAM_AUDIO_SAMPLE_FORMAT_GM, 0) < 0)
               throw -20;

           // Convert
           if (swr_convert(swrContext, convertedData, RAW_AUDIO_FRAME_SIZE, NULL, 0) < 0)
               throw -21;

           // Calculate buffer size
           size_t bufferSize = av_samples_get_buffer_size(NULL, STREAM_AUDIO_CHANNELS, RAW_AUDIO_FRAME_SIZE, STREAM_AUDIO_SAMPLE_FORMAT_GM, 0);
           if (bufferSize < 0)
               throw -22;

           fwrite(convertedData[0], 1, bufferSize, outStream);
           av_free(convertedData);
       }
    }

    ...

    STREAM_AUDIO_SAMPLE_RATE is defined as 44100.
    Here’s the entire program if it helps : http://pastebin.com/5akEwNg4

    The program generates a .mp3 with 25 notes that decrease in pitch.
    Here’s an example of the distortion : http://www.stuffbydavid.com/dl/30256478.mp3

    Can you spot anything incorrect about my conversion, or is my method of changing the pitch incorrect ? Is there another way ?