Recherche avancée

Médias (0)

Mot : - Tags -/serveur

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

Autres articles (44)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Les vidéos

    21 avril 2011, par

    Comme 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 (...)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

Sur d’autres sites (7263)

  • Running frei0r filters with ffmpeg - "Could not find module 'pixeliz0r'."

    4 avril 2016, par ksloan

    I installed frei0r using homebrew

    MacK:tmp kevin$ brew list frei0r
    /usr/local/Cellar/frei0r/1.4/include/frei0r.h
    /usr/local/Cellar/frei0r/1.4/lib/frei0r-1/ (119 files)
    /usr/local/Cellar/frei0r/1.4/lib/pkgconfig/frei0r.pc
    /usr/local/Cellar/frei0r/1.4/share/doc/ (4 files)

    Then I installed ffmpeg with the --with-frei0r flag, and everything compiled fine

    brew install ffmpeg --with-fdk-aac --with-ffplay --with-freetype --with-libass --with-libquvi --with-libvorbis --with-libvpx --with-opus --with-x265 --with-frei0r

    I tried telling ffmpeg where my frie0r filters were installed with

    export FREI0R_PATH=/usr/local/Cellar/frei0r/1.4/lib/frei0r-1/

    I even created symlinks from the default locations ffmpeg checks...

    MacK:tmp kevin$ ls -l  /usr/local/lib/frei0r-1
    lrwxr-xr-x  1 kevin  admin  33  4 Apr 04:43 /usr/local/lib/frei0r-1 -> ../Cellar/frei0r/1.4/lib/frei0r-1

    But I’m still seeing this error :

    [Parsed_frei0r_0 @ 0x7f8938f003c0] Could not find module 'perspective'.
    [AVFilterGraph @ 0x7f8938f00160] Error initializing filter 'frei0r' with args 'perspective'
    Error initializing complex filters.
    Invalid argument

    Full output :

    MacK:tmp kevin$ ffmpeg -i 1.mp4 -filter_complex "frei0r=perspective" out.mp4
    ffmpeg version 3.0.1 Copyright (c) 2000-2016 the FFmpeg developers
     built with Apple LLVM version 7.0.2 (clang-700.1.81)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/3.0.1 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libxvid --enable-libfreetype --enable-libvorbis --enable-libvpx --enable-libass --enable-ffplay --enable-libfdk-aac --enable-libopus --enable-frei0r --enable-libx265 --enable-nonfree --enable-vda
     libavutil      55. 17.103 / 55. 17.103
     libavcodec     57. 24.102 / 57. 24.102
     libavformat    57. 25.100 / 57. 25.100
     libavdevice    57.  0.101 / 57.  0.101
     libavfilter     6. 31.100 /  6. 31.100
     libavresample   3.  0.  0 /  3.  0.  0
     libswscale      4.  0.100 /  4.  0.100
     libswresample   2.  0.101 /  2.  0.101
     libpostproc    54.  0.100 / 54.  0.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf57.25.100
     Duration: 00:00:08.34, start: 0.023220, bitrate: 4293 kb/s
       Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, 4161 kb/s, 60 fps, 60 tbr, 15360 tbn, 120 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 129 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    [Parsed_frei0r_0 @ 0x7f8938f003c0] Could not find module 'perspective'.
    [AVFilterGraph @ 0x7f8938f00160] Error initializing filter 'frei0r' with args 'perspective'
    Error initializing complex filters.
    Invalid argument

    I’ve run out of ideas to try next, what am I missing ? Any help would be greatly appreciated.

  • "Critical error detected c0000374" when running av_packet_unref or av_frame_unref

    15 mai 2021, par Shivang Sharma

    I am trying to read and decode frames which is happening nicely but when its reaching part of un-referencing frame or packet using av_packet_unref and av_frame_unref it is giving error during second frame or third frame sometimes .

    


    Error (Copied from visual studio output window) :

    


    Critical error detected c0000374
Libav.exe has triggered a breakpoint


    


    Here is some code of reading and decoding which is giving error :

    


    void Decoder::streamNextFrame(int type = 0)
{
    while (av_read_frame(this->fileFormatCtx, this->latestpacket) >= 0) {
        if (this->audioDecoder->activeAudioStream != nullptr) {
            if (this->latestpacket->stream_index == this->audioDecoder->activeAudioStream->index) {
                avcodec_send_packet(this->audioDecoder->activeStreamDecoder, this->latestpacket);
                err = avcodec_receive_frame(this->audioDecoder->activeStreamDecoder, this->decodedFrame);
                if (err == AVERROR(EAGAIN)) {
                    av_frame_unref(this->decodedFrame);
                    av_packet_unref(this->latestpacket);
                    continue;
                }

                {
                    int currentIndex = (int)this->audioFrames->size();
                    this->audioFrames->resize((int)this->audioFrames->size() + 1);
                    int nb = 0;
                    this->audioFrames->at(currentIndex).pts = (int)this->decodedFrame->pts;
                    if (this->audioDecoder->activeStreamDecoder->sample_fmt != AV_SAMPLE_FMT_S16) {
                        nb = 2048 * this->audioDecoder->activeStreamDecoder->channels;
                        printf("%i\n", nb);
                        this->audioFrames->at(currentIndex).data.resize(nb);
                        if (!swr_is_initialized(swr)) {

                            swr_alloc_set_opts(swr, this->audioDecoder->activeStreamDecoder->channel_layout, AV_SAMPLE_FMT_S16, this->audioDecoder->activeStreamDecoder->sample_rate, this->audioDecoder->activeStreamDecoder->channel_layout, this->audioDecoder->activeStreamDecoder->sample_fmt, this->audioDecoder->activeStreamDecoder->sample_rate, 0, nullptr);
                            swr_init(swr);
                        }

                        uint8_t* buffer = this->audioFrames->at(currentIndex).data.data();
                        swr_convert(swr, &buffer, nb, (const uint8_t**)this->decodedFrame->extended_data, this->decodedFrame->nb_samples);
                    }
                    else {
                        nb = this->decodedFrame->nb_samples * this->audioDecoder->activeStreamDecoder->channels;
                        this->audioFrames->at(currentIndex).data = std::vector(*this->decodedFrame->extended_data, *this->decodedFrame->extended_data + (uint8_t)nb);
                    }

                    this->audioFrames->at(currentIndex).buffersize = nb;
                }

                if (err == AVERROR_EOF) {
                    this->audioDecoder->streamEnded = true;
                    av_frame_unref(this->decodedFrame);
                    av_packet_unref(this->latestpacket);
                    break;
                }
                else if (err >= 0) {
                    this->audioDecoder->streamEnded = false;
                }

                if (type != 0) {
                    av_packet_unref(this->latestpacket);
                    av_frame_unref(this->decodedFrame);
                    break;
                }
                av_packet_unref(this->latestpacket);
                av_frame_unref(this->decodedFrame);
            }
        }
        else {
            printf("No active audio stream is set\n");
            if(type!=0)
            break;
        }
    }

}


    


    I have removed some of code which was concerning the video and was not giving problem I think.

    


    Some Information about above code :

    


    this->audioFrames is a pointer to vector with following type.&#xA;std::vector<audioframeformat>* "AudioFrameFormat" is struct defined as following&#xA;&#xA;struct AudioFrameFormat {&#xA;        std::vector data = {};&#xA;        int pts = 0;&#xA;        int buffersize = 0;&#xA;    };&#xA;&#xA;&#xA;swr is a private class member allocated in constructor&#xA;</audioframeformat>

    &#xA;

    Call Stack looks like :

    &#xA;

    enter image description here

    &#xA;

    I am getting from call stack is that I am not taking care of my heap memory.

    &#xA;

    Can someone please explain where problem is and, why some times it run till third frame and some time till second frame of the audio stream ?

    &#xA;

    And please tell how can I improve this code.

    &#xA;

  • Have an error running one PowerShell script to concatenate avi files, when a very similar script works fine

    1er juillet 2023, par hw22s

    When I run the following PowerShell script, to concatenate the .avi files in a folder, I get an error.

    &#xA;

    Script :

    &#xA;

    # Set the folder path where the AVI files are located&#xA;$folderPath = "C:\Users\HomePC\hswlab\Desktop\videos\eyeblink\022223\2023_04_24\16_15_23\My_WebCam"&#xA;&#xA;# Get all AVI files in the folder&#xA;$aviFiles = Get-ChildItem -Path $folderPath -Filter "*.avi" | Sort-Object Name&#xA;&#xA;# Check if there are at least 2 AVI files for concatenation&#xA;if ($aviFiles.Count -ge 2) {&#xA;    $videoFiles = $aviFiles.FullName&#xA;&#xA;    Write-Host "Input Files for Concatenation:"&#xA;    foreach ($file in $aviFiles) {&#xA;        Write-Host $file.Name&#xA;    }&#xA;&#xA;    $outputFile = Join-Path -Path $folderPath -ChildPath "concatenated.avi"&#xA;&#xA;    # Create the FFmpeg command for concatenation&#xA;    $concatArguments = "-f", "concat", "-i", "`"concat:$videoFiles`"", "-c", "copy", "`"$outputFile`""&#xA;&#xA;    $command = "ffmpeg $concatArguments"&#xA;    Write-Host "FFmpeg Command: $command"&#xA;&#xA;    try {&#xA;        $process = Start-Process -FilePath "ffmpeg" -ArgumentList $concatArguments -NoNewWindow -PassThru -Wait -ErrorAction Stop&#xA;        Write-Host "Concatenation complete. Output file: $outputFile"&#xA;    } catch {&#xA;        Write-Host "Error occurred while executing FFmpeg command:"&#xA;        Write-Host "Error message: $($_.Exception.Message)"&#xA;    }&#xA;} else {&#xA;    Write-Host "Not enough AVI files found in the folder for concatenation."&#xA;}&#xA;

    &#xA;

    Output with error, (and no concatenated file is actually produced, needless to say) :

    &#xA;

    Input Files for Concatenation:&#xA;webcam0.avi&#xA;webcam1.avi&#xA;FFmpeg Command: ffmpeg -f concat -i "concat:C:\Users\HomePC\hswlab\Desktop\videos\eyeblink\022223\2023_04_24\16_15_23\My_WebCam\webcam0.avi C:\Users\HomePC\hswlab\Desktop\videos\eyeblink\022223\2023_04_24\16_15_23\My_WebCam\webcam1.avi" -c copy "C:\Users\HomePC\hswlab\Desktop\videos\eyeblink\022223\2023_04_24\16_15_23\My_WebCam\concatenated.avi"&#xA;ffmpeg version 2023-06-27-git-9b6d191a66-essentials_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers&#xA;  built with gcc 12.2.0 (Rev10, Built by MSYS2 project)&#xA;  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libvpl --enable-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband&#xA;  libavutil      58. 13.101 / 58. 13.101&#xA;  libavcodec     60. 21.100 / 60. 21.100&#xA;  libavformat    60.  9.100 / 60.  9.100&#xA;  libavdevice    60.  2.100 / 60.  2.100&#xA;  libavfilter     9.  8.102 /  9.  8.102&#xA;  libswscale      7.  3.100 /  7.  3.100&#xA;  libswresample   4. 11.100 /  4. 11.100&#xA;  libpostproc    57.  2.100 / 57.  2.100&#xA;[in#0 @ 000001d2f05f1b00] Error opening input: Invalid argument&#xA;Concatenation complete. Output file: C:\Users\HomePC\hswlab\Desktop\videos\eyeblink\022223\2023_04_24\16_15_23\My_WebCam\concatenated.avi&#xA;

    &#xA;

    But this script, which ostensibly does the same thing to the same files, works fine :

    &#xA;

    $file1 = "C:\Users\HomePC\hswlab\Desktop\videos\eyeblink\022223\2023_04_24\16_15_23\My_WebCam\webcam0.avi"       # Path to the first video file&#xA;$file2 = "C:\Users\HomePC\hswlab\Desktop\videos\eyeblink\022223\2023_04_24\16_15_23\My_WebCam\webcam1.avi"       # Path to the second video file&#xA;$outputFile = "C:\Users\HomePC\hswlab\Desktop\videos\eyeblink\022223\2023_04_24\16_15_23\My_WebCam\concat.avi"  # Path to the output concatenated video file&#xA;&#xA;# Create a temporary batch script&#xA;$batchScriptPath = [System.IO.Path]::GetTempFileName() &#x2B; ".bat"&#xA;@&#x27;&#xA;@echo off&#xA;ffmpeg -i "%~1" -i "%~2" -filter_complex "[0:v][1:v]concat=n=2:v=1[outv]" -map "[outv]" "%~3"&#xA;&#x27;@ | Set-Content -Path $batchScriptPath&#xA;&#xA;# Execute the temporary batch script&#xA;try {&#xA;    &amp; $batchScriptPath $file1 $file2 $outputFile&#xA;    Write-Host "Concatenation complete. Output file: $outputFile"&#xA;} catch {&#xA;    Write-Host "Error occurred while executing FFmpeg command:"&#xA;    Write-Host $_.Exception.Message&#xA;}&#xA;&#xA;# Remove the temporary batch script&#xA;Remove-Item -Path $batchScriptPath -Force&#xA;

    &#xA;

    I can't figure out what is wrong with the first script. I tried many variations of the first script but cannot get it to work.

    &#xA;

    Any help ?

    &#xA;