Recherche avancée

Médias (1)

Mot : - Tags -/école

Autres articles (86)

  • 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

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

Sur d’autres sites (11391)

  • opencv ffmpeg vaapi 1080p resolution not working

    18 avril 2023, par yeo

    I want to use hardware acceleration with opencv manual build.
My gpu uses an i965 intel cpu built-in graphics card, and it is a debain11 environment.

    


    [OPENCV:FFMPEG:40] Reinit context to 1920x1088, pix_fmt: vaapi_vld


    


    If you look at some of the error messages below, it seems that the original file is 1920x1080 because it is converted to 1088 while reinit.
I've read that vaapi_vld reads 16 bits at a time.
In fact, it seems to work when the original file is changed to 1920x1072.
Is there a way to fix it without changing the original file resolution ?
Please advise seniors.
Sorry for my poor English skills
Thank you

    


    manual build CMAKE option

    


    "-DCMAKE_VERBOSE_MAKEFILE=ON -DWITH_VA_INTEL=ON -DWITH_VA=ON -DOPENCV_FFMPEG_ENABLE_LIBAVDEVICE=ON -DOPENCV_ENABLE_GLX=ON -DOPENCV_FFMPEG_SKIP_BUILD_CHECK=ON -DWITH_OPENVINO=ON -DWITH_INF_ENGINE=ON"



    


    build infomation

    


      OpenCV modules:
    To be built:                 calib3d core dnn features2d flann gapi highgui imgcodecs imgproc ml objdetect photo python3 stitching video videoio
    Disabled:                    world
    Disabled by dependency:      -
    Unavailable:                 java python2 ts
    Applications:                -
    Documentation:               NO
    Non-free algorithms:         NO

  GUI:                           GTK3
    GTK+:                        YES (ver 3.24.24)
      GThread :                  YES (ver 2.66.8)
      GtkGlExt:                  NO
    VTK support:                 NO
  Media I/O: 
    ZLib:                        /usr/lib/x86_64-linux-gnu/libz.so (ver 1.2.11)
    JPEG:                        /usr/lib/x86_64-linux-gnu/libjpeg.so (ver 62)
    WEBP:                        /usr/lib/x86_64-linux-gnu/libwebp.so (ver encoder: 0x020e)
    PNG:                         /usr/lib/x86_64-linux-gnu/libpng.so (ver 1.6.37)
    TIFF:                        /usr/lib/x86_64-linux-gnu/libtiff.so (ver 42 / 4.2.0)
    JPEG 2000:                   build (ver 2.4.0)
    OpenEXR:                     build (ver 2.3.0)
    HDR:                         YES
    SUNRASTER:                   YES
    PXM:                         YES
    PFM:                         YES
  Video I/O:
    DC1394:                      YES (2.2.6)
    FFMPEG:                      YES
      avcodec:                   YES (58.91.100)
      avformat:                  YES (58.45.100)
      avutil:                    YES (56.51.100)
      swscale:                   YES (5.7.100)
      avresample:                YES (4.0.0)
    GStreamer:                   YES (1.18.4)
    v4l/v4l2:                    YES (linux/videodev2.h)

  Parallel framework:            pthreads

  Trace:                         YES (with Intel ITT)

  Other third-party libraries:
    Intel IPP:                   2020.0.0 Gold [2020.0.0]
    VA:                          YES
    Lapack:                      NO
    Eigen:                       NO
    Custom HAL:                  NO
    Protobuf:                    build (3.19.1)

  OpenCL:                        YES (INTELVA)
    Include path:                /home/xxx
    Link libraries:              Dynamic load

  Python 3:
    Interpreter:                 /usr/bin/python3 (ver 3.9.2)
    Libraries:                   /usr/lib/x86_64-linux-gnu/libpython3.9.so (ver 3.9.2)
    numpy:                       /home/../include (ver 1.19.3)
    install path:                python/cv2/python-3


    


    vainfo

    


    libva info: VA-API version 1.10.0
libva info: User environment variable requested driver 'i965'
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_8
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.10 (libva 2.10.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Haswell Mobile - 2.4.1
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Simple            : VAEntrypointEncSlice
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileH264MultiviewHigh      : VAEntrypointVLD
      VAProfileH264MultiviewHigh      : VAEntrypointEncSlice
      VAProfileH264StereoHigh         : VAEntrypointVLD
      VAProfileH264StereoHigh         : VAEntrypointEncSlice
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc
      VAProfileJPEGBaseline           : VAEntrypointVLD


    


    import os
import cv2

os.environ["OPENCV_FFMPEG_CAPTURE_OPTIONS"] = "hw_decoders_any;vaapi,vdpau" +

cap = cv2.VideoCapture(file_name,cv2.CAP_FFMPEG(cv2.CAP_PROP_HW_ACCELERATION,cv2.VIDEO_ACCELERATION_ANY))  



    


    error code

    


    [ INFO:0@0.187] global /home/u/opencv-python/opencv/modules/videoio/src/videoio_registry.cpp (223) VideoBackendRegistry VIDEOIO: Enabled backends(8, sorted by priority): FFMPEG(1000); GSTREAMER(990); INTEL_MFX(980); V4L2(970); CV_IMAGES(960); CV_MJPEG(950); FIREWIRE(940); UEYE(930)
[OPENCV:FFMPEG:40] Reinit context to 1920x1088, pix_fmt: yuv420p
[OPENCV:FFMPEG:40] Trying to use DRM render node for device 0.
[OPENCV:FFMPEG:40] libva: VA-API version 1.10.0
libva: User environment variable requested driver 'i965'
libva: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva: Found init function __vaDriverInit_1_8
libva: va_openDriver() returns 0
Initialised VAAPI connection: version 1.10
[OPENCV:FFMPEG:40] VAAPI driver: Intel i965 driver for Intel(R) Haswell Mobile - 2.4.1.
[OPENCV:FFMPEG:40] Driver not found in known nonstandard list, using standard behaviour.
[ INFO:0@0.228] global /home/u/opencv-python/opencv/modules/videoio/src/cap_ffmpeg_hw.hpp (276) hw_check_device FFMPEG: Using vaapi video acceleration on device: Intel i965 driver for Intel(R) Haswell Mobile - 2.4.1
[ INFO:0@0.228] global /home/u/opencv-python/opencv/modules/videoio/src/cap_ffmpeg_hw.hpp (566) hw_create_device FFMPEG: Created video acceleration context (av_hwdevice_ctx_create) for vaapi on device 'default'
[ INFO:0@0.228] global /home/u/opencv-python/opencv/modules/core/src/ocl.cpp (1186) haveOpenCL Initialize OpenCL runtime...
[ INFO:0@0.228] global /home/u/opencv-python/opencv/modules/core/src/ocl.cpp (1192) haveOpenCL OpenCL: found 0 platforms
File open : ./videoplayback1.mp4
[OPENCV:FFMPEG:40] Reinit context to 1920x1088, pix_fmt: vaapi_vld
[OPENCV:FFMPEG:16] Failed to read image from surface 0x4000014: 18 (invalid parameter).
[ERROR:0@0.245] global /home/u/opencv-python/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp (1575) retrieveFrame Error copying data from GPU to CPU (av_hwframe_transfer_data)
Play video ... size=1920x1080, file=./videoplayback1.mp4
[OPENCV:FFMPEG:16] Failed to read image from surface 0x4000012: 18 (invalid parameter).
[ERROR:0@0.277] global /home/u/opencv-python/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp (1575) retrieveFrame Error copying data from GPU to CPU (av_hwframe_transfer_data)
OpenCV(4.6.0) Error: Assertion failed (!image.empty()) in imencode, file /home/u/opencv-python/opencv/modules/imgcodecs/src/loadsave.cpp, line 976
err =  OpenCV(4.6.0) /home/u/opencv-python/opencv/modules/imgcodecs/src/loadsave.cpp:976: error: (-215:Assertion failed) !image.empty() in function 'imencode'



    


    I tried to do video capture by ffmpeg hwacceleration with opencv, but an error message occurred

    


  • Unable to open audio file on Heroku using Librosa

    15 mars 2020, par Rohan Bojja

    I have a feature extraction REST API written in Python using the Librosa library (Extracting audio features), it receives an audio file through HTTP POST and responds with a list of features(such as MFCC,etc).

    Since librosa depends on SoundFile (libsndfile1 / libsndfile-dev), it doesn’t support all the formats, I’m converting the audio file using ffmpeg-python wrapper (https://kkroening.github.io/ffmpeg-python/) .

    It works just fine on my Windows 10 machine with Conda, but when I deploy it on Heroku, the librosa.load() functions returns an unknown format error, no matter what format I convert it to. I have tried FLAC, AIFF and WAV.

    My first guess is that the converted format isn’t supported by libsndfile1, but it works on my local server (plus, their documentation says AIFF and WAV are supported), so I’m a little lost.

    I have attached all the relevant snippets of code below, I can provide anything extra if necessary. Any help is highly appreciated. Thanks.

    UPDATE1 :

    I am using pipes instead of writing and reading from disk, worth a mention as the question could be misleading otherwise.

    The log :

    File "/app/app.py", line 31, in upload
    x , sr = librosa.load(audioFile,mono=True,duration=5)
    File "/app/.heroku/python/lib/python3.6/site-packages/librosa/core/audio.py", line 164, in load
    six.reraise(*sys.exc_info())
    File "/app/.heroku/python/lib/python3.6/site-packages/six.py", line 703, in reraise
    raise value
    File "/app/.heroku/python/lib/python3.6/site-packages/librosa/core/audio.py", line 129, in load
    with sf.SoundFile(path) as sf_desc:
    File "/app/.heroku/python/lib/python3.6/site-packages/soundfile.py", line 629, in __init__
    self._file = self._open(file, mode_int, closefd)
    File "/app/.heroku/python/lib/python3.6/site-packages/soundfile.py", line 1184, in _open
    "Error opening {0!r}: ".format(self.name))
    File "/app/.heroku/python/lib/python3.6/site-packages/soundfile.py", line 1357, in _error_check
    raise RuntimeError(prefix + _ffi.string(err_str).decode('utf-8', 'replace'))
    RuntimeError: Error opening <_io.BytesIO object at 0x7f46ad28beb8>: File contains data in an unknown format.
    10.69.244.94 - - [15/Mar/2020:12:37:28 +0000] "POST /receiveWav HTTP/1.1" 500 290 "-" "curl/7.55.1"

    Flask/Librosa code deployed on Heroku (app.py) :

    from flask import Flask, jsonify, request
    import scipy.optimize
    import os,pickle
    import numpy as np
    from sklearn.preprocessing import StandardScaler
    import librosa
    import logging
    import soundfile as sf
    from pydub import AudioSegment
    import subprocess as sp
    import ffmpeg
    from io import BytesIO

    logging.basicConfig(level=logging.DEBUG)

    app = Flask(__name__)

    @app.route('/receiveWav',methods = ['POST'])
    def upload():
       if(request.method == 'POST'):
           f = request.files['file']
           app.logger.info(f'AUDIO FORMAT\n\n\n\n\n\n\n\n\n\n: {f}')
           proc = (
               ffmpeg.input('pipe:')
               .output('pipe:', format='aiff')
               .run_async(pipe_stdin=True,pipe_stdout=True, pipe_stderr=True)
           )
           audioFile,err = proc.communicate(input=f.read())
           audioFile =  BytesIO(audioFile)
           scaler = pickle.load(open("scaler.ok","rb"))
           x , sr = librosa.load(audioFile,mono=True,duration=5)
           y=x
           #Extract the features
           chroma_stft = librosa.feature.chroma_stft(y=y, sr=sr)
           spec_cent = librosa.feature.spectral_centroid(y=y, sr=sr)
           spec_bw = librosa.feature.spectral_bandwidth(y=y, sr=sr)
           rolloff = librosa.feature.spectral_rolloff(y=y, sr=sr)
           zcr = librosa.feature.zero_crossing_rate(y)
           rmse = librosa.feature.rms(y=y)
           mfcc = librosa.feature.mfcc(y=y, sr=sr)
           features = f'{np.mean(chroma_stft)} {np.mean(rmse)} {np.mean(spec_cent)} {np.mean(spec_bw)} {np.mean(rolloff)} {np.mean(zcr)}'    
           for e in mfcc:
               features += f' {np.mean(e)}'
           input_data2 = np.array([float(i) for i in features.split(" ")]).reshape(1,-1)
           input_data2 = scaler.transform(input_data2)
           return jsonify(input_data2.tolist())

    # driver function
    if __name__ == '__main__':  
       app.run(debug = True)

    Aptfile :

    libsndfile1
    libsndfile-dev
    libav-tools
    libavcodec-extra-53
    libavcodec-extra-53
    ffmpeg

    requirements.txt :

    aniso8601==8.0.0
    audioread==2.1.8
    certifi==2019.11.28
    cffi==1.14.0
    Click==7.0
    decorator==4.4.2
    ffmpeg-python==0.2.0
    Flask==1.1.1
    Flask-RESTful==0.3.8
    future==0.18.2
    gunicorn==20.0.4
    itsdangerous==1.1.0
    Jinja2==2.11.1
    joblib==0.14.1
    librosa==0.7.2
    llvmlite==0.31.0
    MarkupSafe==1.1.1
    marshmallow==3.2.2
    numba==0.48.0
    numpy==1.18.1
    pycparser==2.20
    pydub==0.23.1
    pytz==2019.3
    resampy==0.2.2
    scikit-learn==0.22.2.post1
    scipy==1.4.1
    six==1.14.0
    SoundFile==0.10.3.post1
    Werkzeug==1.0.0
    wincertstore==0.2
  • Matomo’s privacy-friendly web analytics software named best of the year 2022

    25 janvier 2023, par Erin

    W3Tech names Matomo ‘Traffic Analysis Tool of the Year 2022’ in its Web Technologies of the Year list of technologies that gained the most sites

    Matomo, a world-leading open-source web analytics platform, is proud to announce that it has received W3Tech’s award for the best web analytics software in its Web Technologies of the Year 2022. Matomo is the first independent, open-source tool named Traffic Analysis Tool of the Year – with previous winners including Google Analytics and Facebook Pixel.


    W3Tech, a trusted source for web technology research, determines winners for its annual Web Technologies of the Year list by technologies that gained the most websites. W3Tech surveys usage across millions of websites globally – comparing the number of sites using a technology on January 1st of one year with the number of sites using it the following year.

    W3Tech commenting on the Traffic Analysis Tool winners, said : “Matomo, the privacy-focused open source analytics platform, is the traffic analysis tool of the year for the first time, while Google Analytics and the other previous winners all lost a bit of market share in 2022. The Chinese Baidu Analytics ranks second this year. Snowplow, another open source tool, is an unexpected third.”


    Matomo launched in 2007 as an open-source analytics alternative to Google Analytics, keeps businesses GDPR and CCPA-compliant. Matomo is trusted by over 1.4 million websites in 220 countries and is translated into over 50 languages.


    Matomo founder Matthieu Aubry says, “As the first independent, open-source traffic analysis tool to receive this recognition, Matomo is humbled and honoured to lead the charge for change. It’s a testament to the hard work of our community, and it’s a clear sign that consumers and organisations are looking for ethical alternatives.


    “This recognition is a major win for the entire privacy movement and proves that the tide is turning against the big tech players who I believe have long prioritised profits over privacy. We are committed to continuing our work towards a more private and secure digital landscape for all.”


    In W3Tech’s Web Technologies of the Year 2022, Matomo was also judged third Tag Manager, behind Google Tag Manager and Adobe DTM.


    Matomo helps businesses and organisations track and optimise their online presence allowing users to easily collect, analyse, and act on their website and marketing data to gain a deeper understanding of their visitors and drive conversions and revenue. With 100% data ownership, customers using the company’s tools get the power to protect their website user’s privacy – and where their data is stored and what’s happening to it, without external influence. Furthermore, as the data is not sampled, it maintains data accuracy. 


    Aubry says its recent award is a positive reminder of how well this solution is performing internationally and is a testament to the exceptional quality and performance of Matomo’s powerful web analytics tools that respect a user’s privacy.


    “In 2020, the CJEU ruled US cloud servers don’t comply with GDPR. Then in 2022, the Austrian Data Protection Authority and French Data Protection Authority (CNIL) ruled that the use of Google Analytics is illegal due to data transfers to the US. With Matomo Cloud, the customer’s data is stored in Europe, and no data is transferred to the US. On the other hand, with Matomo On-Premise, the data is stored in your country of choice.


    “Matomo has also become one of the most popular open-source alternatives to Google Analytics for website owners and marketing teams because it empowers web professionals to make business decisions. Website investment, collateral, and arrangement are enriched by having the full picture and control of the data.”

    Image of a laptop surrounded by multiple data screens from matomo

    About Matomo

    Matomo is a world-leading open-source web analytics platform, trusted by over 1.4 million websites in 220 countries and translated into over 50 languages. Matomo helps businesses and organisations track and optimise their online presence allowing users to easily collect, analyse, and act on their website and marketing data to gain a deeper understanding of their visitors and drive conversions and revenue. Matomo’s vision is to create, as a community, the leading open digital analytics platform that gives every user complete control of their data.

    For more information/ press enquiries Press – Matomo