Recherche avancée

Médias (91)

Autres articles (71)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (11066)

  • FFPlay : How to manually select video quality during playing the mpd stream ?

    19 août 2023, par Brian_wu

    I used ffplay to play mpd stream and successed,

    


    Here the MPD file :

    


    &lt;?xml version="1.0" encoding="utf-8"?>&#xA;<mpd xmlns="urn:mpeg:dash:schema:mpd:2011" profiles="urn:mpeg:dash:profile:isoff-live:2011" type="static" mediapresentationduration="PT1M8.7S" maxsegmentduration="PT5.0S" minbuffertime="PT12.5S">&#xA;    <programinformation>&#xA;    </programinformation>&#xA;    <servicedescription>&#xA;    </servicedescription>&#xA;    <period start="PT0.0S">&#xA;        <adaptationset contenttype="video" startwithsap="1" segmentalignment="true" bitstreamswitching="true" framerate="24000/1001" maxwidth="1280" maxheight="720" par="16:9">&#xA;        <representation mimetype="video/mp4" codecs="avc1.4d401f" bandwidth="10237" width="480" height="270" sar="1:1">&#xA;            <segmenttemplate timescale="24000" initialization="init-stream$RepresentationID$.m4s" media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startnumber="1">&#xA;                <segmenttimeline>&#xA;                    <s t="0" d="150150" r="9"></s>&#xA;                    <s d="149149"></s>&#xA;                </segmenttimeline>&#xA;            </segmenttemplate>&#xA;        </representation>&#xA;        <representation mimetype="video/mp4" codecs="avc1.4d401f" bandwidth="60882" width="1280" height="720" sar="1:1">&#xA;            <segmenttemplate timescale="24000" initialization="init-stream$RepresentationID$.m4s" media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startnumber="1">&#xA;                <segmenttimeline>&#xA;                    <s t="0" d="150150" r="9"></s>&#xA;                    <s d="149149"></s>&#xA;                </segmenttimeline>&#xA;            </segmenttemplate>&#xA;        </representation>&#xA;    </adaptationset>&#xA;    <adaptationset contenttype="audio" startwithsap="1" segmentalignment="true" bitstreamswitching="true" lang="und">&#xA;        <representation mimetype="audio/mp4" codecs="mp4a.40.2" bandwidth="128000" audiosamplingrate="32000">&#xA;            <audiochannelconfiguration schemeiduri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"></audiochannelconfiguration>&#xA;            <segmenttemplate timescale="32000" initialization="init-stream$RepresentationID$.m4s" media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startnumber="1">&#xA;                <segmenttimeline>&#xA;                    <s t="0" d="159744"></s>&#xA;                    <s d="160768" r="11"></s>&#xA;                    <s d="111915"></s>&#xA;                </segmenttimeline>&#xA;            </segmenttemplate>&#xA;        </representation>&#xA;        <representation mimetype="audio/mp4" codecs="mp4a.40.2" bandwidth="128000" audiosamplingrate="44100">&#xA;            <audiochannelconfiguration schemeiduri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"></audiochannelconfiguration>&#xA;            <segmenttemplate timescale="44100" initialization="init-stream$RepresentationID$.m4s" media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startnumber="1">&#xA;                <segmenttimeline>&#xA;                    <s t="0" d="220160"></s>&#xA;                    <s d="221184" r="11"></s>&#xA;                    <s d="158713"></s>&#xA;                </segmenttimeline>&#xA;            </segmenttemplate>&#xA;        </representation>&#xA;    </adaptationset>&#xA;</period>&#xA;</mpd>

    &#xA;&#xA;

    this dash stream contains 2 vindeos(480P and 720P), and 2 audios.The videos always starts low quality(480P), I want to change the video resolution to the high quality(720P) during playing process, what should i do ?

    &#xA;

  • How can I build a custom version of opencv while enabling CUDA and opengl ?

    1er avril, par Josh

    I have a hard requirement of python3.7 for certain libraries (aeneas & afaligner). I've been using the regular opencv-python and ffmpeg libraries in my program and they've been working find.

    &#xA;

    Recently I wanted to adjust my program to use h264 instead of mpeg4 and ran down a licensing rabbit hole of how opencv-python uses a build of ffmpeg with opengl codecs off to avoid licensing issues. x264 is apparently opengl, and is disabled in the opencv-python library.

    &#xA;

    In order to solve this issue, I built a custom build of opencv using another custom build of ffmpeg both with opengl enabled. This allowed me to use the x264 encoder with the VideoWriter in my python program.

    &#xA;

    Here's the dockerfile of how I've been running it :

    &#xA;&#xA;

    FROM python:3.7-slim&#xA;&#xA;# Set optimization flags and number of cores globally&#xA;ENV CFLAGS="-O3 -march=native -ffast-math -flto -fno-fat-lto-objects -ffunction-sections -fdata-sections" \&#xA;    CXXFLAGS="-O3 -march=native -ffast-math -flto -fno-fat-lto-objects -ffunction-sections -fdata-sections" \&#xA;    LDFLAGS="-flto -fno-fat-lto-objects -Wl,--gc-sections" \&#xA;    MAKEFLAGS="-j\$(nproc)"&#xA;&#xA;# Combine all system dependencies in a single layer&#xA;RUN apt-get update &amp;&amp; apt-get install -y --no-install-recommends \&#xA;    build-essential \&#xA;    cmake \&#xA;    git \&#xA;    wget \&#xA;    unzip \&#xA;    yasm \&#xA;    pkg-config \&#xA;    libsm6 \&#xA;    libxext6 \&#xA;    libxrender-dev \&#xA;    libglib2.0-0 \&#xA;    libavcodec-dev \&#xA;    libavformat-dev \&#xA;    libswscale-dev \&#xA;    libavutil-dev \&#xA;    libswresample-dev \&#xA;    nasm \&#xA;    mercurial \&#xA;    libnuma-dev \&#xA;    espeak \&#xA;    libespeak-dev \&#xA;    libtiff5-dev \&#xA;    libjpeg62-turbo-dev \&#xA;    libopenjp2-7-dev \&#xA;    zlib1g-dev \&#xA;    libfreetype6-dev \&#xA;    liblcms2-dev \&#xA;    libwebp-dev \&#xA;    tcl8.6-dev \&#xA;    tk8.6-dev \&#xA;    python3-tk \&#xA;    libharfbuzz-dev \&#xA;    libfribidi-dev \&#xA;    libxcb1-dev \&#xA;    python3-dev \&#xA;    python3-setuptools \&#xA;    libsndfile1 \&#xA;    libavdevice-dev \&#xA;    libavfilter-dev \&#xA;    libpostproc-dev \&#xA;    &amp;&amp; apt-get clean \&#xA;    &amp;&amp; rm -rf /var/lib/apt/lists/*&#xA;&#xA;# Build x264 with optimizations&#xA;RUN cd /tmp &amp;&amp; \&#xA;    wget https://code.videolan.org/videolan/x264/-/archive/master/x264-master.tar.bz2 &amp;&amp; \&#xA;    tar xjf x264-master.tar.bz2 &amp;&amp; \&#xA;    cd x264-master &amp;&amp; \&#xA;    ./configure \&#xA;        --enable-shared \&#xA;        --enable-pic \&#xA;        --enable-asm \&#xA;        --enable-lto \&#xA;        --enable-strip \&#xA;        --enable-optimizations \&#xA;        --bit-depth=8 \&#xA;        --disable-avs \&#xA;        --disable-swscale \&#xA;        --disable-lavf \&#xA;        --disable-ffms \&#xA;        --disable-gpac \&#xA;        --disable-lsmash \&#xA;        --extra-cflags="-O3 -march=native -ffast-math -fomit-frame-pointer -flto -fno-fat-lto-objects" \&#xA;        --extra-ldflags="-O3 -flto -fno-fat-lto-objects" &amp;&amp; \&#xA;    make &amp;&amp; \&#xA;    make install &amp;&amp; \&#xA;    cd /tmp &amp;&amp; \&#xA;    # Build FFmpeg with optimizations&#xA;    wget https://ffmpeg.org/releases/ffmpeg-7.1.tar.bz2 &amp;&amp; \&#xA;    tar xjf ffmpeg-7.1.tar.bz2 &amp;&amp; \&#xA;    cd ffmpeg-7.1 &amp;&amp; \&#xA;    ./configure \&#xA;        --enable-gpl \&#xA;        --enable-libx264 \&#xA;        --enable-shared \&#xA;        --enable-nonfree \&#xA;        --enable-pic \&#xA;        --enable-asm \&#xA;        --enable-optimizations \&#xA;        --enable-lto \&#xA;        --enable-pthreads \&#xA;        --disable-debug \&#xA;        --disable-static \&#xA;        --disable-doc \&#xA;        --disable-ffplay \&#xA;        --disable-ffprobe \&#xA;        --disable-filters \&#xA;        --disable-programs \&#xA;        --disable-postproc \&#xA;        --extra-cflags="-O3 -march=native -ffast-math -fomit-frame-pointer -flto -fno-fat-lto-objects -ffunction-sections -fdata-sections" \&#xA;        --extra-ldflags="-O3 -flto -fno-fat-lto-objects -Wl,--gc-sections" \&#xA;        --prefix=/usr/local &amp;&amp; \&#xA;    make &amp;&amp; \&#xA;    make install &amp;&amp; \&#xA;    ldconfig &amp;&amp; \&#xA;    rm -rf /tmp/*&#xA;&#xA;# Install Python dependencies first&#xA;RUN pip install --no-cache-dir --upgrade pip setuptools wheel &amp;&amp; \&#xA;    pip install --no-cache-dir numpy py-spy&#xA;&#xA;# Build OpenCV with optimized configuration&#xA;RUN cd /tmp &amp;&amp; \&#xA;    # Download specific OpenCV version archives&#xA;    wget -O opencv.zip https://github.com/opencv/opencv/archive/4.8.0.zip &amp;&amp; \&#xA;    wget -O opencv_contrib.zip https://github.com/opencv/opencv_contrib/archive/4.8.0.zip &amp;&amp; \&#xA;    unzip opencv.zip &amp;&amp; \&#xA;    unzip opencv_contrib.zip &amp;&amp; \&#xA;    mv opencv-4.8.0 opencv &amp;&amp; \&#xA;    mv opencv_contrib-4.8.0 opencv_contrib &amp;&amp; \&#xA;    rm opencv.zip opencv_contrib.zip &amp;&amp; \&#xA;    cd opencv &amp;&amp; \&#xA;    mkdir build &amp;&amp; cd build &amp;&amp; \&#xA;    cmake \&#xA;        -D CMAKE_BUILD_TYPE=RELEASE \&#xA;        -D CMAKE_C_FLAGS="-O3 -march=native -ffast-math -flto -fno-fat-lto-objects -ffunction-sections -fdata-sections" \&#xA;        -D CMAKE_CXX_FLAGS="-O3 -march=native -ffast-math -flto -fno-fat-lto-objects -ffunction-sections -fdata-sections -Wno-deprecated" \&#xA;        -D CMAKE_EXE_LINKER_FLAGS="-flto -fno-fat-lto-objects -Wl,--gc-sections" \&#xA;        -D CMAKE_SHARED_LINKER_FLAGS="-flto -fno-fat-lto-objects -Wl,--gc-sections" \&#xA;        -D CMAKE_INSTALL_PREFIX=/usr/local \&#xA;        -D ENABLE_FAST_MATH=ON \&#xA;        -D CPU_BASELINE_DETECT=ON \&#xA;        -D CPU_BASELINE=SSE3 \&#xA;        -D CPU_DISPATCH=SSE4_1,SSE4_2,AVX,AVX2,AVX512_SKX,FP16 \&#xA;        -D WITH_OPENMP=ON \&#xA;        -D OPENCV_ENABLE_NONFREE=ON \&#xA;        -D WITH_FFMPEG=ON \&#xA;        -D FFMPEG_ROOT=/usr/local \&#xA;        -D OPENCV_EXTRA_MODULES_PATH=/tmp/opencv_contrib/modules \&#xA;        -D PYTHON_EXECUTABLE=/usr/local/bin/python3.7 \&#xA;        -D PYTHON3_EXECUTABLE=/usr/local/bin/python3.7 \&#xA;        -D PYTHON3_INCLUDE_DIR=/usr/local/include/python3.7m \&#xA;        -D PYTHON3_LIBRARY=/usr/local/lib/libpython3.7m.so \&#xA;        -D PYTHON3_PACKAGES_PATH=/usr/local/lib/python3.7/site-packages \&#xA;        -D PYTHON3_NUMPY_INCLUDE_DIRS=/usr/local/lib/python3.7/site-packages/numpy/core/include \&#xA;        -D BUILD_opencv_python3=ON \&#xA;        -D INSTALL_PYTHON_EXAMPLES=OFF \&#xA;        -D BUILD_TESTS=OFF \&#xA;        -D BUILD_PERF_TESTS=OFF \&#xA;        -D BUILD_EXAMPLES=OFF \&#xA;        -D BUILD_DOCS=OFF \&#xA;        -D BUILD_opencv_apps=OFF \&#xA;        -D WITH_OPENCL=OFF \&#xA;        -D WITH_CUDA=OFF \&#xA;        -D WITH_IPP=OFF \&#xA;        -D WITH_TBB=OFF \&#xA;        -D WITH_V4L=OFF \&#xA;        -D WITH_QT=OFF \&#xA;        -D WITH_GTK=OFF \&#xA;        -D BUILD_LIST=core,imgproc,imgcodecs,videoio,python3 \&#xA;        .. &amp;&amp; \&#xA;    make &amp;&amp; \&#xA;    make install &amp;&amp; \&#xA;    ldconfig &amp;&amp; \&#xA;    rm -rf /tmp/*&#xA;&#xA;# Set working directory and copy application code&#xA;WORKDIR /app&#xA;&#xA;COPY requirements.txt .&#xA;&#xA;RUN apt-get update &amp;&amp; apt-get install -y --no-install-recommends ffmpeg&#xA;&#xA;RUN pip install --no-cache-dir aeneas afaligner &amp;&amp; \&#xA;    pip install --no-cache-dir -r requirements.txt&#xA;&#xA;COPY . .&#xA;&#xA;# Make entrypoint executable&#xA;RUN chmod &#x2B;x entrypoint.sh&#xA;ENTRYPOINT ["./entrypoint.sh"]&#xA;

    &#xA;

    My trouble now, is I've been considering running parts of my program on my GPU, it's creating graphics for a video after all. I have no idea how to edit my Dockerfile to make the opencv build run with CUDA enabled, every combination I try leads to issues.

    &#xA;

    How can I tell which version of CUDA, opencv and ffmpeg are compatible with python 3.7 ?

    &#xA;

  • dockerfile apt-get install ffmpeg unmet dependencies

    8 juillet 2020, par Martin

    I have a Dockerfile which looks like this :

    &#xA;

    FROM node:carbon&#xA;VOLUME ["/root"]&#xA;ADD setup-ffmpeg.sh /root&#xA;RUN /root/setup-ffmpeg.sh&#xA;# Create app directory&#xA;WORKDIR /usr/src/app&#xA;# Install app dependencies&#xA;# A wildcard is used to ensure both package.json AND package-lock.json are copied&#xA;# where available (npm@5&#x2B;)&#xA;COPY package*.json ./&#xA;RUN npm install&#xA;# If you are building your code for production&#xA;# RUN npm install --only=production&#xA;# Bundle app source&#xA;COPY . .&#xA;EXPOSE 8080&#xA;CMD [ "npm", "start" ]&#xA;

    &#xA;

    Which tries to run the file setup-ffmpeg.sh :

    &#xA;

    #!/usr/bin/env bash&#xA;echo &#x27;deb http://www.deb-multimedia.org jessie main non-free&#x27; >> /etc/apt/sources.list&#xA;echo &#x27;deb-src http://www.deb-multimedia.org jessie main non-free&#x27; >> /etc/apt/sources.list&#xA;apt-get update&#xA;apt-get install -y --force-yes deb-multimedia-keyring&#xA;apt-get remove -y --force-yes ffmpeg&#xA;apt-get install -y --force-yes build-essential libmp3lame-dev libvorbis-dev libtheora-dev     libspeex-dev yasm pkg-config libfaac-dev libx264-dev libav-tools &#xA;echo "ffmpeg time"&#xA;apt-get install ffmpeg &#xA;

    &#xA;

    I am on Ubuntu 20.04 LTS, and try to run this the Dockerfile, from terminal, with the command :

    &#xA;

    docker build -t alien35/node-web-app .&#xA;

    &#xA;

    This causes an error when reaching the ffmpeg part though :

    &#xA;

    Sending build context to Docker daemon  9.793MB&#xA;Step 1/10 : FROM node:carbon&#xA; ---> 8eeadf3757f4&#xA;Step 2/10 : VOLUME ["/root"]&#xA; ---> Using cache&#xA; ---> 3658672462de&#xA;Step 3/10 : ADD setup-ffmpeg.sh /root&#xA; ---> c9c192aa97c5&#xA;Step 4/10 : RUN /root/setup-ffmpeg.sh&#xA; ---> Running in b9240ac8d351&#xA;Ign:1 http://deb.debian.org/debian stretch InRelease&#xA;Get:2 http://security.debian.org/debian-security stretch/updates InRelease [53.0 kB]&#xA;Get:3 http://deb.debian.org/debian stretch-updates InRelease [93.6 kB]&#xA;Get:4 http://deb.debian.org/debian stretch Release [118 kB]&#xA;Get:5 http://deb.debian.org/debian stretch Release.gpg [2410 B]&#xA;Get:6 http://security.debian.org/debian-security stretch/updates/main amd64 Packages [529 kB]&#xA;Get:7 http://deb.debian.org/debian stretch-updates/main amd64 Packages [28.2 kB]&#xA;Get:8 http://deb.debian.org/debian stretch/main amd64 Packages [7083 kB]&#xA;Get:9 http://www.deb-multimedia.org jessie InRelease [24.6 kB]&#xA;Ign:9 http://www.deb-multimedia.org jessie InRelease&#xA;Get:10 http://www.deb-multimedia.org jessie/main Sources [60.8 kB]&#xA;Get:11 http://www.deb-multimedia.org jessie/non-free Sources [2480 B]&#xA;Get:12 http://www.deb-multimedia.org jessie/main amd64 Packages [82.8 kB]&#xA;Get:13 http://www.deb-multimedia.org jessie/non-free amd64 Packages [1776 B]&#xA;Fetched 8080 kB in 2s (3402 kB/s)&#xA;Reading package lists...&#xA;W: GPG error: http://www.deb-multimedia.org jessie InRelease: The following signatures couldn&#x27;t be verified because the public key is not available: NO_PUBKEY 5C808C2B65558117&#xA;W: The repository &#x27;http://www.deb-multimedia.org jessie InRelease&#x27; is not signed.&#xA;Reading package lists...&#xA;Building dependency tree...&#xA;Reading state information...&#xA;The following NEW packages will be installed:&#xA;  deb-multimedia-keyring&#xA;0 upgraded, 1 newly installed, 0 to remove and 56 not upgraded.&#xA;Need to get 10.7 kB of archives.&#xA;After this operation, 25.6 kB of additional disk space will be used.&#xA;WARNING: The following packages cannot be authenticated!&#xA;  deb-multimedia-keyring&#xA;Get:1 http://www.deb-multimedia.org jessie/main amd64 deb-multimedia-keyring all 2016.8.1 [10.7 kB]&#xA;debconf: delaying package configuration, since apt-utils is not installed&#xA;Fetched 10.7 kB in 0s (23.3 kB/s)&#xA;Selecting previously unselected package deb-multimedia-keyring.&#xA;(Reading database ... 29962 files and directories currently installed.)&#xA;Preparing to unpack .../deb-multimedia-keyring_2016.8.1_all.deb ...&#xA;Unpacking deb-multimedia-keyring (2016.8.1) ...&#xA;Setting up deb-multimedia-keyring (2016.8.1) ...&#xA;W: --force-yes is deprecated, use one of the options starting with --allow instead.&#xA;W: --force-yes is deprecated, use one of the options starting with --allow instead.&#xA;Reading package lists...&#xA;Building dependency tree...&#xA;Reading state information...&#xA;Package &#x27;ffmpeg&#x27; is not installed, so not removed&#xA;0 upgraded, 0 newly installed, 0 to remove and 56 not upgraded.&#xA;Reading package lists...&#xA;Building dependency tree...&#xA;Reading state information...&#xA;pkg-config is already the newest version (0.29-4&#x2B;b1).&#xA;pkg-config set to manually installed.&#xA;Some packages could not be installed. This may mean that you have&#xA;requested an impossible situation or if you are using the unstable&#xA;distribution that some required packages have not yet been created&#xA;or been moved out of Incoming.&#xA;The following information may help to resolve the situation:&#xA;&#xA;The following packages have unmet dependencies:&#xA; libav-tools : Depends: ffmpeg (= 10:2.6.9-dmo1&#x2B;deb8u2) but it is not going to be installed&#xA;E: Unable to correct problems, you have held broken packages.&#xA;ffmpeg time&#xA;Reading package lists...&#xA;Building dependency tree...&#xA;Reading state information...&#xA;Some packages could not be installed. This may mean that you have&#xA;requested an impossible situation or if you are using the unstable&#xA;distribution that some required packages have not yet been created&#xA;or been moved out of Incoming.&#xA;The following information may help to resolve the situation:&#xA;&#xA;The following packages have unmet dependencies:&#xA; ffmpeg : Depends: libavcodec56 (>= 10:2.6.9) but it is not going to be installed&#xA;          Depends: libavdevice56 (>= 10:2.6.9) but it is not going to be installed&#xA;          Depends: libavfilter5 (>= 10:2.6.9) but it is not going to be installed&#xA;          Depends: libavformat56 (>= 10:2.6.9) but it is not going to be installed&#xA;E: Unable to correct problems, you have held broken packages.&#xA;The command &#x27;/bin/sh -c /root/setup-ffmpeg.sh&#x27; returned a non-zero code: 100&#xA;

    &#xA;

    I have tried adding the dependencies to apt-get install in my Dockerfile, and adding -f to the ffmpeg command as well, but I am still getting this error

    &#xA;