
Recherche avancée
Autres articles (20)
-
Selection of projects using MediaSPIP
2 mai 2011, parThe examples below are representative elements of MediaSPIP specific uses for specific projects.
MediaSPIP farm @ Infini
The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...) -
L’espace de configuration de MediaSPIP
29 novembre 2010, parL’espace de configuration de MediaSPIP est réservé aux administrateurs. Un lien de menu "administrer" est généralement affiché en haut de la page [1].
Il permet de configurer finement votre site.
La navigation de cet espace de configuration est divisé en trois parties : la configuration générale du site qui permet notamment de modifier : les informations principales concernant le site (...) -
Installation en mode ferme
4 février 2011, parLe mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
C’est la méthode que nous utilisons sur cette même plateforme.
L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)
Sur d’autres sites (5292)
-
Stream is not appearing on youtube
1er novembre 2022, par AMRITESH GUPTAI am trying to stream a captured stream to youtube live through FFmpeg, but the stream is not appearing on youtube. I tried giving input from an mp4 file, and it worked perfectly but providing input as a buffer through stdin gives nothing.


FFmpeg command


ffmpeg -rtbufsize 100M -report -i - -v error -c:v libx264 -preset veryfast -tune zerolatency -g:v 60 -c:a aac -strict -2 -ar 44100 -b:a 64k -y -use_wallclock_as_timestamps 1 -async 1 -f flv ${youtubeURL}


I used
-report
for generating a log report, and I couldn't find anything wrong with it.

Here is snippet of log file


ffmpeg started on 2022-11-01 at 09:42:32
Report written to "ffmpeg-20221101-094232.log"
Log level: 48
Command line:
ffmpeg -rtbufsize 100M -report -i - -v error -c:v libx264 -preset veryfast -tune zerolatency -g:v 60 -c:a aac -strict -2 -ar 44100 -b:a 64k -y -use_wallclock_as_timestamps 1 -async 1 -f flv rtmp://a.rtmp.youtube.com/live2/pxjt-j9g5-ygv8-0000-6w8h
ffmpeg version 2022-10-27-git-00b03331a0-full_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers
 built with gcc 12.1.0 (Rev2, Built by MSYS2 project)
 configuration: --enable-gpl --enable-version3 --enable-static --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-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-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libvpl --enable-libshaderc --enable-vulkan --ena libavutil 57. 39.101 / 57. 39.101
 libavcodec 59. 51.100 / 59. 51.100
 libavformat 59. 34.101 / 59. 34.101
 libavdevice 59. 8.101 / 59. 8.101
 libavfilter 8. 49.101 / 8. 49.101
 libswscale 6. 8.112 / 6. 8.112
 libswresample 4. 9.100 / 4. 9.100
 libpostproc 56. 7.100 / 56. 7.100
Splitting the commandline.
Reading option '-rtbufsize' ... matched as AVOption 'rtbufsize' with argument '100M'.
Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'.
Reading option '-i' ... matched as input url with argument '-'.
Reading option '-v' ... matched as option 'v' (set logging level) with argument 'error'.
Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'libx264'.
Reading option '-preset' ... matched as AVOption 'preset' with argument 'veryfast'.
Reading option '-tune' ... matched as AVOption 'tune' with argument 'zerolatency'.
Reading option '-g:v' ... matched as AVOption 'g:v' with argument '60'.
Reading option '-c:a' ... matched as option 'c' (codec name) with argument 'aac'.
Reading option '-strict' ...Routing option strict to both codec and muxer layer
 matched as AVOption 'strict' with argument '-2'.
Reading option '-ar' ... matched as option 'ar' (set audio sampling rate (in Hz)) with argument '44100'.
Reading option '-b:a' ... matched as option 'b' (video bitrate (please use -b:v)) with argument '64k'.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Reading option '-use_wallclock_as_timestamps' ... matched as AVOption 'use_wallclock_as_timestamps' with argument '1'.
Reading option '-async' ... matched as AVOption 'async' with argument '1'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'flv'.
Reading option 'rtmp://a.rtmp.youtube.com/live2/pxjt-j9g5-ygv8-0000-6w8h' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option report (generate a report) with argument 1.
Applying option v (set logging level) with argument error.
Applying option y (overwrite output files) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input url -.
Successfully parsed a group of options.
Opening an input file: -.
[NULL @ 0000025c01844940] Opening 'pipe:' for reading
[pipe @ 0000025c01844e00] Setting default whitelist 'crypto,data'
[matroska,webm @ 0000025c01844940] Format matroska,webm probed with size=2048 and score=100
st:0 removing common factor 1000000 from timebase
[matroska,webm @ 0000025c01844940] Before avformat_find_stream_info() pos: 136 bytes read:32271 seeks:0 nb_streams:1
[extract_extradata @ 0000025c01817d40] nal_unit_type: 7(SPS), nal_ref_idc: 3
[extract_extradata @ 0000025c01817d40] nal_unit_type: 8(PPS), nal_ref_idc: 3
[extract_extradata @ 0000025c01817d40] nal_unit_type: 5(IDR), nal_ref_idc: 3
[extract_extradata @ 0000025c01817d40] nal_unit_type: 5(IDR), nal_ref_idc: 3
[extract_extradata @ 0000025c01817d40] nal_unit_type: 5(IDR), nal_ref_idc: 3
[extract_extradata @ 0000025c01817d40] nal_unit_type: 5(IDR), nal_ref_idc: 3
[extract_extradata @ 0000025c01817d40] nal_unit_type: 5(IDR), nal_ref_idc: 3
[extract_extradata @ 0000025c01817d40] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0000025c0186aac0] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0000025c0186aac0] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 0000025c0186aac0] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0000025c0186aac0] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0000025c0186aac0] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0000025c0186aac0] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0000025c0186aac0] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0000025c0186aac0] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0000025c0186aac0] Format yuv420p chosen by get_format().
[h264 @ 0000025c0186aac0] Reinit context to 1280x384, pix_fmt: yuv420p
[h264 @ 0000025c0186aac0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
[h264 @ 0000025c0186aac0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
[h264 @ 0000025c0186aac0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
[h264 @ 0000025c0186aac0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
[h264 @ 0000025c0186aac0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
[h264 @ 0000025c0186aac0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
[h264 @ 0000025c0186aac0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
[h264 @ 0000025c0186aac0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
[h264 @ 0000025c0186aac0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
[h264 @ 0000025c0186aac0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
[h264 @ 0000025c0186aac0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
[h264 @ 0000025c0186aac0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
[h264 @ 0000025c0186aac0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
[h264 @ 0000025c0186aac0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
[h264 @ 0000025c0186aac0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
[h264 @ 0000025c0186aac0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
[h264 @ 0000025c0186aac0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
[h264 @ 0000025c0186aac0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
[h264 @ 0000025c0186aac0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
[h264 @ 0000025c0186aac0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
[h264 @ 0000025c0186aac0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
[h264 @ 0000025c0186aac0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
[h264 @ 0000025c0186aac0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
[h264 @ 0000025c0186aac0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
[h264 @ 0000025c0186aac0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
[h264 @ 0000025c0186aac0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
[h264 @ 0000025c0186aac0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
[h264 @ 0000025c0186aac0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
[h264 @ 0000025c0186aac0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
[h264 @ 0000025c0186aac0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
[h264 @ 0000025c0186aac0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
[h264 @ 0000025c0186aac0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
[h264 @ 0000025c0186aac0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
[h264 @ 0000025c0186aac0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
[h264 @ 0000025c0186aac0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
[h264 @ 0000025c0186aac0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
[matroska,webm @ 0000025c01844940] max_analyze_duration 5000000 reached at 22181000 microseconds st:0
[matroska,webm @ 0000025c01844940] rfps: 1.000000 0.006758
[matroska,webm @ 0000025c01844940] rfps: 2.000000 0.019257
[matroska,webm @ 0000025c01844940] rfps: 7.916667 0.017773
[matroska,webm @ 0000025c01844940] rfps: 9.916667 0.012828
[matroska,webm @ 0000025c01844940] rfps: 10.916667 0.019976
[matroska,webm @ 0000025c01844940] rfps: 16.833333 0.010482
[matroska,webm @ 0000025c01844940] rfps: 17.833333 0.007736
[matroska,webm @ 0000025c01844940] rfps: 17.833333 0.007736
[matroska,webm @ 0000025c01844940] rfps: 18.833333 0.018506
[matroska,webm @ 0000025c01844940] After avformat_find_stream_info() pos: 88442 bytes read:88443 seeks:0 frames:31
Input #0, matroska,webm, from 'pipe:':
 Metadata:
 encoder : Chrome
 Duration: N/A, start: 0.000000, bitrate: N/A
 Stream #0:0(eng), 31, 1/1000: Video: h264 (Constrained Baseline), yuv420p(progressive), 1280x382, SAR 1:1 DAR 640:191, 1 tbr, 1k tbn (default)
Successfully opened the file.
Parsing a group of options: output url rtmp://a.rtmp.youtube.com/live2/pxjt-j9g5-ygv8-0000-6w8h.
Applying option c:v (codec name) with argument libx264.
Applying option c:a (codec name) with argument aac.
Applying option ar (set audio sampling rate (in Hz)) with argument 44100.
Applying option b:a (video bitrate (please use -b:v)) with argument 64k.
Applying option f (force format) with argument flv.
Successfully parsed a group of options.
Opening an output file: rtmp://a.rtmp.youtube.com/live2/pxjt-j9g5-ygv8-0000-6w8h.
Codec AVOption b (set bitrate (in bits/s)) specified for output file #0 (rtmp://a.rtmp.youtube.com/live2/pxjt-j9g5-ygv8-0000-6w8h) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
[rtmp @ 0000025c01d1bd00] No default whitelist set
[tcp @ 0000025c01844f40] No default whitelist set
[tcp @ 0000025c01844f40] Original list of addresses:
[tcp @ 0000025c01844f40] Address 142.250.193.204 port 1935
[tcp @ 0000025c01844f40] Address 142.250.193.236 port 1935
[tcp @ 0000025c01844f40] Address 142.250.206.108 port 1935
[tcp @ 0000025c01844f40] Address 142.250.206.140 port 1935
[tcp @ 0000025c01844f40] Address 142.250.206.172 port 1935
[tcp @ 0000025c01844f40] Address 142.250.194.12 port 1935
[tcp @ 0000025c01844f40] Address 142.250.194.44 port 1935
[tcp @ 0000025c01844f40] Address 142.250.194.76 port 1935
[tcp @ 0000025c01844f40] Address 142.250.194.108 port 1935
[tcp @ 0000025c01844f40] Address 142.250.194.140 port 1935
[tcp @ 0000025c01844f40] Address 142.250.194.172 port 1935
[tcp @ 0000025c01844f40] Address 142.250.194.204 port 1935
[tcp @ 0000025c01844f40] Address 142.250.194.236 port 1935
[tcp @ 0000025c01844f40] Address 142.250.195.12 port 1935
[tcp @ 0000025c01844f40] Address 142.250.207.204 port 1935
[tcp @ 0000025c01844f40] Address 142.250.207.236 port 1935
[tcp @ 0000025c01844f40] Interleaved list of addresses:
[tcp @ 0000025c01844f40] Address 142.250.193.204 port 1935
[tcp @ 0000025c01844f40] Address 142.250.193.236 port 1935
[tcp @ 0000025c01844f40] Address 142.250.206.108 port 1935
[tcp @ 0000025c01844f40] Address 142.250.206.140 port 1935
[tcp @ 0000025c01844f40] Address 142.250.206.172 port 1935
[tcp @ 0000025c01844f40] Address 142.250.194.12 port 1935
[tcp @ 0000025c01844f40] Address 142.250.194.44 port 1935
[tcp @ 0000025c01844f40] Address 142.250.194.76 port 1935
[tcp @ 0000025c01844f40] Address 142.250.194.108 port 1935
[tcp @ 0000025c01844f40] Address 142.250.194.140 port 1935
[tcp @ 0000025c01844f40] Address 142.250.194.172 port 1935
[tcp @ 0000025c01844f40] Address 142.250.194.204 port 1935
[tcp @ 0000025c01844f40] Address 142.250.194.236 port 1935
[tcp @ 0000025c01844f40] Address 142.250.195.12 port 1935
[tcp @ 0000025c01844f40] Address 142.250.207.204 port 1935
[tcp @ 0000025c01844f40] Address 142.250.207.236 port 1935
[tcp @ 0000025c01844f40] Starting connection attempt to 142.250.193.204 port 1935
[tcp @ 0000025c01844f40] Successfully connected to 142.250.193.204 port 1935
[rtmp @ 0000025c01d1bd00] Handshaking...
[rtmp @ 0000025c01d1bd00] Type answer 3
[rtmp @ 0000025c01d1bd00] Server version 4.0.0.1
[rtmp @ 0000025c01d1bd00] Proto = rtmp, path = /live2/pxjt-j9g5-ygv8-0000-6w8h, app = live2, fname = pxjt-j9g5-ygv8-0000-6w8h
[rtmp @ 0000025c01d1bd00] Window acknowledgement size = 2500000
[rtmp @ 0000025c01d1bd00] Max sent, unacked = 59768832
[rtmp @ 0000025c01d1bd00] Releasing stream...
[rtmp @ 0000025c01d1bd00] FCPublish stream...
[rtmp @ 0000025c01d1bd00] Creating stream...
[rtmp @ 0000025c01d1bd00] Sending publish command for 'pxjt-j9g5-ygv8-0000-6w8h'
Successfully opened the file.
detected 8 logical cores
[h264 @ 0000025c01882e00] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0000025c01882e00] nal_unit_type: 8(PPS), nal_ref_idc: 3
Stream mapping:
 Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[matroska,webm @ 0000025c01844940] Thread message queue blocking; consider raising the thread_queue_size option (current value: 1)
[h264 @ 0000025c01882e00] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0000025c01882e00] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 0000025



-
"wrong sample count" When reading MP4 files using OpenCV
26 octobre 2022, par Object UnknownI want to marge some mp4 videos using OpenCV library, but when I try to read those videos using
cv::VideoCapture
, it outputs like that :

[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[h264 @ 000001EB9AAE9D80] co located POCs unavailable
[h264 @ 000001EB9AAE7D80] co located POCs unavailable
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[h264 @ 000001EB9A128600] co located POCs unavailable
[h264 @ 000001EB9A129840] co located POCs unavailable
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB9AA28E40] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[h264 @ 000001EB9A169B00] co located POCs unavailable
[h264 @ 000001EB9A16B680] co located POCs unavailable
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[h264 @ 000001EB960CD680] co located POCs unavailable
[h264 @ 000001EB960CC8C0] co located POCs unavailable
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[h264 @ 000001EB9A81DDC0] co located POCs unavailable
[h264 @ 000001EB9A81B000] co located POCs unavailable
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[h264 @ 000001EB960CB200] co located POCs unavailable
[h264 @ 000001EB960CBFC0] co located POCs unavailable
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[h264 @ 000001EB99F206C0] co located POCs unavailable
[h264 @ 000001EB99F20B40] co located POCs unavailable
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[h264 @ 000001EB9A81D480] co located POCs unavailable
[h264 @ 000001EB9A81B000] co located POCs unavailable
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[h264 @ 000001EB9AD02C00] co located POCs unavailable
[h264 @ 000001EB9AD02300] co located POCs unavailable
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[h264 @ 000001EB9A81B480] co located POCs unavailable
[h264 @ 000001EB9A81B940] co located POCs unavailable
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[h264 @ 000001EB9AD02780] co located POCs unavailable
[h264 @ 000001EB9AD01E40] co located POCs unavailable
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count



and just exited with exit value 0. I want to know why it is reporting this and how to solve it please.


Heres my demo code :


#include <string>
#include <iostream>
#include <opencv2></opencv2>core/core.hpp>
#include <opencv2></opencv2>video/video.hpp>
#include <opencv2></opencv2>imgproc/imgproc.hpp>
#include <opencv2></opencv2>videoio/videoio.hpp>
#include <opencv2></opencv2>highgui/highgui.hpp>

int main()
{
 cv::Mat frame;
 cv::VideoCapture vcap;
 for (int i = 1; i <= 60; i++)
 {
 if (!vcap.open("G:\\Users\\15819\\Desktop\\Demo\\demo (" + std::to_string(i) + ").mp4"))
 {
 std::cout << "Failed to Open File: demo (" << i << ").mp4" << std::endl;
 continue;
 }
 while (!vcap.read(frame))
 cv::imshow("video", frame);
 }
 return 0;
}
</iostream></string>


I installed the
OpenCV
andFFmpeg
library usingvcpkg
, here's the library information (displayed byvcpkg list
command) :

ffmpeg:x64-windows 4.4.1#21 a library to decode, encode, transcode, mux, dem...
ffmpeg:x86-windows 4.4.1#21 a library to decode, encode, transcode, mux, dem...
ffmpeg[avcodec]:x64-windows Build the avcodec library
ffmpeg[avcodec]:x86-windows Build the avcodec library
ffmpeg[avdevice]:x64-windows Build the avdevice library
ffmpeg[avdevice]:x86-windows Build the avdevice library
ffmpeg[avfilter]:x64-windows Build the avfilter library
ffmpeg[avfilter]:x86-windows Build the avfilter library
ffmpeg[avformat]:x64-windows Build the avformat library
ffmpeg[avformat]:x86-windows Build the avformat library
ffmpeg[openh264]:x64-windows H.264 de/encoding via openh264
ffmpeg[openh264]:x86-windows H.264 de/encoding via openh264
ffmpeg[swresample]:x64-windows Build the swresample library
ffmpeg[swresample]:x86-windows Build the swresample library
ffmpeg[swscale]:x64-windows Build the swscale library
ffmpeg[swscale]:x86-windows Build the swscale library
opencv4:x64-windows 4.6.0#6 computer vision library
opencv4:x86-windows 4.6.0#6 computer vision library
opencv4[default-features]:x64-windows Platform-dependent default features
opencv4[default-features]:x86-windows Platform-dependent default features
opencv4[dnn]:x64-windows Enable dnn module
opencv4[dnn]:x86-windows Enable dnn module
opencv4[ffmpeg]:x64-windows ffmpeg support for opencv
opencv4[ffmpeg]:x86-windows ffmpeg support for opencv
opencv4[jpeg]:x64-windows JPEG support for opencv
opencv4[jpeg]:x86-windows JPEG support for opencv
opencv4[png]:x64-windows PNG support for opencv
opencv4[png]:x86-windows PNG support for opencv
opencv4[qt]:x64-windows Qt GUI support for opencv
opencv4[qt]:x86-windows Qt GUI support for opencv
opencv4[quirc]:x64-windows Enable QR code module
opencv4[quirc]:x86-windows Enable QR code module
opencv4[tiff]:x64-windows TIFF support for opencv
opencv4[tiff]:x86-windows TIFF support for opencv
opencv4[webp]:x64-windows WebP support for opencv
opencv4[webp]:x86-windows WebP support for opencv
opencv:x64-windows 4.6.0 Computer vision library
opencv:x86-windows 4.6.0 Computer vision library
opencv[default-features]:x64-windows Platform-dependent default features
opencv[default-features]:x86-windows Platform-dependent default features
opencv[dnn]:x64-windows Enable dnn module
opencv[dnn]:x86-windows Enable dnn module
opencv[jpeg]:x64-windows JPEG support for opencv
opencv[jpeg]:x86-windows JPEG support for opencv
opencv[png]:x64-windows PNG support for opencv
opencv[png]:x86-windows PNG support for opencv
opencv[quirc]:x64-windows Enable QR code module
opencv[quirc]:x86-windows Enable QR code module
opencv[tiff]:x64-windows TIFF support for opencv
opencv[tiff]:x86-windows TIFF support for opencv
opencv[webp]:x64-windows WebP support for opencv
opencv[webp]:x86-windows WebP support for opencv



Other Environments :


OS: Windows 11 x64 Professional Workstation
IDE: Visual Studio 2022
Project C++ Standard: C++14
Project Platform: x64 Release



-
Why convert wav to mp3 get different length
13 avril 2022, par sybilI use NAudio and NAudio.Lame to convert a wav file to mp3 file,code like that :


using var reader = new WaveFileReader(file);
using var ms = new MemoryStream();
var writer = new LameMP3FileWriter(ms, reader.WaveFormat, 32);
reader.CopyTo(writer);
writer.Flush();
File.WriteAllBytes(file.Replace("wav", "mp3"), ms.ToArray());



the wav file length is 1500ms,but the mp3 file length is 1557ms.


And I do the same thing by using ffmpeg.exe,command like that :


ffmpeg -i c:\2\xxx.wav c:\2\xxx.mp3



the output info :


ffmpeg version 5.0.1-essentials_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers
 built with gcc 11.2.0 (Rev7, Built by MSYS2 project)
 configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-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 --enable-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-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband
 libavutil 57. 17.100 / 57. 17.100
 libavcodec 59. 18.100 / 59. 18.100
 libavformat 59. 16.100 / 59. 16.100
 libavdevice 59. 4.100 / 59. 4.100
 libavfilter 8. 24.100 / 8. 24.100
 libswscale 6. 4.100 / 6. 4.100
 libswresample 4. 3.100 / 4. 3.100
 libpostproc 56. 3.100 / 56. 3.100
Guessed Channel Layout for Input Stream #0.0 : mono
Input #0, wav, from 'c:\2\xxx.wav':
 Duration: 00:00:01.50, bitrate: 768 kb/s
 Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, mono, s16, 768 kb/s
Stream mapping:
 Stream #0:0 -> #0:0 (pcm_s16le (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
Output #0, mp3, to 'c:\2\xxx.mp3':
 Metadata:
 TSSE : Lavf59.16.100
 Stream #0:0: Audio: mp3, 48000 Hz, mono, s16p
 Metadata:
 encoder : Lavc59.18.100 libmp3lame
size= 12kB time=00:00:01.51 bitrate= 66.2kbits/s speed= 137x
video:0kB audio:12kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.928711%



And I get a mp3 file which length is 1536ms.
So,why the length changed ?
Thanks for reading.