Recherche avancée

Médias (0)

Mot : - Tags -/tags

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

Autres articles (20)

  • Contribute to translation

    13 avril 2011

    You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
    To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
    MediaSPIP is currently available in French and English (...)

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

Sur d’autres sites (5459)

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

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

  • 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;
       }