Recherche avancée

Médias (1)

Mot : - Tags -/vidéo

Autres articles (60)

  • Le plugin : Gestion de la mutualisation

    2 mars 2010, par

    Le plugin de Gestion de mutualisation permet de gérer les différents canaux de mediaspip depuis un site maître. Il a pour but de fournir une solution pure SPIP afin de remplacer cette ancienne solution.
    Installation basique
    On installe les fichiers de SPIP sur le serveur.
    On ajoute ensuite le plugin "mutualisation" à la racine du site comme décrit ici.
    On customise le fichier mes_options.php central comme on le souhaite. Voilà pour l’exemple celui de la plateforme mediaspip.net :
    < ?php (...)

  • Installation en mode ferme

    4 février 2011, par

    Le mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
    C’est la méthode que nous utilisons sur cette même plateforme.
    L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
    Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)

  • Formulaire personnalisable

    21 juin 2013, par

    Cette page présente les champs disponibles dans le formulaire de publication d’un média et il indique les différents champs qu’on peut ajouter. Formulaire de création d’un Media
    Dans le cas d’un document de type média, les champs proposés par défaut sont : Texte Activer/Désactiver le forum ( on peut désactiver l’invite au commentaire pour chaque article ) Licence Ajout/suppression d’auteurs Tags
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire. (...)

Sur d’autres sites (8287)

  • FFmpeg psycho-visual options - psy-rdoq

    7 avril 2020, par SLVR

    I'm new to encoding and I like to do my encodings in x265 10bit. Currently, I'm facing a little issue with ffmpeg. I noticed when I'm using libx265 encoder output file looks a little bit blurred or small detail loss. Code I used to do my encodes is

    &#xA;&#xA;

    ffmpeg -i input.mp4 -c:v libx265 -preset medium -crf 22 -pix_fmt yuv420p10le -c:a copy -y output-x26510bit.mkv&#xA;

    &#xA;&#xA;

    I've found out psycho-visual options might help in this case. I modified my code in to

    &#xA;&#xA;

    ffmpeg -i input.mp4 -c:v libx265 -preset medium -crf 22 -pix_fmt yuv420p10le -psy-rd 2 -psy-rdoq 4 --rdoq-level 1 -c:a copy -y output-x26510bit.mkv&#xA;

    &#xA;&#xA;

    When I issue the above command, I get an error code

    &#xA;&#xA;

    C:\Users\abc\Desktop\1>ffmpeg -i input.mp4 -c:v libx265 -preset medium -crf 22 -pix_fmt yuv420p10le -psy-rd 2 -psy-rdoq&#xA; 4 -rdoq-level 1 -c:a copy -y output-x26510bit.mkv&#xA;ffmpeg version git-2020-04-03-52523b6 Copyright (c) 2000-2020 the FFmpeg developers&#xA;  built with gcc 9.3.1 (GCC) 20200328&#xA;  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enabl&#xA;e-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enab&#xA;le-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enabl&#xA;e-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --&#xA;enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-l&#xA;ibvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom&#xA;--enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --en&#xA;able-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf&#xA;  libavutil      56. 42.102 / 56. 42.102&#xA;  libavcodec     58. 77.101 / 58. 77.101&#xA;  libavformat    58. 42.100 / 58. 42.100&#xA;  libavdevice    58.  9.103 / 58.  9.103&#xA;  libavfilter     7. 77.101 /  7. 77.101&#xA;  libswscale      5.  6.101 /  5.  6.101&#xA;  libswresample   3.  6.100 /  3.  6.100&#xA;  libpostproc    55.  6.100 / 55.  6.100&#xA;Unrecognized option &#x27;psy-rdoq&#x27;.&#xA;Error splitting the argument list: Option not found&#xA;

    &#xA;&#xA;

    How do I solve this issue

    &#xA;

  • VLC Player shows broken HLS stream with 4k HDR10 mkv

    8 avril 2023, par goodkid38

    I am trying to convert a 4k mkv to an HLS stream but I am not having any luck. I have tried a few ffmpeg commands to try and fix the issue but none have worked. Here are the commands I have tried.

    &#xA;

      &#xA;
    1. Basic copy command :
    2. &#xA;

    &#xA;

    ffmpeg -i "video.mkv" -c copy -f hls "plexTemp/out.m3u8"

    &#xA;

      &#xA;
    1. Command used to see if it was an HDR color issue :
    2. &#xA;

    &#xA;

    ffmpeg -i "video.mkv" -c copy -pix_fmt yuv420p10le -f hls "plexTemp/out.m3u8"&#xA;3. Command used to revert to 8 bit color :

    &#xA;

    ffmpeg -i "video.mkv" -c copy -pix_fmt yuv420p -f hls "plexTemp/out.m3u8"

    &#xA;

      &#xA;
    1. I tried removing extra streams and just focusing on audio and video :
    2. &#xA;

    &#xA;

    ffmpeg -i "out.mkv" -map 0:v:0 -map 0:a:1 -c copy -pix_fmt yuv420p10le -f hls "plexTemp/out.m3u8"

    &#xA;

    I also saw these warnings when running each command.Stream HEVC is not hvc1, you should use tag:v hvc1 to set it.&#xA;And this

    &#xA;

    [matroska,webm @ 000001d7921803c0] Stream #12: not enough frames to estimate rate; consider increasing probesize&#xA;[matroska,webm @ 000001d7921803c0] Could not find codec parameters for stream 6 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size&#xA;Consider increasing the value for the &#x27;analyzeduration&#x27; (0) and &#x27;probesize&#x27; (5000000) options&#xA;[matroska,webm @ 000001d7921803c0] Could not find codec parameters for stream 7 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size&#xA;Consider increasing the value for the &#x27;analyzeduration&#x27; (0) and &#x27;probesize&#x27; (5000000) options&#xA;[matroska,webm @ 000001d7921803c0] Could not find codec parameters for stream 8 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size&#xA;Consider increasing the value for the &#x27;analyzeduration&#x27; (0) and &#x27;probesize&#x27; (5000000) options&#xA;[matroska,webm @ 000001d7921803c0] Could not find codec parameters for stream 9 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size&#xA;Consider increasing the value for the &#x27;analyzeduration&#x27; (0) and &#x27;probesize&#x27; (5000000) options&#xA;[matroska,webm @ 000001d7921803c0] Could not find codec parameters for stream 10 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size&#xA;Consider increasing the value for the &#x27;analyzeduration&#x27; (0) and &#x27;probesize&#x27; (5000000) options&#xA;[matroska,webm @ 000001d7921803c0] Could not find codec parameters for stream 11 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size&#xA;Consider increasing the value for the &#x27;analyzeduration&#x27; (0) and &#x27;probesize&#x27; (5000000) options&#xA;

    &#xA;

    So I tried increasing the analyzeduration and probesize and adding the tag like so :&#xA;ffmpeg -analyzeduration 10000000 -probesize 10000000 -i "out.mkv" -c copy -tag:v hvc1 -f hls "plexTemp/out.m3u8"

    &#xA;

    To no avail. Here is what the output looks like on VLC. It's mostly black with a few lines of color that randomly change.enter image description here

    &#xA;

    On my TV I see this :

    &#xA;

    enter image description here

    &#xA;

    One thing I see that stands out in ffmpegs output is this :

    &#xA;

    [hls @ 00000207239a9ec0] Opening &#x27;plexTemp/out0.ts&#x27; for writing7 bitrate=  -0.0kbits/s speed=N/A&#xA;[hls @ 00000207239a9ec0] Opening &#x27;plexTemp/out.m3u8.tmp&#x27; for writing&#xA;

    &#xA;

    Here is the audio and video info on the mkv :

    &#xA;

    General&#xA;Unique ID                                : 92280908398971492516286250889389584022 (0x456CA80EF29B1357B572719D6EC4AE96)&#xA;Complete name                            : I:\video.mkv&#xA;Format                                   : Matroska&#xA;Format version                           : Version 2&#xA;File size                                : 49.4 GiB&#xA;Duration                                 : 1 h 39 min&#xA;Overall bit rate mode                    : Variable&#xA;Overall bit rate                         : 71.2 Mb/s&#xA;Frame rate                               : 23.976 FPS&#xA;Movie name                               : video&#xA;Encoded date                             : 2023-04-06 22:39:53 UTC&#xA;Writing application                      : MakeMKV v1.16.7 win(x64-release)&#xA;Writing library                          : libmakemkv v1.16.7 (1.3.10/1.5.2) win(x64-release)&#xA;Cover                                    : Yes&#xA;Attachments                              : cover.jpg&#xA;&#xA;Video&#xA;ID                                       : 1&#xA;ID in the original source medium         : 4113 (0x1011)&#xA;Format                                   : HEVC&#xA;Format/Info                              : High Efficiency Video Coding&#xA;Format profile                           : Main 10@L5.1@High&#xA;HDR format                               : SMPTE ST 2086, HDR10 compatible&#xA;Codec ID                                 : V_MPEGH/ISO/HEVC&#xA;Duration                                 : 1 h 39 min&#xA;Bit rate                                 : 63.6 Mb/s&#xA;Width                                    : 3 840 pixels&#xA;Height                                   : 2 160 pixels&#xA;Display aspect ratio                     : 16:9&#xA;Frame rate mode                          : Constant&#xA;Frame rate                               : 23.976 (24000/1001) FPS&#xA;Color space                              : YUV&#xA;Chroma subsampling                       : 4:2:0 (Type 2)&#xA;Bit depth                                : 10 bits&#xA;Bits/(Pixel*Frame)                       : 0.320&#xA;Stream size                              : 44.1 GiB (89%)&#xA;Writing library                          : ATEME Titan File 3.9.6 (4.9.6.2)        &#xA;Language                                 : English&#xA;Default                                  : No&#xA;Forced                                   : No&#xA;Color range                              : Limited&#xA;Color primaries                          : BT.2020&#xA;Transfer characteristics                 : PQ&#xA;Matrix coefficients                      : BT.2020 non-constant&#xA;Mastering display color primaries        : Display P3&#xA;Mastering display luminance              : min: 0.0050 cd/m2, max: 1000 cd/m2&#xA;Maximum Content Light Level              : 1000 cd/m2&#xA;Maximum Frame-Average Light Level        : 140 cd/m2&#xA;Original source medium                   : Blu-ray&#xA;&#xA;Audio #1&#xA;ID                                       : 2&#xA;ID in the original source medium         : 4352 (0x1100)&#xA;Format                                   : DTS XLL X&#xA;Format/Info                              : Digital Theater Systems&#xA;Commercial name                          : DTS:X&#xA;Codec ID                                 : A_DTS&#xA;Duration                                 : 1 h 39 min&#xA;Bit rate mode                            : Variable&#xA;Bit rate                                 : 4 174 kb/s&#xA;Channel(s)                               : 8 channels&#xA;Channel layout                           : C L R LFE Lb Rb Lss Rss&#xA;Sampling rate                            : 48.0 kHz&#xA;Frame rate                               : 93.750 FPS (512 SPF)&#xA;Bit depth                                : 24 bits&#xA;Stream size                              : 2.89 GiB (6%)&#xA;Title                                    : Surround 7.1&#xA;Language                                 : English&#xA;Default                                  : Yes&#xA;Forced                                   : No&#xA;Original source medium                   : Blu-ray&#xA;Here is information on the HLS output:&#xA;General&#xA;Complete name                            : I:\out.m3u8&#xA;Format                                   : HLS&#xA;Format profile                           : Media&#xA;File size                                : 67.4 MiB&#xA;Duration                                 : 8 s 138 ms&#xA;Overall bit rate mode                    : Variable&#xA;Overall bit rate                         : 69.4 Mb/s&#xA;Frame rate                               : 23.976 FPS&#xA;

    &#xA;

    And my&#xA;Here is the output of my HLS stream :

    &#xA;

    Video&#xA;ID                                       : 256 (0x100)&#xA;Menu ID                                  : 1 (0x1)&#xA;Format                                   : HEVC&#xA;Format/Info                              : High Efficiency Video Coding&#xA;Format profile                           : Main 10@L5.1@High&#xA;HDR format                               : SMPTE ST 2086, HDR10 compatible&#xA;Muxing mode                              : MPEG-TS&#xA;Codec ID                                 : 36&#xA;Duration                                 : 8 s 49 ms&#xA;Width                                    : 3 840 pixels&#xA;Height                                   : 2 160 pixels&#xA;Display aspect ratio                     : 16:9&#xA;Frame rate                               : 23.976 (24000/1001) FPS&#xA;Color space                              : YUV&#xA;Chroma subsampling                       : 4:2:0 (Type 2)&#xA;Bit depth                                : 10 bits&#xA;Writing library                          : ATEME Titan File 3.9.6 (4.9.6.2)        &#xA;Color range                              : Limited&#xA;Color primaries                          : BT.2020&#xA;Transfer characteristics                 : PQ&#xA;Matrix coefficients                      : BT.2020 non-constant&#xA;Mastering display color primaries        : Display P3&#xA;Mastering display luminance              : min: 0.0050 cd/m2, max: 1000 cd/m2&#xA;Maximum Content Light Level              : 1000 cd/m2&#xA;Maximum Frame-Average Light Level        : 140 cd/m2&#xA;Source                                   : out92.ts&#xA;&#xA;Audio&#xA;ID                                       : 257 (0x101)&#xA;Menu ID                                  : 1 (0x1)&#xA;Format                                   : DTS XLL X&#xA;Format/Info                              : Digital Theater Systems&#xA;Commercial name                          : DTS:X&#xA;Muxing mode                              : MPEG-TS&#xA;Codec ID                                 : 130&#xA;Duration                                 : 8 s 138 ms&#xA;Bit rate mode                            : Variable&#xA;Channel(s)                               : 8 channels&#xA;Channel layout                           : C L R LFE Lb Rb Lss Rss&#xA;Sampling rate                            : 48.0 kHz&#xA;Frame rate                               : 93.750 FPS (512 SPF)&#xA;Bit depth                                : 24 bits&#xA;Delay relative to video                  : -125 ms&#xA;Language                                 : English&#xA;Source                                   : out92.ts&#xA;

    &#xA;

  • 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 &lt;_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