
Recherche avancée
Médias (2)
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (43)
-
Use, discuss, criticize
13 avril 2011, parTalk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
A discussion list is available for all exchanges between users. -
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
-
Les statuts des instances de mutualisation
13 mars 2010, parPour des raisons de compatibilité générale du plugin de gestion de mutualisations avec les fonctions originales de SPIP, les statuts des instances sont les mêmes que pour tout autre objets (articles...), seuls leurs noms dans l’interface change quelque peu.
Les différents statuts possibles sont : prepa (demandé) qui correspond à une instance demandée par un utilisateur. Si le site a déjà été créé par le passé, il est passé en mode désactivé. publie (validé) qui correspond à une instance validée par un (...)
Sur d’autres sites (8882)
-
NumPy array of a video changes from the original after writing into the same video
29 mars 2021, par RashiqI have a video (
test.mkv
) that I have converted into a 4D NumPy array - (frame, height, width, color_channel). I have even managed to convert that array back into the same video (test_2.mkv
) without altering anything. However, after reading this new,test_2.mkv
, back into a new NumPy array, the array of the first video is different from the second video's array i.e. their hashes don't match and thenumpy.array_equal()
function returns false. I have tried using both python-ffmpeg and scikit-video but cannot get the arrays to match.

Python-ffmpeg attempt :


import ffmpeg
import numpy as np
import hashlib

file_name = 'test.mkv'

# Get video dimensions and framerate
probe = ffmpeg.probe(file_name)
video_stream = next((stream for stream in probe['streams'] if stream['codec_type'] == 'video'), None)
width = int(video_stream['width'])
height = int(video_stream['height'])
frame_rate = video_stream['avg_frame_rate']

# Read video into buffer
out, error = (
 ffmpeg
 .input(file_name, threads=120)
 .output("pipe:", format='rawvideo', pix_fmt='rgb24')
 .run(capture_stdout=True)
)

# Convert video buffer to array
video = (
 np
 .frombuffer(out, np.uint8)
 .reshape([-1, height, width, 3])
)

# Convert array to buffer
video_buffer = (
 np.ndarray
 .flatten(video)
 .tobytes()
)

# Write buffer back into a video
process = (
 ffmpeg
 .input('pipe:', format='rawvideo', s='{}x{}'.format(width, height))
 .output("test_2.mkv", r=frame_rate)
 .overwrite_output()
 .run_async(pipe_stdin=True)
)
process.communicate(input=video_buffer)

# Read the newly written video
out_2, error = (
 ffmpeg
 .input("test_2.mkv", threads=40)
 .output("pipe:", format='rawvideo', pix_fmt='rgb24')
 .run(capture_stdout=True)
)

# Convert new video into array
video_2 = (
 np
 .frombuffer(out_2, np.uint8)
 .reshape([-1, height, width, 3])
)

# Video dimesions change
print(f'{video.shape} vs {video_2.shape}') # (844, 1080, 608, 3) vs (2025, 1080, 608, 3)
print(f'{np.array_equal(video, video_2)}') # False

# Hashes don't match
print(hashlib.sha256(bytes(video_2)).digest()) # b'\x88\x00\xc8\x0ed\x84!\x01\x9e\x08 \xd0U\x9a(\x02\x0b-\xeeA\xecU\xf7\xad0xa\x9e\\\xbck\xc3'
print(hashlib.sha256(bytes(video)).digest()) # b'\x9d\xc1\x07xh\x1b\x04I\xed\x906\xe57\xba\xf3\xf1k\x08\xfa\xf1\xfaM\x9a\xcf\xa9\t8\xf0\xc9\t\xa9\xb7'



Scikit-video attempt :


import skvideo.io as sk
import numpy as np

video_data = sk.vread('test.mkv')

sk.vwrite('test_2_ski.mkv', video_data)

video_data_2 = sk.vread('test_2_ski.mkv')

# Dimensions match but...
print(video_data.shape) # (844, 1080, 608, 3)
print(video_data_2.shape) # (844, 1080, 608, 3)

# ...array elements don't
print(np.array_equal(video_data, video_data_2)) # False

# Hashes don't match either
print(hashlib.sha256(bytes(video_2)).digest()) # b'\x8b?]\x8epD:\xd9B\x14\xc7\xba\xect\x15G\xfaRP\xde\xad&EC\x15\xc3\x07\n{a[\x80'
print(hashlib.sha256(bytes(video)).digest()) # b'\x9d\xc1\x07xh\x1b\x04I\xed\x906\xe57\xba\xf3\xf1k\x08\xfa\xf1\xfaM\x9a\xcf\xa9\t8\xf0\xc9\t\xa9\xb7'



I don't understand where I'm going wrong and both the respective documentations do not highlight how to do this particular task. Any help is appreciated. Thank you.


-
FFMpeg with PHP-7.0 on Ubuntu
25 octobre 2018, par Gabriel Bueno Lemes da SilvaI have a NGINX server with PHP-7.0 and I would like to install the ffmpeg-php extension. I’ve been trying for a few days now and in many ways.
The method that worked so far was compiling ffmpeg (https://ffmpeg.org/releases/ffmpeg-4.0.2.tar.bz2) manually, but when trying to compile ffmpeg-php (https: // sourceforge. net / projects / ffmpeg-php / files / ffmpeg-php / 0.6.0 / ffmpeg-php-0.6.0.tbz2 / download) I am encountering the following error message :
root@zumbiserver-mercury : /php7-ffmpeg# make /bin/bash
/root/php7-ffmpeg/libtool —mode=compile cc -I. -I/root/php7-ffmpeg
-DPHP_ATOM_INC -I/root/php7-ffmpeg/include -I/root/php7-ffmpeg/main -I/root/php7-ffmpeg -I/usr/include/php/20151012 -I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM -I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext -I/usr/include/php/20151012/ext/date/lib -I/usr/local/include/libavcodec/ -I/usr/local/include/libavformat/ -I/usr/local/include/libavutil/ -I/usr/local/include/libswscale/ -I/usr/local/include/libavfilter/ -I/usr/local/include/libavdevice/ -DHAVE_CONFIG_H -g -O2 -Wall -fno-strict-aliasing -c /root/php7-ffmpeg/ffmpeg-php.c -o ffmpeg-php.lo libtool : compile : cc
-I. -I/root/php7-ffmpeg -DPHP_ATOM_INC -I/root/php7-ffmpeg/include -I/root/php7-ffmpeg/main -I/root/php7-ffmpeg -I/usr/include/php/20151012 -I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM -I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext -I/usr/include/php/20151012/ext/date/lib -I/usr/local/include/libavcodec/ -I/usr/local/include/libavformat/ -I/usr/local/include/libavutil/ -I/usr/local/include/libswscale/ -I/usr/local/include/libavfilter/ -I/usr/local/include/libavdevice/ -DHAVE_CONFIG_H -g -O2 -Wall -fno-strict-aliasing -c /root/php7-ffmpeg/ffmpeg-php.c -fPIC -DPIC -o .libs/ffmpeg-php.o In
file included from /usr/include/x86_64-linux-gnu/sys/stat.h:104:0,
from /usr/include/php/20151012/Zend/zend_stream.h:28,
from /usr/include/php/20151012/Zend/zend.h:41,
from /usr/include/php/20151012/main/php.h:36,
from /root/php7-ffmpeg/ffmpeg-php.c:40 : /usr/include/x86_64-linux-gnu/bits/stat.h:91:21 : error : field
‘st_atim’ has incomplete type
struct timespec st_atim ; /* Time of last access. /
^ /usr/include/x86_64-linux-gnu/bits/stat.h:92:21 : error : field
‘st_mtim’ has incomplete type
struct timespec st_mtim ; / Time of last modification. /
^ /usr/include/x86_64-linux-gnu/bits/stat.h:93:21 : error : field
‘st_ctim’ has incomplete type
struct timespec st_ctim ; / Time of last status change. /
^ /usr/include/x86_64-linux-gnu/bits/stat.h:152:21 : error : field
‘st_atim’ has incomplete type
struct timespec st_atim ; / Time of last access. /
^ /usr/include/x86_64-linux-gnu/bits/stat.h:153:21 : error : field
‘st_mtim’ has incomplete type
struct timespec st_mtim ; / Time of last modification. /
^ /usr/include/x86_64-linux-gnu/bits/stat.h:154:21 : error : field
‘st_ctim’ has incomplete type
struct timespec st_ctim ; / Time of last status change. /
^ In file included from /usr/include/php/20151012/Zend/zend_stream.h:28:0,
from /usr/include/php/20151012/Zend/zend.h:41,
from /usr/include/php/20151012/main/php.h:36,
from /root/php7-ffmpeg/ffmpeg-php.c:40 : /usr/include/x86_64-linux-gnu/sys/stat.h:364:31 : error : array type has
incomplete element type ‘struct timespec’
const struct timespec __times[2],
^ /usr/include/x86_64-linux-gnu/sys/stat.h:371:54 : error : array type has
incomplete element type ‘struct timespec’ extern int futimens (int
__fd, const struct timespec __times[2]) __THROW ;
^ In file included from /usr/include/php/20151012/main/php.h:395:0,
from /root/php7-ffmpeg/ffmpeg-php.c:40 : /usr/include/php/20151012/Zend/zend_virtual_cwd.h:218:2 : error :
unknown type name ‘time_t’ time_t expires ;
^ /usr/include/php/20151012/Zend/zend_virtual_cwd.h:248:86 : error :
unknown type name ‘time_t’ CWD_API realpath_cache_bucket
realpath_cache_lookup(const char *path, int path_len, time_t t) ;
^ /root/php7-ffmpeg/ffmpeg-php.c : In function ‘zm_startup_ffmpeg’ :
/root/php7-ffmpeg/ffmpeg-php.c:108:5 : warning : implicit declaration of
function ‘avcodec_init’ [-Wimplicit-function-declaration]
avcodec_init() ;
^ /root/php7-ffmpeg/ffmpeg-php.c:111:5 : warning : ‘av_register_all’ is deprecated [-Wdeprecated-declarations]
av_register_all() ;
^ In file included from /root/php7-ffmpeg/ffmpeg-php.c:43:0 : /usr/local/include/libavformat/avformat.h:2025:6 : note : declared here
void av_register_all(void) ;^ Makefile:194: recipe for target 'ffmpeg-php.lo' failed make: *** [ffmpeg-php.lo] Error 1
Can someone give me a light ? I do not know what else to do !
-
Multicast video stream from Dahua IP surveillance camera - ffmpeg etc [closed]
23 mai, par Jaroslav MazurakI have a Dahua IP surveillance camera and want to get the video via a multicast stream.


In the camera settings, I enabled Multicast streaming, IP 239.240.1.2, and port 40000 (the default). The RTSP port is 554 (the default).


Neither VLC 3.0.21 nor ffmpeg 7.1.1 work when I try to use multicast. Both of them work when I use a unicast. OS is Windows 11 x64. Both applications are allowed in the Windows firewall (any protocol, all networks ; same result if the firewall is disabled completely). I have Wireshark installed, and I see that when a client requests the stream via RTSP, the multicast traffic from the camera is present ; ffmpeg determines the stream but doesn't capture any video, and the output file is empty (it contains only the header and no video). When I use unicast, the correct output video file is saved.


I have no idea what I'm doing wrong, and why ffmpeg (and VLC) doesn't capture anything in the multicast mode.


Here are the ffmpeg logs for multicast and unicast modes.


Multicast :


ffmpeg -fflags nobuffer -flags low_delay -timeout 10M -stats -rtsp_transport udp_multicast -i "rtsp://user:password@10.10.10.10:554/cam/realmonitor?channel=1&subtype=0&unicast=false" -acodec copy -vcodec copy -y output.mkv

ffmpeg version 7.1.1-full_build-www.gyan.dev Copyright (c) 2000-2025 the FFmpeg developers
 built with gcc 14.2.0 (Rev1, Built by MSYS2 projffmpeg -fflags nobuffer -flags low_delay -timeout 10M -stats -i "rtsp://user:password@10.10.10.10:554/cam/realmonitor?channel=1&subtype=0" -acodec copy -vcodec copy -y output.mkv

ffmpeg version 7.1.1-full_build-www.gyan.dev Copyright (c) 2000-2025 the FFmpeg developers
 built with gcc 14.2.0 (Rev1, Built by MSYS2 project)
 configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-lcms2 --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-libdvdnav --enable-libdvdread --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libopenjpeg --enable-libquirc --enable-libuavs3d --enable-libxevd --enable-libzvbi --enable-libqrencode --enable-librav1e --enable-libsvtav1 --enable-libvvenc --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxeve --enable-libxvid --enable-libaom --enable-libjxl --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-dxva2 --enable-d3d11va --enable-d3d12va --enable-ffnvcodec --enable-libvpl --enable-nvdec --enable-nvenc --enable-vaapi --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-liblc3 --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
 libavutil 59. 39.100 / 59. 39.100
 libavcodec 61. 19.101 / 61. 19.101
 libavformat 61. 7.100 / 61. 7.100
 libavdevice 61. 3.100 / 61. 3.100
 libavfilter 10. 4.100 / 10. 4.100
 libswscale 8. 3.100 / 8. 3.100
 libswresample 5. 3.100 / 5. 3.100
 libpostproc 58. 3.100 / 58. 3.100
Input #0, rtsp, from 'rtsp://user:password@10.10.10.10:554/cam/realmonitor?channel=1&subtype=0':
 Metadata:
 title : Media Server
 Duration: N/A, start: 0.000000, bitrate: N/A
 Stream #0:0: Video: hevc (Main), yuv420p(tv), 2560x1440, 25 fps, 25 tbr, 90k tbn
Stream mapping:
 Stream #0:0 -> #0:0 (copy)
Output #0, matroska, to 'output.mkv':
 Metadata:
 title : Media Server
 encoder : Lavf61.7.100
 Stream #0:0: Video: hevc (Main), yuv420p(tv), 2560x1440, q=2-31, 25 fps, 25 tbr, 1k tbn
Press [q] to stop, [?] for help
frame= 0 fps=0.0 q=-1.0 size= 0KiB time=00:00:01.32 bitrate= 0.0kbits/s speed= 2.6x 
frame= 0 fps=0.0 q=-1.0 size= 0KiB time=00:00:01.84 bitrate= 0.0kbits/s speed=1.81x 
frame= 10 fps=6.5 q=-1.0 size= 1KiB time=00:00:02.36 bitrate= 2.2kbits/s speed=1.53x 
frame= 23 fps= 11 q=-1.0 size= 1KiB time=00:00:02.88 bitrate= 1.8kbits/s speed= 1.4x 
frame= 36 fps= 14 q=-1.0 size= 1KiB time=00:00:03.40 bitrate= 1.5kbits/s speed=1.33x 
frame= 49 fps= 16 q=-1.0 size= 1KiB time=00:00:03.92 bitrate= 1.3kbits/s speed=1.27x 
frame= 62 fps= 17 q=-1.0 size= 256KiB time=00:00:04.44 bitrate= 472.3kbits/s speed=1.23x 
frame= 75 fps= 18 q=-1.0 size= 256KiB time=00:00:04.96 bitrate= 422.8kbits/s speed= 1.2x 
frame= 88 fps= 19 q=-1.0 size= 256KiB time=00:00:05.48 bitrate= 382.7kbits/s speed=1.18x 
frame= 100 fps= 19 q=-1.0 size= 256KiB time=00:00:05.96 bitrate= 351.9kbits/s speed=1.16x 
frame= 113 fps= 20 q=-1.0 size= 768KiB time=00:00:06.48 bitrate= 970.9kbits/s speed=1.14x 
frame= 126 fps= 20 q=-1.0 size= 768KiB time=00:00:07.00 bitrate= 898.8kbits/s speed=1.13x 
frame= 139 fps= 21 q=-1.0 size= 768KiB time=00:00:07.52 bitrate= 836.6kbits/s speed=1.12x 
frame= 152 fps= 21 q=-1.0 size= 1280KiB time=00:00:08.04 bitrate=1304.2kbits/s speed=1.11x 
frame= 165 fps= 21 q=-1.0 size= 1280KiB time=00:00:08.56 bitrate=1225.0kbits/s speed=1.11x 
frame= 178 fps= 22 q=-1.0 size= 1280KiB time=00:00:09.08 bitrate=1154.8kbits/s speed= 1.1x 
frame= 191 fps= 22 q=-1.0 size= 1280KiB time=00:00:09.60 bitrate=1092.3kbits/s speed= 1.1x 
frame= 203 fps= 22 q=-1.0 size= 1792KiB time=00:00:10.08 bitrate=1456.4kbits/s speed=1.09x 
frame= 217 fps= 22 q=-1.0 size= 1792KiB time=00:00:10.64 bitrate=1379.7kbits/s speed=1.09x 


[q] command received. Exiting.

[out#0/matroska @ 000001e0329cad80] video:2377KiB audio:0KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 0.100389%
frame= 230 fps= 22 q=-1.0 Lsize= 2380KiB time=00:00:11.16 bitrate=1746.9kbits/s speed=1.08x 
ect)
 configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-lcms2 --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-libdvdnav --enable-libdvdread --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libopenjpeg --enable-libquirc --enable-libuavs3d --enable-libxevd --enable-libzvbi --enable-libqrencode --enable-librav1e --enable-libsvtav1 --enable-libvvenc --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxeve --enable-libxvid --enable-libaom --enable-libjxl --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-dxva2 --enable-d3d11va --enable-d3d12va --enable-ffnvcodec --enable-libvpl --enable-nvdec --enable-nvenc --enable-vaapi --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-liblc3 --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
 libavutil 59. 39.100 / 59. 39.100
 libavcodec 61. 19.101 / 61. 19.101
 libavformat 61. 7.100 / 61. 7.100
 libavdevice 61. 3.100 / 61. 3.100
 libavfilter 10. 4.100 / 10. 4.100
 libswscale 8. 3.100 / 8. 3.100
 libswresample 5. 3.100 / 5. 3.100
 libpostproc 58. 3.100 / 58. 3.100
Input #0, rtsp, from 'rtsp://user:password@10.10.10.10:554/cam/realmonitor?channel=1&subtype=0&unicast=false':
 Metadata:
 title : Media Server
 Duration: N/A, bitrate: N/A
 Stream #0:0: Video: hevc (Main), yuv420p(tv), 2560x1440, 25 tbr, 90k tbn
Stream mapping:
 Stream #0:0 -> #0:0 (copy)
Output #0, matroska, to 'output.mkv':
 Metadata:
 title : Media Server
 encoder : Lavf61.7.100
 Stream #0:0: Video: hevc (Main), yuv420p(tv), 2560x1440, q=2-31, 25 tbr, 1k tbn
Press [q] to stop, [?] for help
frame= 0 fps=0.0 q=-1.0 size= 0KiB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=-1.0 size= 0KiB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=-1.0 size= 0KiB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=-1.0 size= 0KiB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=-1.0 size= 0KiB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=-1.0 size= 0KiB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=-1.0 size= 0KiB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=-1.0 size= 0KiB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=-1.0 size= 0KiB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=-1.0 size= 0KiB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=-1.0 size= 0KiB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=-1.0 size= 0KiB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=-1.0 size= 0KiB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=-1.0 size= 0KiB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=-1.0 size= 0KiB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=-1.0 size= 0KiB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=-1.0 size= 0KiB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=-1.0 size= 0KiB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=-1.0 size= 0KiB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=-1.0 size= 0KiB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=-1.0 size= 0KiB time=N/A bitrate=N/A speed=N/A 
[in#0/rtsp @ 0000014b1a80a580] Error during demuxing: Error number -138 occurred
[out#0/matroska @ 0000014b1a7ee700] video:0KiB audio:0KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: unknown
[out#0/matroska @ 0000014b1a7ee700] Output file is empty, nothing was encoded
frame= 0 fps=0.0 q=-1.0 Lsize= 1KiB time=N/A bitrate=N/A speed=N/A 



Unicast :


ffmpeg -fflags nobuffer -flags low_delay -timeout 10M -stats -i "rtsp://user:password@10.10.10.10:554/cam/realmonitor?channel=1&subtype=0" -acodec copy -vcodec copy -y output.mkv

ffmpeg version 7.1.1-full_build-www.gyan.dev Copyright (c) 2000-2025 the FFmpeg developers
 built with gcc 14.2.0 (Rev1, Built by MSYS2 project)
 configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-lcms2 --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-libdvdnav --enable-libdvdread --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libopenjpeg --enable-libquirc --enable-libuavs3d --enable-libxevd --enable-libzvbi --enable-libqrencode --enable-librav1e --enable-libsvtav1 --enable-libvvenc --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxeve --enable-libxvid --enable-libaom --enable-libjxl --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-dxva2 --enable-d3d11va --enable-d3d12va --enable-ffnvcodec --enable-libvpl --enable-nvdec --enable-nvenc --enable-vaapi --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-liblc3 --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
 libavutil 59. 39.100 / 59. 39.100
 libavcodec 61. 19.101 / 61. 19.101
 libavformat 61. 7.100 / 61. 7.100
 libavdevice 61. 3.100 / 61. 3.100
 libavfilter 10. 4.100 / 10. 4.100
 libswscale 8. 3.100 / 8. 3.100
 libswresample 5. 3.100 / 5. 3.100
 libpostproc 58. 3.100 / 58. 3.100
Input #0, rtsp, from 'rtsp://user:password@10.10.10.10:554/cam/realmonitor?channel=1&subtype=0':
 Metadata:
 title : Media Server
 Duration: N/A, start: 0.000000, bitrate: N/A
 Stream #0:0: Video: hevc (Main), yuv420p(tv), 2560x1440, 25 fps, 25 tbr, 90k tbn
Stream mapping:
 Stream #0:0 -> #0:0 (copy)
Output #0, matroska, to 'output.mkv':
 Metadata:
 title : Media Server
 encoder : Lavf61.7.100
 Stream #0:0: Video: hevc (Main), yuv420p(tv), 2560x1440, q=2-31, 25 fps, 25 tbr, 1k tbn
Press [q] to stop, [?] for help
frame= 0 fps=0.0 q=-1.0 size= 0KiB time=00:00:01.32 bitrate= 0.0kbits/s speed= 2.6x 
frame= 0 fps=0.0 q=-1.0 size= 0KiB time=00:00:01.84 bitrate= 0.0kbits/s speed=1.81x 
frame= 10 fps=6.5 q=-1.0 size= 1KiB time=00:00:02.36 bitrate= 2.2kbits/s speed=1.53x 
frame= 23 fps= 11 q=-1.0 size= 1KiB time=00:00:02.88 bitrate= 1.8kbits/s speed= 1.4x 
frame= 36 fps= 14 q=-1.0 size= 1KiB time=00:00:03.40 bitrate= 1.5kbits/s speed=1.33x 
frame= 49 fps= 16 q=-1.0 size= 1KiB time=00:00:03.92 bitrate= 1.3kbits/s speed=1.27x 
frame= 62 fps= 17 q=-1.0 size= 256KiB time=00:00:04.44 bitrate= 472.3kbits/s speed=1.23x 
frame= 75 fps= 18 q=-1.0 size= 256KiB time=00:00:04.96 bitrate= 422.8kbits/s speed= 1.2x 
frame= 88 fps= 19 q=-1.0 size= 256KiB time=00:00:05.48 bitrate= 382.7kbits/s speed=1.18x 
frame= 100 fps= 19 q=-1.0 size= 256KiB time=00:00:05.96 bitrate= 351.9kbits/s speed=1.16x 
frame= 113 fps= 20 q=-1.0 size= 768KiB time=00:00:06.48 bitrate= 970.9kbits/s speed=1.14x 
frame= 126 fps= 20 q=-1.0 size= 768KiB time=00:00:07.00 bitrate= 898.8kbits/s speed=1.13x 
frame= 139 fps= 21 q=-1.0 size= 768KiB time=00:00:07.52 bitrate= 836.6kbits/s speed=1.12x 
frame= 152 fps= 21 q=-1.0 size= 1280KiB time=00:00:08.04 bitrate=1304.2kbits/s speed=1.11x 
frame= 165 fps= 21 q=-1.0 size= 1280KiB time=00:00:08.56 bitrate=1225.0kbits/s speed=1.11x 
frame= 178 fps= 22 q=-1.0 size= 1280KiB time=00:00:09.08 bitrate=1154.8kbits/s speed= 1.1x 
frame= 191 fps= 22 q=-1.0 size= 1280KiB time=00:00:09.60 bitrate=1092.3kbits/s speed= 1.1x 
frame= 203 fps= 22 q=-1.0 size= 1792KiB time=00:00:10.08 bitrate=1456.4kbits/s speed=1.09x 
frame= 217 fps= 22 q=-1.0 size= 1792KiB time=00:00:10.64 bitrate=1379.7kbits/s speed=1.09x 


[q] command received. Exiting.

[out#0/matroska @ 000001e0329cad80] video:2377KiB audio:0KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 0.100389%
frame= 230 fps= 22 q=-1.0 Lsize= 2380KiB time=00:00:11.16 bitrate=1746.9kbits/s speed=1.08x