Recherche avancée

Médias (0)

Mot : - Tags -/logo

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

Autres articles (72)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

Sur d’autres sites (9383)

  • VLC and ffplay not receiving video from RTMP stream on Nginx

    14 janvier, par Ekobadd

    I'm streaming via OBS 30.1.2 to an RTMP server on a digitalocean droplet. The server is running on nginx 1.26.0 using the RTMP plugin (libnginx-mod-rtmp in apt).

    


    OBS is configured to output H.264-encoded, 1200kbps, 24fps, 1920x1080 video and aac-encoded, stereo, 44.1kHz, 160kbps audio.

    


    Below is the minimal reproducible example. When I attempt to play the rtmp stream with ffplay or VLC, it's a random chance whether I get video or not. Audio is always fine. The output from ffplay or ffprobe (example below) occasionally does not show any video stream.

    


    rtmp {&#xA;        server {&#xA;                listen 1935;&#xA;                chunk_size 4096;&#xA;&#xA;                application ingest {&#xA;                        live on;&#xA;                        record off;&#xA;&#xA;                        allow publish <my ip="ip" address="address">;&#xA;                        deny publish all;&#xA;&#xA;                        allow play all;&#xA;                }&#xA;        }&#xA;}&#xA;</my>

    &#xA;

    The server has two applications, "ingest" and "live", the former uses the following ffmpeg command to transcode the stream and create a corresponding stream on the latter application :

    &#xA;

    exec_push ffmpeg -i rtmp://localhost/ingest/$name -b:v 1200k -c:v libx264 -c:a aac -ar 44100 -ac 1 -f flv -preset veryfast -tune zerolatency rtmp://localhost/live/$name 2>>/tmp/rtmp-ingest-$name.log;&#xA;

    &#xA;

    As you can see, this produces a log which shows the following :

    &#xA;

    Output #0, flv, to &#x27;rtmp://localhost/live/ekobadd&#x27;:&#xA;  Metadata:&#xA;    |RtmpSampleAccess: true&#xA;    Server          : NGINX RTMP (github.com/arut/nginx-rtmp-module)&#xA;    displayWidth    : 1920&#xA;    displayHeight   : 1080&#xA;    fps             : 23&#xA;    profile         :&#xA;    level           :&#xA;    encoder         : Lavf61.1.100&#xA;  Stream #0:0: Audio: aac (LC) ([10][0][0][0] / 0x000A), 44100 Hz, mono, fltp, 69 kb/s&#xA;      Metadata:&#xA;        encoder         : Lavc61.3.100 aac&#xA;

    &#xA;

    The video is not present, though I can see on the digitalocean control panel that the server is pulling 1.2Mbps inbound, which is about the same as my OBS video bitrate. And, although the ffmpeg instance which is transcoding does not appear to see the video stream from the ingest application, ffprobe from my local machine does, sometimes :

    &#xA;

    > ffprobe rtmp://mydomain.com/ingest/ekobadd&#xA;...&#xA;Input #0, flv, from &#x27;rtmp://mydomain.com/ingest/ekobadd&#x27;:   0B f=0/0&#xA;  Metadata:&#xA;    |RtmpSampleAccess: true&#xA;    Server          : NGINX RTMP (github.com/arut/nginx-rtmp-module)&#xA;    displayWidth    : 1920&#xA;    displayHeight   : 1080&#xA;    fps             : 23&#xA;    profile         :&#xA;    level           :&#xA;  Duration: 00:00:00.00, start: 122.045000, bitrate: N/A&#xA;  Stream #0:0: Audio: aac (LC), 48000 Hz, stereo, fltp, 163 kb/s&#xA;  Stream #0:1: Video: h264 (High), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 1228 kb/s, 23 fps, 23.98 tbr, 1k tbn&#xA;     126.24 A-V: -1.071 fd=   0 aq=   54KB vq=  161KB sq=    0B f=0/0&#xA;

    &#xA;

    Sometimes, however, it doesn't see the stream at all :

    &#xA;

    [rtmp @ 0000022d87d0fe00] Server error: No such stream&#xA;rtmp://mydomain.com/ingest/ekobadd: Operation not permitted&#xA;

    &#xA;

    Testing the stream with VLC gives the same results.

    &#xA;

    Of course, the "live" application also doesn't have video. I have, however, streamed video from it before. I assume if I restart nginx enough, that the exec_push ffmpeg command will randomly see the video stream much like ffprobe does. I also have HLS and DASH configured, and they're both working perfect if you're a radio talk show host.

    &#xA;

    /etc/nginx/nginx.conf : (I'm quite sure I never touched anything in the HTTP section, but it's included just in case)

    &#xA;

    rtmp {&#xA;        server {&#xA;                listen 1935;&#xA;                chunk_size 8192;&#xA;&#xA;                idle_streams off;&#xA;&#xA;                application ingest {&#xA;                        live on;&#xA;                        record off;&#xA;&#xA;                        # Transcode to h264/aac via flv, 1.2Mbps 24fps 44.1kHz, single audio channel video (HLS Ready)&#xA;                        exec_push ffmpeg -i rtmp://localhost/ingest/$name -b:v 1200k -c:v libx264 -c:a aac -ar 44100 -ac 1 -f flv -preset veryfast -tune zerolatency rtmp://localhost/live/$name 2>>/tmp/rtmp-ingest-$name.log;&#xA;&#xA;                        allow publish <my ip="ip" address="address">;&#xA;                        deny publish all;&#xA;&#xA;                        allow play all; # This was added for debugging.&#xA;                }&#xA;&#xA;                application live {&#xA;                        live on;&#xA;                        record off;&#xA;&#xA;                        hls on;&#xA;                        hls_path /var/www/mydomain.com/html/live/hls;&#xA;                        hls_fragment 6s;&#xA;                        hls_playlist_length 60;&#xA;&#xA;                        dash on;&#xA;                        dash_path /var/www/mydomain.com/html/live/dash;&#xA;&#xA;                        allow publish 127.0.0.1;&#xA;                        deny publish all;&#xA;&#xA;                        allow play all;&#xA;                }&#xA;        }&#xA;}&#xA;&#xA;http {&#xA;&#xA;        ##&#xA;        # Basic Settings&#xA;        ##&#xA;&#xA;        sendfile on;&#xA;        tcp_nopush on;&#xA;        types_hash_max_size 2048;&#xA;        server_tokens build; # Recommended practice is to turn this off&#xA;&#xA;        server_names_hash_bucket_size 64;&#xA;        # server_name_in_redirect off;&#xA;&#xA;        include /etc/nginx/mime.types;&#xA;        default_type application/octet-stream;&#xA;&#xA;        ##&#xA;        # SSL Settings&#xA;        ##&#xA;&#xA;        ssl_protocols TLSv1.2 TLSv1.3; # Dropping SSLv3 (POODLE), TLS 1.0, 1.1&#xA;        ssl_prefer_server_ciphers off; # Don&#x27;t force server cipher order.&#xA;&#xA;        ##&#xA;        # Logging Settings&#xA;        ##&#xA;&#xA;        access_log /var/log/nginx/access.log;&#xA;&#xA;        ##&#xA;        # Gzip Settings&#xA;        ##&#xA;&#xA;        gzip on;&#xA;&#xA;        # gzip_vary on;&#xA;        # gzip_proxied any;&#xA;        # gzip_comp_level 6;&#xA;        # gzip_buffers 16 8k;&#xA;        # gzip_http_version 1.1;&#xA;        # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml&#x2B;rss text/javascript;&#xA;&#xA;        ##&#xA;        # Virtual Host Configs&#xA;        ##&#xA;&#xA;        include /etc/nginx/conf.d/*.conf;&#xA;        include /etc/nginx/sites-enabled/*;&#xA;}&#xA;</my>

    &#xA;

    /etc/nginx/sites-available/mydomain.com :

    &#xA;

    server {&#xA;        listen 443 ssl;&#xA;&#xA;        ssl_certificate     /etc/letsencrypt/live/mydomain.com/fullchain.pem;&#xA;        ssl_certificate_key /etc/letsencrypt/live/mydomain.com/privkey.pem;&#xA;        ssl_protocols       TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;&#xA;        ssl_ciphers         HIGH:!aNULL:!MD5;&#xA;&#xA;        root /var/www/mydomain.com/html;&#xA;&#xA;        server_name mydomain.com www.mydomain.com;&#xA;&#xA;        location / {&#xA;                root /var/www/mydomain.com/html/live;&#xA;&#xA;#               add_header Cache-Control no-cache;&#xA;                add_header Access-Control-Allow-Origin *;&#xA;        }&#xA;}&#xA;&#xA;types {&#xA;#       application/vnd.apple.mpegurl m3u8;&#xA;        application/dash&#x2B;xml mpd;&#xA;}&#xA;

    &#xA;

  • Build FFmpeg with Freetype2 for ARM

    28 avril 2016, par Pawel Cala

    I’m trying to build FFmpeg binary file with freetype library included ( I need it for drawtext filter ). Unfortunately I cannot configure ffmpeg properly and every try ends with "freetype not found" error.

    PS I’ve tried to build guardian-ffmpeg project but i’m getting errors during configure process.

    PS2 Building plain ffmpeg works perfectly well

    Configuration script :

    make distclean &amp;./configure --target-os=linux \
    --cross-prefix=arm-linux-androideabi- \
    --arch=arm \
    --cpu=armv7-a \
    --enable-libfreetype --enable-filter=drawtext \ #!Freetype params
    --disable-network \
    --disable-ffplay \
    --disable-ffprobe \
    --disable-ffserver \
    --enable-protocol=file \
    --sysroot=${ANDROID_NDK_ROOT_PATH}/platforms/${ANDROID_API_VERSION}/arch-arm \
    --prefix=build/armeabi-v7a \
    --disable-asm \
    --extra-cflags='-DANDROID -Ifreetype2/ -I${ANDROID_NDK_ROOT_PATH}/sources/cxx-stl/system/include -march=armv7-a -mfloat-abi=softfp' \
    --extra-ldflags='-Wl,--fix-cortex-a8 -Lfreetype2/ -L../android-libs -Wl,-rpath-link,../android-libs' \
    --extra-cxxflags='-Wno-multichar -fno-exceptions -fno-rtti'
    make -j6 &amp;&amp; make install || exit 0

    Directories sctructure :

    ffmpeg/
      -ffmpeg dirs/
      -freetype2/
      -rest of ffmpeg files ( including configure, make, etc )

    I’ve checked patch sources in guardian-project and I’ve found that ffmpeg configure file might need some changes in require_libfreetype method ?!

    Thanks in advance ( and sorry for my bad english )

    EDIT :
    Building on OSX Mavericks,
    Last 3 lines of config.log ; OSX hasn’t got pkg-config therefore false in 2nd line :

    require_libfreetype
    false --exists --print-errors freetype
    ERROR: freetype not found

    EDIT :
    SOLUTION !!!

    I’ve manadged to solve my issue. I’ve used Xubuntu 14.04 64bit + Freetype 2.5.3 + newest FFmpeg repo + install linux package "pkg_config" and small modifications in ffmpeg configure script ( find pkg_config and check initialization variable )

    config file for freetype :

    NDK_BASE=/home/dpc/Documents/android-ndk-r9d/
    NDK_PROCESSOR=x86_64
    NDK_PLATFORM_LEVEL=9
    NDK_ABI=arm
    NDK_COMPILER_VERSION=4.6

    # Android NDK setup
    NDK_PLATFORM_LEVEL=9
    NDK_ABI=arm
    NDK_COMPILER_VERSION=4.6
    NDK_SYSROOT=$NDK_BASE/platforms/android-$NDK_PLATFORM_LEVEL/arch-$NDK_ABI
    NDK_UNAME=`uname -s | tr '[A-Z]' '[a-z]'`
    if [ $NDK_ABI = "x86" ]; then
       HOST=i686-linux-android
       NDK_TOOLCHAIN=$NDK_ABI-$NDK_COMPILER_VERSION
    else
       HOST=$NDK_ABI-linux-androideabi
       NDK_TOOLCHAIN=$HOST-$NDK_COMPILER_VERSION
    fi
    NDK_TOOLCHAIN_BASE=$NDK_BASE/toolchains/$NDK_TOOLCHAIN/prebuilt/$NDK_UNAME-$NDK_PROCESSOR
    echo "dpc:" $NDK_TOOLCHAIN_BASE

    CC="$NDK_TOOLCHAIN_BASE/bin/$HOST-gcc --sysroot=$NDK_SYSROOT"
    LD=$NDK_TOOLCHAIN_BASE/bin/$HOST-ld
    STRIP=$NDK_TOOLCHAIN_BASE/bin/$HOST-strip
    PREFIX=$(pwd)/build

    simple_config(){
    make clean
    ./configure --host=arm-linux-androideabi --without-zlib --without-png --prefix=
    make -j4
    make install DESTDIR=$(pwd)
    }

    complex_config(){

       ./configure \
       CC="$CC" \
       LD="$LD" \
       CFLAGS="-std=gnu99 -mcpu=cortex-a8 -marm -mfloat-abi=softfp -mfpu=neon" \
       --host=$HOST \
       --with-sysroot="$NDK_SYSROOT" \
       --enable-static \
       --disable-shared \
       --prefix=$PREFIX
       --without-bzip2

       make -j4
       make install
    }


    make clean
    complex_config

    ffmpeg config file :

    #!/bin/sh

    ANDROID_NDK_ROOT_PATH=/home/dpc/Documents/android-ndk-r9d
    ANDROID_API_VERSION=android-9
    #export PATH=${ANDROID_NDK_ROOT_PATH}:${ANDROID_NDK_ROOT_PATH}/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/:$PATH
    export PATH=${ANDROID_NDK_ROOT_PATH}:${ANDROID_NDK_ROOT_PATH}/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/:$PATH
    echo $PATH
    #export PKG_CONFIG_PATH=/home/dpc/Documents/freetype-2.5.3/build/lib/pkgconfig/
    #echo $PKG_CONFIG_PATH

    #armv7-a neon
    #export ARCH=armeabi-v7a-neon
    #./configure --target-os=linux --cross-prefix=arm-linux-androideabi- --arch=arm --cpu=armv7-a --sysroot=${ANDROID_NDK_ROOT_PATH}/platforms/${ANDROID_API_VERSION}/arch-arm --disable-avdevice --disable-decoder=h264_vdpau  --prefix=build/armeabi-v7a-neon --extra-cflags='-DANDROID -I${ANDROID_NDK_ROOT_PATH}/sources/cxx-stl/system/include -march=armv7-a -mfloat-abi=softfp -mfpu=neon' --extra-ldflags='-Wl,--fix-cortex-a8 -L../android-libs -Wl,-rpath-link,../android-libs' --extra-cxxflags='-Wno-multichar -fno-exceptions -fno-rtti'
    #make -j6 &amp;&amp; make install &amp;&amp; make distclean|| exit 0

    #armv7-a
    export ARCH=armeabi-v7a
    ./configure --target-os=linux \
    --cross-prefix=arm-linux-androideabi- \
    --arch=arm \
    --enable-libfreetype \
    --cpu=armv7-a \
    --sysroot=${ANDROID_NDK_ROOT_PATH}/platforms/${ANDROID_API_VERSION}/arch-arm \
    --disable-avdevice \
    --disable-decoder=h264_vdpau  \
    --prefix=build/armeabi-v7a \
    --extra-cflags='-DANDROID -I${ANDROID_NDK_ROOT_PATH}/sources/cxx-stl/system/include -march=armv7-a -mfloat-abi=softfp' \
    --extra-ldflags='-Wl,--fix-cortex-a8 -L../android-libs -Wl,-rpath-link,../android-libs' \
    --extra-cxxflags='-Wno-multichar -fno-exceptions -fno-rtti'
    make -j6 &amp;&amp; make install &amp;&amp; make distclean|| exit 0

    Hope it helps someone (cc : @SinhHo )

  • Why do I get different codecs on Windows and Linux with same code ?

    27 janvier 2016, par user3277340

    I am using the API version of FFMPEG to generate a MP4 file from a series of images. I specify the output by calling

    AVFormatContext *oc = NULL ;
    avformat_alloc_output_context2 (&oc,NULL,"mp4",NULL) ;

    Running the exact same code on Windows and Linux I get different codecs assigned. On Windows, the value of oc->oformat->video_code is AV_CODEC_ID_H264 (28), but on Linux I get AV_CODEC_ID_MPEG4.

    I tracked this down because on Windows my calls to avcodec_encode_video2(.,.,.,&got_packet) were always returning got_packet=0 so I never called av_interleaved_write_frame. I added a NULL AVFrame at the end to flush the video. But it was very small and did not contain the images I expected to see there.

    But on Linux everything worked just fine. So I went ahead and manually changed the value of oc->oformat->video_code and I got the expected results.

    My questions :

    1) Why do I get different codec types on different platforms with the same code ? Is there a parameter I need to set to force MPEG4 ?

    2) Is it "legal" to change this parameter after the call to avformat_alloc_output_context2 ? My concern is that "oc" has been properly initialized and, with the change, something may be inconsistent.

    3) Is there a way to force the MPEG4 codec on any machine ?

    Thanks.