
Recherche avancée
Autres articles (63)
-
La sauvegarde automatique de canaux SPIP
1er avril 2010, parDans 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 (...) -
Script d’installation automatique de MediaSPIP
25 avril 2011, parAfin 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 (...) -
Automated installation script of MediaSPIP
25 avril 2011, parTo overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
The documentation of the use of this installation script is available here.
The code of this (...)
Sur d’autres sites (8818)
-
Same FFmpeg command produces different Matroska MKV output file checksum [closed]
13 avril 2024, par finefootThe following exemplary FFmpeg command takes an MP4 file, doesn't do any re-encoding, but simply writes the output to an MKV file :


ffmpeg -i input.mp4 -c copy output.mkv



If I run the same command twice, with two different output files :


ffmpeg -i input.mp4 -c copy output1.mkv
ffmpeg -i input.mp4 -c copy output2.mkv



The resulting files will have differing checksums :


aa46d308197cb08d71f271c61d5412ad output1.mkv
8b48c3ebdbf2384705fcb78e864d12e3 output2.mkv



This difference disappears if I convert them back to an MP4 container :


ffmpeg -i output1.mkv -c copy output1.mp4
ffmpeg -i output2.mkv -c copy output2.mp4



For differing MKV input files I'm getting the same checksum for the MP4 output files :


24e92b3e228db780b5feab14255870e3 output1.mp4
24e92b3e228db780b5feab14255870e3 output2.mp4



So obviously the video itself hasn't been modified and there's some metadata in the MKV container that's responsible. What data is it and how do I prevent this data from being added ?


-
ffmpeg have unmet dependencies (Ubuntu20) [closed]
10 août 2024, par mojiangwhen installing ffmpeg with ubuntu20(fosal), it have conflict dependencies :


# sudo apt-get install ffmpeg
Reading package lists... Done
Building dependency tree 
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 ffmpeg : Depends: libavdevice58 (= 7:4.2.7-0ubuntu0.1) but it is not going to be installed
 Depends: libavfilter7 (= 7:4.2.7-0ubuntu0.1)
 Depends: libavformat58 (= 7:4.2.7-0ubuntu0.1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.



I solved it by install the reason of conflit library with a specific version, may be someone will need the solution.


step 1. fix-broken


sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree 
Reading state information... Done



step2. find the reason of unmet dependencies :


# sudo apt install libavdevice58=7:4.2.7-0ubuntu0.1 libavfilter7=7:4.2.7-0ubuntu0.1 libavformat58=7:4.2.7-0ubuntu0.1
Reading package lists... Done
Building dependency tree 
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libavformat58 : Depends: libchromaprint1 (>= 1.3.2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.



Here the problem is from libchromaprint1


step3. find candidate versions of libchromaprint1(conflict reason)


# apt-cache policy libchromaprint1
libchromaprint1:
 Installed: (none)
 Candidate: 1.5.1-1~20.04.sav0
 Version table:
 1.5.1-1~20.04.sav0 500
 500 http://ppa.launchpad.net/savoury1/multimedia/ubuntu focal/main amd64 Packages
 1.4.3-3build1 500
 500 http://mirrors.cloud.aliyuncs.com/ubuntu focal/universe amd64 Packages
 500 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages



step4. install the old version of libchromaprint1 to solve the conflicts


# sudo apt install libchromaprint1=1.4.3-3build1
Reading package lists... Done
Building dependency tree 
Reading state information... Done
The following NEW packages will be installed:
 libchromaprint1
0 upgraded, 1 newly installed, 0 to remove and 223 not upgraded.
Need to get 37.6 kB of archives.



step5. reinstall ffmpeg


# sudo apt install ffmpeg
Reading package lists... Done
Building dependency tree 
Reading state information... Done



Done. the reason of conflict is that the latest version of libraries have conflict, by install old version of the conflicted ones to solve it.


-
ffmpeg streaming UDP port is closed [closed]
26 décembre 2023, par BrilliantContractI'm trying to use ffmpeg in order to transcode RTSP stream from CCTV to HLS stream so it could be accessed through a web server.


ffmpeg used to stream video from CCTV with following command


$ ffmpeg -i "rtsp://cam-1.loc:554?user=admin&password=admin&channel=1&stream=0" -hls_time 3 -hls_wrap 10 -f mpegts udp://localhost:6601
ffmpeg version 4.2.8 Copyright (c) 2000-2022 the FFmpeg developers
 built with gcc 8 (GCC)
 configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --docdir=/usr/share/doc/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' --extra-ldflags='-Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld ' --extra-cflags=' ' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --disable-crystalhd --enable-fontconfig --enable-frei0r --enable-gcrypt --enable-gnutls --enable-ladspa --enable-libaom --enable-libdav1d --enable-libass --enable-libbluray --enable-libcdio --enable-libdrm --enable-libjack --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmp3lame --enable-nvenc --enable-openal --enable-opencl --enable-opengl --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librsvg --enable-libsrt --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-version3 --enable-vapoursynth --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg --enable-libzvbi --enable-avfilter --enable-avresample --enable-libmodplug --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-libmfx --enable-runtime-cpudetect
 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
[rtsp @ 0x5576c7340600] getaddrinfo(cam-1.loc): Name or service not known
Guessed Channel Layout for Input Stream #0.1 : mono
Input #0, rtsp, from 'rtsp://cam-1.loc:554?user=admin&password=admin&channel=1&stream=0':
 Metadata:
 title : RTSP Session
 Duration: N/A, start: 0.000000, bitrate: N/A
 Stream #0:0: Video: h264 (Main), yuv420p(progressive), 1920x1080, 25 fps, 25 tbr, 90k tbn, 50 tbc
 Stream #0:1: Audio: pcm_alaw, 8000 Hz, mono, s16, 64 kb/s
Stream mapping:
 Stream #0:0 -> #0:0 (h264 (native) -> mpeg2video (native))
 Stream #0:1 -> #0:1 (pcm_alaw (native) -> mp2 (native))
Press [q] to stop, [?] for help
Output #0, mpegts, to 'udp://localhost:6601':
 Metadata:
 title : RTSP Session
 encoder : Lavf58.29.100
 Stream #0:0: Video: mpeg2video (Main), yuv420p, 1920x1080, q=2-31, 200 kb/s, 25 fps, 90k tbn, 25 tbc
 Metadata:
 encoder : Lavc58.54.100 mpeg2video
 Side data:
 cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
 Stream #0:1: Audio: mp2, 16000 Hz, mono, s16, 160 kb/s
 Metadata:
 encoder : Lavc58.54.100 mp2
[rtsp @ 0x5576c7340600] max delay reached. need to consume packette=5338.9kbits/s dup=0 drop=5 speed=1.12x 
[rtsp @ 0x5576c7340600] RTP: missed 3 packets
[rtsp @ 0x5576c7340600] max delay reached. need to consume packet
[rtsp @ 0x5576c7340600] RTP: missed 6 packets
[rtsp @ 0x5576c7340600] max delay reached. need to consume packet
[rtsp @ 0x5576c7340600] RTP: missed 6 packets
[rtsp @ 0x5576c7340600] max delay reached. need to consume packet
[rtsp @ 0x5576c7340600] RTP: missed 5 packets
[rtsp @ 0x5576c7340600] max delay reached. need to consume packet
[rtsp @ 0x5576c7340600] RTP: missed 4 packets
[rtsp @ 0x5576c7340600] max delay reached. need to consume packet
[rtsp @ 0x5576c7340600] RTP: missed 5 packets
[rtsp @ 0x5576c7340600] max delay reached. need to consume packet
[rtsp @ 0x5576c7340600] RTP: missed 6 packets
[rtsp @ 0x5576c7340600] max delay reached. need to consume packet
[rtsp @ 0x5576c7340600] RTP: missed 5 packets
[rtsp @ 0x5576c7340600] max delay reached. need to consume packet
[rtsp @ 0x5576c7340600] RTP: missed 6 packets
[h264 @ 0x5576c7993c80] concealing 972 DC, 972 AC, 972 MV errors in I frame
rtsp://cam-1.loc:554?user=admin&password=admin&channel=1&stream=0: corrupt decoded frame in stream 0=1.11x 
[rtsp @ 0x5576c7340600] max delay reached. need to consume packette=5298.4kbits/s dup=0 drop=5 speed=1.02x 
[rtsp @ 0x5576c7340600] RTP: missed 2 packets
[rtsp @ 0x5576c7340600] max delay reached. need to consume packet
[rtsp @ 0x5576c7340600] RTP: missed 5 packets
[rtsp @ 0x5576c7340600] max delay reached. need to consume packet
[rtsp @ 0x5576c7340600] RTP: missed 4 packets
[rtsp @ 0x5576c7340600] max delay reached. need to consume packet
[rtsp @ 0x5576c7340600] RTP: missed 3 packets
[rtsp @ 0x5576c7340600] max delay reached. need to consume packet
[rtsp @ 0x5576c7340600] RTP: missed 4 packets
[rtsp @ 0x5576c7340600] max delay reached. need to consume packet
[rtsp @ 0x5576c7340600] RTP: missed 5 packets
[rtsp @ 0x5576c7340600] max delay reached. need to consume packet
[rtsp @ 0x5576c7340600] RTP: missed 5 packets
[rtsp @ 0x5576c7340600] max delay reached. need to consume packet
[rtsp @ 0x5576c7340600] RTP: missed 2 packets
[h264 @ 0x5576c779b9c0] cabac decode of qscale diff failed at 66 60
[h264 @ 0x5576c779b9c0] error while decoding MB 66 60, bytestream 9825
[h264 @ 0x5576c779b9c0] concealing 943 DC, 943 AC, 943 MV errors in I frame
rtsp://cam-1.loc:554?user=admin&password=admin&channel=1&stream=0: corrupt decoded frame in stream 0=1.02x 
frame= 1315 fps= 25 q=31.0 Lsize= 34249kB time=00:00:53.32 bitrate=5261.8kbits/s dup=0 drop=5 speed=1.02x 
video:30544kB audio:1042kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 8.431973%



nmap used to check if 6601 port is open


$ nmap -Pn localhost -p 6601
Starting Nmap 7.70 ( https://nmap.org ) at 2023-12-26 10:47 UTC
Nmap scan report for localhost (127.0.0.1)
Host is up (0.0011s latency).
Other addresses for localhost (not scanned): ::1

PORT STATE SERVICE
6601/tcp closed mstmg-sstp

Nmap done: 1 IP address (1 host up) scanned in 0.06 seconds



However, ffplayer able to play video stream


ffplay udp://localhost:6601
ffplay version 4.2.8 Copyright (c) 2003-2022 the FFmpeg developers
 built with gcc 8 (GCC)
 configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --docdir=/usr/share/doc/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' --extra-ldflags='-Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld ' --extra-cflags=' ' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --disable-crystalhd --enable-fontconfig --enable-frei0r --enable-gcrypt --enable-gnutls --enable-ladspa --enable-libaom --enable-libdav1d --enable-libass --enable-libbluray --enable-libcdio --enable-libdrm --enable-libjack --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmp3lame --enable-nvenc --enable-openal --enable-opencl --enable-opengl --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librsvg --enable-libsrt --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-version3 --enable-vapoursynth --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg --enable-libzvbi --enable-avfilter --enable-avresample --enable-libmodplug --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-libmfx --enable-runtime-cpudetect
 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
[mpeg2video @ 0x7f1ad854afc0] Invalid frame dimensions 0x0. f=0/0 
 Last message repeated 7 times
Input #0, mpegts, from 'udp://localhost:6601':0KB sq= 0B f=0/0 
 Duration: N/A, start: 59.288000, bitrate: N/A
 Program 1 
 Metadata:
 service_name : RTSP Session
 service_provider: FFmpeg
 Stream #0:0[0x100]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
 Stream #0:1[0x101]: Audio: mp2 ([4][0][0][0] / 0x0004), 16000 Hz, mono, s16p, 160 kb/s



VLC cannot play the video stream :


vlc udp://localhost:6601
VLC media player 3.0.18 Vetinari (revision )
[000055769aa81ba0] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
[00007fec64011e90] mjpeg demux error: cannot peek



ffprobe output


ffprobe udp://localhost:6601
ffprobe version 4.2.8 Copyright (c) 2007-2022 the FFmpeg developers
 built with gcc 8 (GCC)
 configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --docdir=/usr/share/doc/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' --extra-ldflags='-Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld ' --extra-cflags=' ' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --disable-crystalhd --enable-fontconfig --enable-frei0r --enable-gcrypt --enable-gnutls --enable-ladspa --enable-libaom --enable-libdav1d --enable-libass --enable-libbluray --enable-libcdio --enable-libdrm --enable-libjack --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmp3lame --enable-nvenc --enable-openal --enable-opencl --enable-opengl --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librsvg --enable-libsrt --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-version3 --enable-vapoursynth --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg --enable-libzvbi --enable-avfilter --enable-avresample --enable-libmodplug --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-libmfx --enable-runtime-cpudetect
 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
[mpeg2video @ 0x55e1be0910c0] Invalid frame dimensions 0x0.
 Last message repeated 9 times
Input #0, mpegts, from 'udp://localhost:6601':
 Duration: N/A, start: 262.760000, bitrate: N/A
 Program 1 
 Metadata:
 service_name : RTSP Session
 service_provider: FFmpeg
 Stream #0:0[0x100]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
 Stream #0:1[0x101]: Audio: mp2 ([4][0][0][0] / 0x0004), 16000 Hz, mono, s16p, 160 kb/s



Why the video stream is not playing in VLC ?


Why nmap do not see that UPD port is open ?