Recherche avancée

Médias (2)

Mot : - Tags -/media

Autres articles (111)

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • Les notifications de la ferme

    1er décembre 2010, par

    Afin d’assurer une gestion correcte de la ferme, il est nécessaire de notifier plusieurs choses lors d’actions spécifiques à la fois à l’utilisateur mais également à l’ensemble des administrateurs de la ferme.
    Les notifications de changement de statut
    Lors d’un changement de statut d’une instance, l’ensemble des administrateurs de la ferme doivent être notifiés de cette modification ainsi que l’utilisateur administrateur de l’instance.
    À la demande d’un canal
    Passage au statut "publie"
    Passage au (...)

  • Initialisation de MediaSPIP (préconfiguration)

    20 février 2010, par

    Lors de l’installation de MediaSPIP, celui-ci est préconfiguré pour les usages les plus fréquents.
    Cette préconfiguration est réalisée par un plugin activé par défaut et non désactivable appelé MediaSPIP Init.
    Ce plugin sert à préconfigurer de manière correcte chaque instance de MediaSPIP. Il doit donc être placé dans le dossier plugins-dist/ du site ou de la ferme pour être installé par défaut avant de pouvoir utiliser le site.
    Dans un premier temps il active ou désactive des options de SPIP qui ne le (...)

Sur d’autres sites (6680)

  • How to transcode raw uncompressed RTP to an H264 RTSP stream

    10 mai 2019, par Gino

    I am new to streaming and am trying to figure out how to transcode streams via ffmpeg.

    I have a few raw rtp uncompressed streams where some are on address 239.x.x.x and others are on 169.x.x.x.

    I want to setup an RTSP server to grab those streams and transcode them into H264 and stream them out to a new address and port.

    I have tried some ffmpeg commands but I keep getting errors about having to compile ffmpeg with pthreads.

    I have no idea how to do that so does anyone know what commands I can use that will work with the current windows version of ffmpeg ?

    For now, I am just trying to save the stream to a file to see if that works. Command I am using is :

    ffmpeg -i rtp://224.1.1.10:6972 transcoded test.mp4

    and the return I get in the command line is

    ffmpeg version 4.1.3 Copyright (c) 2000-2019 the FFmpeg developers
     built with gcc 8.3.1 (GCC) 20190414
     configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
     libavutil      56. 22.100 / 56. 22.100
     libavcodec     58. 35.100 / 58. 35.100
     libavformat    58. 20.100 / 58. 20.100
     libavdevice    58.  5.100 / 58.  5.100
     libavfilter     7. 40.101 /  7. 40.101
     libswscale      5.  3.100 /  5.  3.100
     libswresample   3.  3.100 /  3.  3.100
     libpostproc    55.  3.100 / 55.  3.100

    [udp @ 000002cb292abf40] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)  
    [udp @ 000002cb292bc200] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)  
    rtp://224.1.1.10:6972: Immediate exit requested  
    Exiting normally, received signal 2.
  • Subtitles in ffmpeg/libavfilter

    15 juin 2021, par Captain Jack

    I have a C program to read video/audio with libav/ffmpeg libraries and decode it.

    



    I am playing with some filters and most work just fine. I can draw text, overlay logos, flip and invert video colours. However, I am having big issues overlaying subtitles.

    



    My filter is very simple.

    



    const char *vfilter_descr = "[in]subtitles=subs.srt[out]";


    



    On the console I get this :

    



    [Parsed_subtitles_0 @ 0x7fe76c703240] Shaper: FriBidi 0.19.7 (SIMPLE) HarfBuzz-ng 2.4.0 (COMPLEX)
[Parsed_subtitles_0 @ 0x7fe76c703240] Using font provider coretext
[Parsed_subtitles_0 @ 0x7fe76c703240] fontselect: (Arial, 400, 0) -> /Library/Fonts/Microsoft/Arial.ttf, -1, ArialMT
[Parsed_subtitles_0 @ 0x7fe76c703240] fontselect: (Arial, 400, 100) -> /Library/Fonts/Microsoft/Arial Italic.ttf, -1, Arial-ItalicMT


    



    ...which somewhat confirms that subtitles are loading, though I am not sure why there are two fonts being loaded ?

    



    However, they are not showing at all - almost as if they never loaded. I tried several different files, including ASS ones but no luck.

    



    ffmpeg version is the latest one.

    



    $ ffmpeg -v
ffmpeg version 4.1.3 Copyright (c) 2000-2019 the FFmpeg developers
  built with Apple LLVM version 9.0.0 (clang-900.0.39.2)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1.3_1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/adoptopenjdk-11.0.2.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-11.0.2.jdk/Contents/Home/include/darwin' --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-videotoolbox --disable-libjack --disable-indev=jack --enable-libaom --enable-libsoxr
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100


    



    Any ideas ?

    


  • FFmpeg audio stream extraction on non-interleaved AVI - slow compared to AviSynth

    8 mai 2019, par LLL

    I want to extract the audio stream of an avi file as a wav file, it works but it is really slow ( 4-5fps) although I just want to copy the stream.

    Here is the type of stream I want to extract (ffprobe info) :
    Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s

    Going through AviSynth does it about 100 times faster, but I would prefer a pure FFmpeg solution. Why such a speed difference ? It looks like FFmpeg is reading and processing through the whole file whereas AviSynth can just extract the data without reading it.

    Example :
    ffmpeg -i file.avi -vn -ac 2 -c:a copy audio.wav
    or
    ffmpeg -i file.avi -map 0:a -ac 2 -c:a copy audio.wav
    both work fine but take time.

    Using an AviSynth script as input :
    ffmpeg -i script.avs -map 0:a -ac 2 -c:a copy audio.wav
    with script.avs containing just :
    AviSource("file.avi")
    does the same but almost instantaneously !

    Any idea why AviSynth is so much faster and if there is a way to get the same speed in FFmpeg ?

    Edit : adding logs
    Using FFmpeg directly :

    E:\>ffmpeg -i "file.avi" -map 0:a -c:a copy -y -benchmark "output.wav"
    ffmpeg version N-92936-ged3b64402e Copyright (c) 2000-2019 the FFmpeg developers
     built with gcc 8.2.1 (GCC) 20181201
     configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
     libavutil      56. 25.100 / 56. 25.100
     libavcodec     58. 43.100 / 58. 43.100
     libavformat    58. 25.100 / 58. 25.100
     libavdevice    58.  6.101 / 58.  6.101
     libavfilter     7. 47.100 /  7. 47.100
     libswscale      5.  4.100 /  5.  4.100
     libswresample   3.  4.100 /  3.  4.100
     libpostproc    55.  4.100 / 55.  4.100
    [avi @ 0000018d3c38a680] non-interleaved AVI
    Guessed Channel Layout for Input Stream #0.1 : stereo
    Input #0, avi, from 'file.avi':
     Duration: 00:18:37.49, start: 0.000000, bitrate: 534682 kb/s
       Stream #0:0: Video: rawvideo, bgr24, 1280x720, 533183 kb/s, 24.11 fps, 24.11 tbr, 24.10 tbn, 24.10 tbc
       Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
    Output #0, wav, to 'output.wav':
     Metadata:
       ISFT            : Lavf58.25.100
       Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
    Stream mapping:
     Stream #0:1 -> #0:0 (copy)
    Press [q] to stop, [?] for help
    size=  192445kB time=00:18:37.12 bitrate=1411.2kbits/s speed=4.77x
    video:0kB audio:192445kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000040%
    bench: utime=1.188s stime=50.766s rtime=234.254s
    bench: maxrss=17468kB

    Using AviSynth :

    E:\>ffmpeg -i "soundout.avs" -map 0:a -c:a copy -y -benchmark "output.wav"
    ffmpeg version N-92936-ged3b64402e Copyright (c) 2000-2019 the FFmpeg developers
     built with gcc 8.2.1 (GCC) 20181201
     configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
     libavutil      56. 25.100 / 56. 25.100
     libavcodec     58. 43.100 / 58. 43.100
     libavformat    58. 25.100 / 58. 25.100
     libavdevice    58.  6.101 / 58.  6.101
     libavfilter     7. 47.100 /  7. 47.100
     libswscale      5.  4.100 /  5.  4.100
     libswresample   3.  4.100 /  3.  4.100
     libpostproc    55.  4.100 / 55.  4.100
    Guessed Channel Layout for Input Stream #0.1 : stereo
    Input #0, avisynth, from 'soundout.avs':
     Duration: 00:18:37.49, start: 0.000000, bitrate: N/A
       Stream #0:0: Video: rawvideo (BGR[24] / 0x18524742), bgr24, 1280x720, 24.11 fps, 24.11 tbr, 24.10 tbn, 24.10 tbc
       Stream #0:1: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
    Output #0, wav, to 'output.wav':
     Metadata:
       ISFT            : Lavf58.25.100
       Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
    Stream mapping:
     Stream #0:1 -> #0:0 (copy)
    Press [q] to stop, [?] for help
    size=  192445kB time=00:18:37.11 bitrate=1411.2kbits/s speed= 155x
    video:0kB audio:192445kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000040%
    bench: utime=0.234s stime=1.047s rtime=7.236s
    bench: maxrss=23792kB

    Edit : tests after "reencoding" AVI file :
    Onto something...
    Say my original file is f.avi. Here is ffprobe’s results :

    [avi @ 0x55a9c4b1e740] non-interleaved AVI
    Input #0, avi, from 'f.avi':
     Duration: 00:00:38.18, start: 0.000000, bitrate: 1104582 kb/s
       Stream #0:0: Video: rawvideo, bgr24, 1632x1200, 1104265 kb/s, 23.47 fps, 23.47 tbr, 23.47 tbn, 23.47 tbc
       Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 2 channels, s16, 1411 kb/s

    Extracting audio takes a long time.
    Now if I "reencode" the file in another AVI :

    ffmpeg -i f.avi -c copy f2.avi

    I can extract the audio from f2.avi in milliseconds !
    FFprobe on f2.avi :

    Input #0, avi, from 'f2.avi':
     Metadata:
       encoder         : Lavf57.56.101
     Duration: 00:00:38.18, start: 0.000000, bitrate: 1104456 kb/s
       Stream #0:0: Video: rawvideo, bgr24, 1632x1200, 1104265 kb/s, 23.47 fps, 23.47 tbr, 23.47 tbn, 23.47 tbc
       Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 2 channels, s16, 1411 kb/s

    It’s the same apart from the Metadata, which shouldn’t make a difference, but with this comparison I see the problem must have to do with the fact that the original is non-interleaved !
    I would assume it was easier to read and extract the audio from a non-interleaved file but maybe this is not conforming to AVI standards, hence the extra work needed ?