Recherche avancée

Médias (2)

Mot : - Tags -/doc2img

Autres articles (71)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

Sur d’autres sites (4243)

  • Latency and DAF in RTP transmissions

    24 février 2023, par jfernandz

    I'm trying to perform some tests for audio RTP transmissions to know their technical limitations. The idea is to prevent DAF effect in this kind of transmissions, I'm assuming a latency lower than 50ms will prevent it. But there is another handicap in my analysis, the RTP transmission must be over WiFi.

    


    For this tests I'm trying to transmit raw audio (not sure if skipping the encoding stage will improve latency) through ffmpeg between two different laptops, so I'm running ffmpeg in the first laptop (172.20.1.2) as :

    


    $ ffmpeg -f pulse -i 56 -c copy -f rtp rtp://172.20.1.5:10000

    


    which produces the following output :

    


    ffmpeg version n5.1.2 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 12.2.0 (GCC)
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librav1e --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-nvdec --enable-nvenc --enable-opencl --enable-opengl --enable-shared --enable-version3 --enable-vulkan
  libavutil      57. 28.100 / 57. 28.100
  libavcodec     59. 37.100 / 59. 37.100
  libavformat    59. 27.100 / 59. 27.100
  libavdevice    59.  7.100 / 59.  7.100
  libavfilter     8. 44.100 /  8. 44.100
  libswscale      6.  7.100 /  6.  7.100
  libswresample   4.  7.100 /  4.  7.100
  libpostproc    56.  6.100 / 56.  6.100
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, pulse, from '56':
  Duration: N/A, start: 1677234050.938677, bitrate: 1536 kb/s
  Stream #0:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Output #0, rtp, to 'rtp://172.20.1.5:10000':
  Metadata:
    encoder         : Lavf59.27.100
  Stream #0:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
SDP:
v=0
o=- 0 0 IN IP4 127.0.0.1
s=No Name
c=IN IP4 172.20.1.5
t=0 0
a=tool:libavformat LIBAVFORMAT_VERSION
m=audio 10000 RTP/AVP 97
b=AS:1536

Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
size=     322kB time=00:00:01.67 bitrate=1573.6kbits/s speed=1.06x


    


    I'm assuming the shown SDP is a valid one :

    


    v=0
o=- 0 0 IN IP4 127.0.0.1
s=No Name
c=IN IP4 172.20.1.5
t=0 0
a=tool:libavformat LIBAVFORMAT_VERSION
m=audio 10000 RTP/AVP 97
b=AS:1536


    


    So I saved it in a file called ccopy.sdp on the second laptop (172.20.1.5). However, when I run ffplay in this other laptop as :

    


    $ ffplay -protocol_whitelist file,rtp,udp -i ccopy.sdp

    


    I can see there is problems with this SDP :

    


    ffplay version n5.1.2 Copyright (c) 2003-2022 the FFmpeg developers
  built with gcc 12.2.0 (GCC)
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librav1e --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-nvdec --enable-nvenc --enable-opencl --enable-opengl --enable-shared --enable-version3 --enable-vulkan
  libavutil      57. 28.100 / 57. 28.100
  libavcodec     59. 37.100 / 59. 37.100
  libavformat    59. 27.100 / 59. 27.100
  libavdevice    59.  7.100 / 59.  7.100
  libavfilter     8. 44.100 /  8. 44.100
  libswscale      6.  7.100 /  6.  7.100
  libswresample   4.  7.100 /  4.  7.100
  libpostproc    56.  6.100 / 56.  6.100
[sdp @ 0x7f8eec000c80] Could not find codec parameters for stream 0 (Audio: none, 0 channels): unknown codec
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, sdp, from 'ccopy.sdp':
  Metadata:
    title           : No Name
  Duration: N/A, bitrate: N/A
  Stream #0:0: Audio: none, 0 channels
Failed to open file 'ccopy.sdp' or configure filtergraph
    nan    :  0.000 fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0   


    


    Not sure if I'm doing something wrong or this is because of I cannot actually use pcm_s16le for an RTP transmission. Moreover ... Is there some argument for ffmpeg that I can use to improve this RTP transmission and reduce latency under 50ms.

    


    Thank you all :-)

    


    PS : When I don't use -c copy argument for ffmpeg and therefore I have this SDP

    


    v=0
o=- 0 0 IN IP4 127.0.0.1
s=No Name
c=IN IP4 172.20.1.5
t=0 0
a=tool:libavformat LIBAVFORMAT_VERSION
m=audio 10000 RTP/AVP 97
b=AS:768
a=rtpmap:97 PCMU/48000/2


    


    The RTP transmission works as I expect, but with a significant DAF.

    


  • FFMPEG failed with RTSP running in docker

    9 août 2023, par SantiSori

    I'm trying to dockerize a simple application with node to stream the content of a RTSP camera through a websocker. To test I'm using the example : rtsp ://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4

    


    My code in node is as follows :

    


    VideoStream = require('rtsp-multi-stream')
streamer = new VideoStream.VideoStream({
  debug: true,
  wsPort: 9000,
  ffmpegPath: 'ffmpeg',
  ffmpegArgs: {
    '-b:v': '2048K',
    '-an': '',
    '-r': '24',
  },
});

setInterval(() => console.log([...streamer.liveMuxers.keys()]), 10000);


    


    When I run it locally, it works correctly :

    


    $ node ./rtsp.js
ffmpeg version 5.1.2-essentials_build-www.gyan.dev Copyright (c) 2000-2022 the F
Fmpeg developers
  built with gcc 12.1.0 (Rev2, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32thr
eads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --e
nable-libxml2 --enable-gmp --enable-lzma --enable-zlib --enable-libsrt --enable-
libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable
-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg
--enable-libvpx --enable-libass --enable-libfreetype --enable-libfribidi --enabl
e-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm -
-enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va
--enable-dxva2 --enable-libmfx --enable-libgme --enable-libopenmpt --enable-libo
pencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --e
nable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --ena
ble-libvorbis --enable-librubberband
  libavutil      57. 28.100 / 57. 28.100
  libavcodec     59. 37.100 / 59. 37.100
  libavformat    59. 27.100 / 59. 27.100
  libavdevice    59.  7.100 / 59.  7.100
  libavfilter     8. 44.100 /  8. 44.100
  libswscale      6.  7.100 /  6.  7.100
  libswresample   4.  7.100 /  4.  7.100
  libpostproc    56.  6.100 / 56.  6.100
prueba: New WebSocket Connection (1 total)
Input #0, rtsp, from 'rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_11
5k.mp4':
  Metadata:
    title           : BigBuckBunny_115k.mp4
  Duration: 00:10:34.63, start: 0.000000, bitrate: N/A
  Stream #0:0: Audio: aac (LC), 12000 Hz, stereo, fltp
  Stream #0:1: Video: h264 (High), yuv420p(progressive), 240x160 [SAR 32:27 DAR
16:9], 24 fps, 24.08 tbr, 90k tbn
Stream mapping:
  Stream #0:1 -> #0:0 (h264 (native) -> mpeg1video (native))
  Stream #0:0 -> #0:1 (aac (native) -> mp2 (native))
Press [q] to stop, [?] for help
[mpeg1video @ 00000217d19e8840] too many threads/slices (11), reducing to 10
Output #0, mpegts, to 'pipe:':
  Metadata:
    title           : BigBuckBunny_115k.mp4
    encoder         : Lavf59.27.100
  Stream #0:0: Video: mpeg1video, yuv420p(progressive), 240x160 [SAR 32:27 DAR 1
6:9], q=2-31, 200 kb/s, 30 fps, 90k tbn
    Metadata:
      encoder         : Lavc59.37.100 mpeg1video
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
  Stream #0:1: Audio: mp2, 16000 Hz, stereo, s16, 160 kb/s
    Metadata:
      encoder         : Lavc59.37.100 mp2
[mpegts @ 00000217d38c64c0] Non-monotonous DTS in output stream 0:1; previous: 3
774, current: 2576; changing to 3775. This may result in incorrect timestamps in
 the output file.
frame=    1 fps=0.0 q=0.0 size=       0kB time=00:00:00.60 bitrate=   0.0kbits/s
frame=   23 fps=0.0 q=2.8 size=      69kB time=00:00:01.46 bitrate= 384.0kbits/s
frame=   35 fps= 31 q=2.6 size=     104kB time=00:00:01.97 bitrate= 430.0kbits/s
frame=   48 fps= 30 q=2.3 size=     135kB time=00:00:02.47 bitrate= 446.3kbits/s
frame=   60 fps= 28 q=2.1 size=     168kB time=00:00:02.98 bitrate= 461.7kbits/s
frame=   72 fps= 27 q=2.0 size=     194kB time=00:00:03.48 bitrate= 454.9kbits/s


    


    Then I pass it to docker, for that I have the following dockerfile :

    


    FROM node:16-alpine

RUN apk update
RUN apk add
RUN apk add ffmpeg

RUN mkdir -p /home/node/app
WORKDIR /home/node/app
COPY . .

RUN npm install
CMD [ "node", "rtsp-multi.js" ]


    


    When I run docker I get the following errors :

    


    Socket connected /?url=rtsp%3A%2F%2Fwowzaec2demo.streamlock.net%2Fvod%2Fmp4%3ABigBuckBunny_115k.mp4
ffmpeg version 5.1.2 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 12.2.1 (Alpine 12.2.1_git20220924-r3) 20220924
  configuration: --prefix=/usr --enable-avfilter --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gnutls --enable-gpl --enable-libass --enable-libmp3lame --enable-libpulse --enable-libvorbis --enable-libvpx --enable-libxvid --enable-libx264 --enable-libx265 --enable-libtheora --enable-libv4l2 --enable-libdav1d --enable-lto --enable-postproc --enable-pic --enable-pthreads --enable-shared --enable-libxcb --enable-librist --enable-libsrt --enable-libssh --enable-libvidstab --disable-stripping --disable-static --disable-librtmp --disable-lzma --enable-libaom --enable-libopus --enable-libsoxr --enable-libwebp --enable-vaapi --enable-vdpau --enable-vulkan --enable-libdrm --enable-libzmq --optflags=-O2 --disable-debug --enable-libsvtav1
  libavutil      57. 28.100 / 57. 28.100
  libavcodec     59. 37.100 / 59. 37.100
  libavformat    59. 27.100 / 59. 27.100
  libavdevice    59.  7.100 / 59.  7.100
  libavfilter     8. 44.100 /  8. 44.100
  libswscale      6.  7.100 /  6.  7.100
  libswresample   4.  7.100 /  4.  7.100
  libpostproc    56.  6.100 / 56.  6.100
Error go live Timeout
[rtsp @ 0x7fdd7d811100] Could not find codec parameters for stream 1 (Video: h264, none, 240x160): unspecified pixel format
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, rtsp, from 'rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4':
  Metadata:
    title           : BigBuckBunny_115k.mp4
  Duration: 00:10:34.63, start: 0.000000, bitrate: N/A
  Stream #0:0: Audio: aac, 12000 Hz, stereo, fltp
  Stream #0:1: Video: h264, none, 240x160, 90k tbr, 90k tbn
Socket closed
Stream mapping:
  Stream #0:1 -> #0:0 (h264 (native) -> mpeg1video (native))
Press [q] to stop, [?] for help
Cannot determine format of input stream 0:1 after EOF
Error marking filters as finished
Exiting normally, received signal 15.


    


    I have tried to put as parameter to increase the analyzeduration and probesize inside ffmpegArgs but it doesn't seem to work. I have also tried with the node library node-rtsp-stream but it doesn't work either.

    


    I need to make it work inside docker but I am not able to, I have checked and on my PC and inside docker the versions of node and ffmpeg are the same. I have also checked with other old versions and the error is the same. I don't know what else to try, how can I make it work inside docker ?

    


  • ffmpeg mjpeg -> h.265 smeared color on output video file

    14 mars 2023, par BobtheMagicMoose

    I am converting some old mjpeg videos (stored in .avi container) to h.265 (.mp4 container) but am noticing the colors are smearing. Using the terminal command :

    


    ffmpeg -y -i "input-file.avi" -c:v libx265  -vtag hvc1 "output-file.mp4"

    


    I get the following image (notice how the red and blue are stretched donward). There is a lot of motion in the scene, but the motion is mostly horizontal :

    


    enter image description here

    


    Any idea what might cause this ? The detail and resolution seem fine, just the colors are being interpreted weirdly.

    


    Full output :

    


    ffmpeg version N-105859-g37480b1b85-20220305 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 11.2.0 (crosstool-NG 1.24.0.533_681aaef)
  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --disable-libpulse --enable-libvmaf --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librist --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --disable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp --extra-version=20220305
  libavutil      57. 22.100 / 57. 22.100
  libavcodec     59. 21.103 / 59. 21.103
  libavformat    59. 17.102 / 59. 17.102
  libavdevice    59.  5.100 / 59.  5.100
  libavfilter     8. 27.100 /  8. 27.100
  libswscale      6.  5.100 /  6.  5.100
  libswresample   4.  4.100 /  4.  4.100
  libpostproc    56.  4.100 / 56.  4.100
Guessed Channel Layout for Input Stream #0.1 : mono
Input #0, avi, from 'E:\PATH\MVI_0168.AVI':
  Metadata:
    creation_time   : 2006-06-14 21:42:10
    software        : CanonMVI02
  Duration: 00:00:53.47, start: 0.000000, bitrate: 5203 kb/s
  Stream #0:0: Video: mjpeg (Baseline) (MJPG / 0x47504A4D), yuvj422p(pc, bt470bg/unknown/unknown), 320x240, 5111 kb/s, 30 fps, 30 tbr, 30 tbn
  Stream #0:1: Audio: pcm_u8 ([1][0][0][0] / 0x0001), 11024 Hz, mono, u8, 88 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (mjpeg (native) -> hevc (libx265))
  Stream #0:1 -> #0:1 (pcm_u8 (native) -> aac (native))
Press [q] to stop, [?] for help
[aac @ 000001a7ad1aab00] Too many bits 6408.707483 > 6144 per frame requested, clamping to max
x265 [info]: HEVC encoder version 3.5+34-7a5709048
x265 [info]: build info [Windows][GCC 11.2.0][64 bit] 8bit+10bit+12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x265 [info]: Main profile, Level-2 (Main tier)
x265 [info]: Thread pool created using 12 threads
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 3 / wpp(4 rows)
x265 [warning]: Source height < 720p; disabling lookahead-slices
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge         : hex / 57 / 2 / 3
x265 [info]: Keyframe min / max / scenecut / bias  : 25 / 250 / 40 / 5.00
x265 [info]: Lookahead / bframes / badapt        : 20 / 4 / 2
x265 [info]: b-pyramid / weightp / weightb       : 1 / 1 / 0
x265 [info]: References / ref-limit  cu / depth  : 3 / off / on
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 2 / 1.0 / 32 / 1
x265 [info]: Rate Control / qCompress            : CRF-28.0 / 0.60
x265 [info]: tools: rd=3 psy-rd=2.00 early-skip rskip mode=1 signhide tmvp
x265 [info]: tools: b-intra strong-intra-smoothing deblock sao
Output #0, mp4, to 'C:\PATH\test.mp4':
  Metadata:
    software        : CanonMVI02
    encoder         : Lavf59.17.102
  Stream #0:0: Video: hevc (hev1 / 0x31766568), yuvj422p(pc, bt470bg/unknown/unknown, progressive), 320x240, q=2-31, 30 fps, 1000k tbn
    Metadata:
      encoder         : Lavc59.21.103 libx265
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
  Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 11025 Hz, mono, fltp, 66 kb/s
    Metadata:
      encoder         : Lavc59.21.103 aac
frame= 1604 fps=187 q=35.9 Lsize=    1818kB time=00:00:53.49 bitrate= 278.4kbits/s speed=6.23x
video:1438kB audio:348kB subtitle:0kB other streams:0kB global headers:2kB muxing overhead: 1.811161%
x265 [info]: frame I:      9, Avg QP:28.81  kb/s: 1309.05
x265 [info]: frame P:    361, Avg QP:30.64  kb/s: 599.75
x265 [info]: frame B:   1234, Avg QP:35.12  kb/s: 100.04
x265 [info]: Weighted P-Frames: Y:2.2% UV:1.9%
x265 [info]: consecutive B-frames: 2.7% 1.6% 5.1% 40.5% 50.0%

encoded 1604 frames in 8.57s (187.25 fps), 219.29 kb/s, Avg QP:34.08
[aac @ 000001a7ad1aab00] Qavg: 64427.340