
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (38)
-
Support de tous types de médias
10 avril 2011Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)
-
Les notifications de la ferme
1er décembre 2010, parAfin 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 (...) -
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 (...)
Sur d’autres sites (3745)
-
Why is there an audio delay on recording video stream with ffmpeg ?
25 décembre 2023, par mqwertyI am trying to record video and audio stream (Line in Microphone Analog Audio) which are streaming from broadcaster computer with those parameters in the recorder computer ;


ffmpeg record parameters :


/usr/bin/ffmpeg -y -buffer_size max -thread_queue_size 8192 -i udp://225.0.5.11:1026 -buffer_size max -thread_queue_size 8192 -i udp://225.0.5.11:1032 -map 0:v -map 1:a -metadata title=COMPUTER-01_metadata_file -metadata creation_time="2023-12-25 13:25:29" -threads 0 -c:v copy -c:a copy -movflags +faststart -f segment -segment_time 01:00:00 -segment_atclocktime 1 -reset_timestamps 1 -strftime 1 -segment_format mp4 -t 120 test_record_video_with_audio_%Y-%m-%d_%H-%M-%S.mp4



The ffmpeg started and finished successfully, but when I open the recorded video with mpv like (mpv test_record_video_with_audio.mp4), I realized that there is a 5-6 seconds delay in audio. How can I prevent the delay of audio in the recorded mp4 file without using offset ? My last option is setting offset but I think that it is not safe according to any changes in network or etc.


FFMPEG version on both computer :


ffmpeg version 4.2.9 Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 8 (GCC)



BROADCASTER COMPUTER :


sysctl.conf :


No added configurations.



ethtool output :


Supported ports: [ TP ]
Supported link modes: 100baseT/Full
 1000baseT/Full
 10000baseT/Full
 2500baseT/Full
 5000baseT/Full
Supported pause frame use: Symmetric
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 100baseT/Full
 1000baseT/Full
 10000baseT/Full
Advertised pause frame use: Symmetric
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Speed: 10000Mb/s
Duplex: Full
Auto-negotiation: on
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
MDI-X: Unknown
Supports Wake-on: d
Wake-on: d
 Current message level: 0x00000007 (7)
 drv probe link
Link detected: yes



ffmpeg video stream :


ffmpeg -fflags +genpts -f x11grab -framerate 30 -video_size uhd2160 -i :0 -c:v hevc_nvenc -preset fast -pix_fmt bgr0 -b:v 3M -g 25 -an -f mpegts udp://225.0.5.11:1026



ffmpeg audio stream :


ffmpeg -f alsa -i hw:0,0 -c:a aac -ar 48000 -b:a 1024K -ab 512k -f rtp_mpegts rtp://225.0.5.11:1032



nvidia-smi :


| NVIDIA-SMI 535.129.03 Driver Version: 535.129.03 CUDA Version: 12.2 |
|-----------------------------------------+----------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+======================+======================|
| 0 NVIDIA T400 4GB Off | 00000000:5B:00.0 Off | N/A |
| 38% 38C P8 N/A / 31W | 207MiB / 4096MiB | 0% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+
| 1 NVIDIA RTX A4000 Off | 00000000:9E:00.0 Off | Off |
| 41% 59C P2 41W / 140W | 766MiB / 16376MiB | 17% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+
 
+---------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=======================================================================================|
| 0 N/A N/A 3227 G /usr/libexec/Xorg 114MiB |
| 0 N/A N/A 3423 G /usr/bin/gnome-shell 87MiB |
| 1 N/A N/A 3227 G /usr/libexec/Xorg 285MiB |
| 1 N/A N/A 3423 G /usr/bin/gnome-shell 91MiB |
| 1 N/A N/A 3762 C ffmpeg 372MiB |
+---------------------------------------------------------------------------------------+



lscpu output :




Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 96
On-line CPU(s) list: 0-95
Thread(s) per core: 2
Core(s) per socket: 24
Socket(s): 2
NUMA node(s): 2
Vendor ID: GenuineIntel
BIOS Vendor ID: Intel(R) Corporation
CPU family: 6
Model: 85
Model name: Intel(R) Xeon(R) Gold 5220R CPU @ 2.20GHz
BIOS Model name: Intel(R) Xeon(R) Gold 5220R CPU @ 2.20GHz
Stepping: 7
CPU MHz: 2200.000
CPU max MHz: 4000.0000
CPU min MHz: 1000.0000
BogoMIPS: 4400.00
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 1024K
L3 cache: 36608K
NUMA node0 CPU(s): 0-23,48-71
NUMA node1 CPU(s): 24-47,72-95



OS : CentOS Stream release 8



RECORDER COMPUTER :


sysctl.conf :


net.core.rmem_max=16777216
net.core.wmem_max=16777216
net.ipv4.tcp_rmem= 4096 87380 16777216
net.ipv4.tcp_wmem= 4096 65536 16777216
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_timestamps = 1
net.ipv4.tcp_sack = 1
net.ipv4.tcp_no_metrics_save = 0
net.core.netdev_max_backlog = 50000
net.core.optmem_max=25165824



lscpu output :


Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 96
On-line CPU(s) list: 0-95
Thread(s) per core: 2
Core(s) per socket: 24
Socket(s): 2
NUMA node(s): 2
Vendor ID: GenuineIntel
BIOS Vendor ID: Intel
CPU family: 6
Model: 106
Model name: Intel(R) Xeon(R) Gold 5318Y CPU @ 2.10GHz
BIOS Model name: Intel(R) Xeon(R) Gold 5318Y CPU @ 2.10GHz
Stepping: 6
CPU MHz: 3400.000
CPU max MHz: 3400.0000
CPU min MHz: 800.0000
BogoMIPS: 4200.00
Virtualization: VT-x
L1d cache: 48K
L1i cache: 32K
L2 cache: 1280K
L3 cache: 36864K



ethtool output :


Supported ports: [ TP ]
 Supported link modes: 1000baseT/Full
 10000baseT/Full
 Supported pause frame use: Symmetric Receive-only
 Supports auto-negotiation: Yes
 Supported FEC modes: Not reported
 Advertised link modes: 1000baseT/Full
 10000baseT/Full
 Advertised pause frame use: Symmetric
 Advertised auto-negotiation: Yes
 Advertised FEC modes: Not reported
 Speed: 10000Mb/s
 Duplex: Full
 Auto-negotiation: on
 Port: Twisted Pair
 PHYAD: 12
 Transceiver: internal
 MDI-X: Unknown
 Supports Wake-on: d
 Wake-on: d
 Current message level: 0x00002081 (8321)
 drv tx_err hw
 Link detected: yes



No NVIDIA Graphic Driver


OS : CentOS Stream release 8



I tried audio encoding while recording like :


"-c:a", "aac", 
"-ar", "48000", 
"-b:a", "128k",



I also tried :


"aresample=async=1"




Unfortunately,these did not have any improvements on preventing latency in audio.


-
Sporadic "Error parsing Cues... Operation not permitted" errors when trying to generate a DASH manifest
22 novembre 2023, par kshetlineI have already-generated .webm audio and video files (1 audio, 3 video resolutions for each video I want to stream). The video has been generated not (directly) by ffmpeg, but HandbrakeCLI 1.7.0, with V9 encoding. The audio (which has never caused an error) is generated by ffmpeg using libvorbis.


Most of the time ffmpeg (version 6.1) creates a manifest without any problem. Sporadically, however, "Error parsing Cues" comes up (frequently with the latest videos I've been trying to process) and I can't create a manifest. Since this is happening during an automated process to process many videos for streaming, the audio and video sources are being created exactly the same way whether ffmpeg succeeds or fails in generating a manifest, making this all the more confusing.


The video files ffmpeg chokes on play perfectly well using VLC, and mediainfo doesn't show any problems with these files.


Here's the way I've been (sometimes successfully, sometimes not) generating a manifest, with extra logging added :


ffmpeg -v 9 -loglevel 99 \
 -f webm_dash_manifest -i '.\Sample Video.v480.webm' \
 -f webm_dash_manifest -i '.\Sample Video.v720.webm' \
 -f webm_dash_manifest -i '.\Sample Video.v1080.webm' \
 -f webm_dash_manifest -i '.\Sample Video.audio.webm' \
 -c copy -map 0 -map 1 -map 2 -map 3 \
 -f webm_dash_manifest -adaptation_sets "id=0,streams=0,1,2 id=1,streams=3" \
 '.\Sample Video.mpd'



Here's the result when it fails :


ffmpeg version 6.1-full_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers
 built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
 configuration: --enable-gpl --enable-version3 --enable-static --pkg-config=pkgconf --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --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-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --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-ffnvcodec --enable-nvdec --enable-nvenc --enable-dxva2 --enable-d3d11va --enable-libvpl --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-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
 libavutil 58. 29.100 / 58. 29.100
 libavcodec 60. 31.102 / 60. 31.102
 libavformat 60. 16.100 / 60. 16.100
 libavdevice 60. 3.100 / 60. 3.100
 libavfilter 9. 12.100 / 9. 12.100
 libswscale 7. 5.100 / 7. 5.100
 libswresample 4. 12.100 / 4. 12.100
 libpostproc 57. 3.100 / 57. 3.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument '9'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument '99'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'webm_dash_manifest'.
Reading option '-i' ... matched as output url with argument '.\Sample Video.v480.webm'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'webm_dash_manifest'.
Reading option '-i' ... matched as output url with argument '.\Sample Video.v720.webm'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'webm_dash_manifest'.
Reading option '-i' ... matched as output url with argument '.\Sample Video.v1080.webm'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'webm_dash_manifest'.
Reading option '-i' ... matched as output url with argument '.\Sample Video.audio.webm'.
Reading option '-c' ... matched as option 'c' (codec name) with argument 'copy'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '1'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '2'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '3'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'webm_dash_manifest'.
Reading option '-adaptation_sets' ... matched as AVOption 'adaptation_sets' with argument 'id=0,streams=0,1,2 id=1,streams=3'.
Reading option '.\Sample Video.mpd' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument 9.
Successfully parsed a group of options.
Parsing a group of options: input url .\Sample Video.v480.webm.
Applying option f (force format) with argument webm_dash_manifest.
Successfully parsed a group of options.
Opening an input file: .\Sample Video.v480.webm.
[webm_dash_manifest @ 000002bbcb41dc80] Opening '.\Sample Video.v480.webm' for reading
[file @ 000002bbcb41e300] Setting default whitelist 'file,crypto,data'
st:0 removing common factor 1000000 from timebase
[webm_dash_manifest @ 000002bbcb41dc80] Error parsing Cues
[AVIOContext @ 000002bbcb41e5c0] Statistics: 102283 bytes read, 4 seeks
[in#0 @ 000002bbcb41dac0] Error opening input: Operation not permitted
Error opening input file .\Sample Video.v480.webm.
Error opening input files: Operation not permitted



This is
mediainfo
for the offending input file, Sample Video.v480.webm :

General
Complete name : .\Sample Video.v480.webm
Format : WebM
Format version : Version 2
File size : 628 MiB
Duration : 1 h 34 min
Overall bit rate : 926 kb/s
Frame rate : 23.976 FPS
Encoded date : 2023-11-21 16:48:35 UTC
Writing application : HandBrake 1.7.0 2023111500
Writing library : Lavf60.16.100

Video
ID : 1
Format : VP9
Format profile : 0
Codec ID : V_VP9
Duration : 1 h 34 min
Bit rate : 882 kb/s
Width : 720 pixels
Height : 480 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Bits/(Pixel*Frame) : 0.106
Stream size : 598 MiB (95%)
Default : Yes
Forced : No
Color range : Limited
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709



I don't know if I need different command line options, or whether this might be an ffmpeg or Handbrake bug. It has taken many, many hours to generate these video files (VP9 is painfully slow to encode), so I hate to do a lot of this over again, especially doing it again encoding the video with ffmpeg instead of Handbrake, as Handbrake is (oddly enough, considering it uses ffmpeg under the hood) noticeably faster.


I have no idea what these "Cues" are that ffmpeg wants and can't parse, or how I would change them.


-
Conversion Rate Optimisation Statistics for 2024 and Beyond
21 novembre 2023, par Erin — Analytics Tips