Recherche avancée

Médias (91)

Autres articles (90)

  • 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 ;

  • 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 ) (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (4883)

  • Ffmpeg conversion from RTSP to RTMP stops transmitting video in a Odroid C4 device

    14 mars 2023, par JuanN

    We hace a video camera (transmitting using RTSP) connected to an Odroid C4. We want to send the streaming to a OvenMediaEngine using RTMP. For us to achieve this goal, we run this command :

    


    ffmpeg -rtsp_transport tcp -nostdin -i "rtsp://admin:xxxxxx@aaa.aaa.a.aaa:ppp//h264Preview_01_sub" -threads 1 -cod
ec copy -f flv -flvflags no_duration_filesize -an "rtmp://xxxxx.xxxx.xx:pppp/xxxxxxx"


    


    Apparently the transmition is fine but, after a while (this "while" ranges from a few hours to a few days) the ffmpeg command stops working, with the following message [rtsp @ 0x55a46347b0] CSeq 3005 expected :

    


    ffmpeg version 4.2.7-0ubuntu0.1 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
  configuration: --prefix=/usr --extra-version=0ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/aarch64-linux-gnu --incdir=/usr/include/aarch64-linux-gnu --arch=arm64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Input #0, rtsp, from 'rtsp://admin:xxxxxx@aaa.aaa.a.aaa:ppp//h264Preview_01_sub':
  Metadata:
    title           : Session streamed by "preview"
    comment         : h264Preview_01_sub
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: h264 (High), yuv420p(progressive), 640x360, 25 tbr, 90k tbn, 180k tbc
    Stream #0:1: Audio: aac (LC), 16000 Hz, mono, fltp
Output #0, flv, to 'rtmp://xxxxx.xxxx.xx:pppp/xxxxxxx':
  Metadata:
    title           : Session streamed by "preview"
    comment         : h264Preview_01_sub
    encoder         : Lavf58.29.100
    Stream #0:0: Video: h264 (High) ([7][0][0][0] / 0x0007), yuv420p(progressive), 640x360, q=2-31, 25 tbr, 1k tbn, 90k tbc
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
[flv @ 0x55a463c220] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[rtsp @ 0x55a46347b0] CSeq 3005 expected, 0 received.1:25.81 bitrate= 207.3kbits/s speed=   1x
    Last message repeated 1 times


    


    We thought at first this was due to the limitation of ffmpeg when it is run on background (that's the reason for the nostdin option), but it keeps on failing. Looking online, we also found that it could be some issue of the file size (hence the no_duration_filesize option).

    


    The weird part is the process is still running (if you check it using a top or ps command) when it fails, but it has to be rebooted to resume the transmision.

    


    Any clues will be most welcome !
Thank you.

    


  • 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


    


  • 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 ?