
Recherche avancée
Médias (3)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (19)
-
Other interesting software
13 avril 2011, parWe don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
We don’t know them, we didn’t try them, but you can take a peek.
Videopress
Website : http://videopress.com/
License : GNU/GPL v2
Source code : (...) -
Pas question de marché, de cloud etc...
10 avril 2011Le vocabulaire utilisé sur ce site essaie d’éviter toute référence à la mode qui fleurit allègrement
sur le web 2.0 et dans les entreprises qui en vivent.
Vous êtes donc invité à bannir l’utilisation des termes "Brand", "Cloud", "Marché" etc...
Notre motivation est avant tout de créer un outil simple, accessible à pour tout le monde, favorisant
le partage de créations sur Internet et permettant aux auteurs de garder une autonomie optimale.
Aucun "contrat Gold ou Premium" n’est donc prévu, aucun (...) -
Qualité du média après traitement
21 juin 2013, parLe bon réglage du logiciel qui traite les média est important pour un équilibre entre les partis ( bande passante de l’hébergeur, qualité du média pour le rédacteur et le visiteur, accessibilité pour le visiteur ). Comment régler la qualité de son média ?
Plus la qualité du média est importante, plus la bande passante sera utilisée. Le visiteur avec une connexion internet à petit débit devra attendre plus longtemps. Inversement plus, la qualité du média est pauvre et donc le média devient dégradé voire (...)
Sur d’autres sites (3054)
-
muxing DVB subtitles into transport stream with ffmpeg
28 novembre 2019, par user3439130So i have H264 video + AAC audio muxed inside transport stream (*.ts). To achive evenly spread PCR values i added muxrate tag to my command.
ffmpeg -analyzeduration 20000000 -probesize 20M -loglevel verbose -i 1135084.m4v -i 1135084.m4a -c copy -muxrate 7982K -map 0:v:0 -map 1:a:0 -metadata:s:a:0 language=eng -metadata:s:a:0 tms_track_id=169451954 TEMP0.ts
Since our client need DVB substitles we convert SRT to DVD with subtitle edit and then encode them to DVB with ffmpeg with this command :
ffmpeg -analyzeduration 20000000 -probesize 20M -loglevel verbose -i TEMP0.ts -i out.da.idx -map 0 -c copy -muxrate 7992K -map 1:s -c:s:0 dvbsub -metadata:s:s:0 language=dan TEMP1.ts
here is output from ffmpeg command :
ffmpeg version git-2019-11-18-d831edc Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9.2.1 (GCC) 20191010
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
libavutil 56. 36.100 / 56. 36.100
libavcodec 58. 62.100 / 58. 62.100
libavformat 58. 35.100 / 58. 35.100
libavdevice 58. 9.101 / 58. 9.101
libavfilter 7. 66.100 / 7. 66.100
libswscale 5. 6.100 / 5. 6.100
libswresample 3. 6.100 / 3. 6.100
libpostproc 55. 6.100 / 55. 6.100
[h264 @ 000002bf7460d400] non-existing SPS 0 referenced in buffering period
[h264 @ 000002bf7460d400] SPS unavailable in decode_picture_timing
[h264 @ 000002bf7460d400] non-existing SPS 0 referenced in buffering period
[h264 @ 000002bf7460d400] SPS unavailable in decode_picture_timing
[h264 @ 000002bf7460d400] Reinit context to 1920x1088, pix_fmt: yuv420p
[mpegts @ 000002bf7460ae00] max_analyze_duration 20000000 reached at 20000000 microseconds st:0
[mpegts @ 000002bf7460ae00] start time for stream 2 is not set in estimate_timings_from_pts
Input #0, mpegts, from 'TEMP1.ts':
Duration: 01:51:54.48, start: 1.440000, bitrate: 7992 kb/s
Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0:0[0x100]: Video: h264 (High), 1 reference frame ([27][0][0][0] / 0x001B), yuv420p(progressive, left), 1920x1080 (1920x1088) [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x101](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 254 kb/s
Stream #0:2[0x102](dan): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
[vobsub @ 000002bf75d65940] IDX/SUB: out.fi.idx -> out.fi.sub
Input #1, vobsub, from 'out.fi.idx':
Duration: N/A, bitrate: N/A
Stream #1:0[0x0](fi): Subtitle: dvd_subtitle, 1920x1080 (default)
File 'TEMP2.ts' already exists. Overwrite? [y/N] y
[mpegts @ 000002bf74634f00] service 1 using PCR in pid=256, pcr_period=20ms
[mpegts @ 000002bf74634f00] muxrate 8002000, sdt every 500 ms, pat/pmt every 100 ms
Output #0, mpegts, to 'TEMP2.ts':
Metadata:
encoder : Lavf58.35.100
Stream #0:0: Video: h264 (High), 1 reference frame ([27][0][0][0] / 0x001B), yuv420p(progressive, left), 1920x1080 (0x0) [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 25 tbr, 90k tbn, 90k tbc
Stream #0:1(eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 254 kb/s
Stream #0:2(dan): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:3(fin): Subtitle: dvb_subtitle (dvbsub), 1920x1080 (default)
Metadata:
encoder : Lavc58.62.100 dvbsub
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Stream #0:2 -> #0:2 (copy)
Stream #1:0 -> #0:3 (dvd_subtitle (dvdsub) -> dvb_subtitle (dvbsub))
Press [q] to stop, [?] for help
No more output streams to write to, finishing.me=01:51:46.51 bitrate=7990.2kbits/s speed=18.2x
frame=167862 fps=456 q=-1.0 Lsize= 6558750kB time=01:51:54.47 bitrate=8002.0kbits/s speed=18.2x
video:5738580kB audio:212004kB subtitle:10989kB other streams:0kB global headers:0kB muxing overhead: 10.017118%
Input file #0 (TEMP1.ts):
Input stream #0:0 (video): 167862 packets read (5876305439 bytes);
Input stream #0:1 (audio): 314742 packets read (217092443 bytes);
Input stream #0:2 (subtitle): 1740 packets read (5578504 bytes);
Total: 484344 packets (6098976386 bytes) demuxed
Input file #1 (out.fi.idx):
Input stream #1:0 (subtitle): 855 packets read (6881158 bytes); 854 frames decoded;
Total: 855 packets (6881158 bytes) demuxed
Output file #0 (TEMP2.ts):
Output stream #0:0 (video): 167862 packets muxed (5876305439 bytes);
Output stream #0:1 (audio): 314742 packets muxed (217092443 bytes);
Output stream #0:2 (subtitle): 1740 packets muxed (5578504 bytes);
Output stream #0:3 (subtitle): 1708 frames encoded; 1708 packets muxed (5673736 bytes);
Total: 486052 packets (6104650122 bytes) muxed
[AVIOContext @ 000002bf7463c280] Statistics: 0 seeks, 25621 writeouts
[AVIOContext @ 000002bf74613f80] Statistics: 6728300448 bytes read, 2 seeks
[AVIOContext @ 000002bf75efde40] Statistics: 7852032 bytes read, 0 seeks
[AVIOContext @ 000002bf74f30e40] Statistics: 40275 bytes read, 0 seeksSo i have video/audio and two dvb tracks inside one TS.
Now im adding third subtitle and i get this warning :
frame=32351 fps=869 q=-1.0 size= 1255936kB time=00:21:33.99 bitrate=7951.1kbits/s speed=34.8x
[mpegts @ 0x2994600] Non-monotonous DTS in output stream 0:3; previous: 116868609, current: 116868607; changing to 116868610. This may result in incorrect timestamps in the output file.
frame=33416 fps=886 q=-1.0 size= 1297408kB time=00:22:16.56 bitrate=7952.0kbits/s speed=35.4xBy this warning it seems that something is not right with DVB (0:3) Finish track.
Playing back the file with VLC i can see that Finish subtitles (between 21:33 and 22:16) are not showing up.Dumping packets from 0:3 track i see that 4 packets have the same DTS/PTS values.
#stream#, dts, pts, duration, size, hash
0, 111258000, 111258000, 0, 6979, 6215f060, S=1, 1, 67d220bc
0, 111689100, 111689100, 0, 25, e60e94fa, S=1, 1, 67d220bc
0, 113230800, 113230800, 0, 4423, f811be62, S=1, 1, 67d220bc
0, 113561550, 113561550, 0, 25, 6db8d81f, S=1, 1, 67d220bc
0, 113788800, 113788800, 0, 8247, 8b494779, S=1, 1, 67d220bc
0, 114191190, 114191190, 0, 25, a205e183, S=1, 1, 67d220bc
0, 116868607, 116868607, 0, 1119, e5d11188, S=1, 1, 67d220bc
0, 116868607, 116868607, 0, 28, 11e09861, S=1, 1, 67d220bc
0, 116868607, 116868607, 0, 1122, 8320a3f5, S=1, 1, 67d220bc
0, 116868607, 116868607, 0, 28, e896fa37, S=1, 1, 67d220bc
0, 117205200, 117205200, 0, 3583, 47b23f27, S=1, 1, 67d220bc
0, 117611640, 117611640, 0, 25, e5ae32ed, S=1, 1, 67d220bc
0, 117709200, 117709200, 0, 1119, 208b4f80, S=1, 1, 67d220bc
0, 117830970, 117830970, 0, 25, 2a130b71, S=1, 1, 67d220bc
0, 117846000, 117846000, 0, 3105, f179a4f0, S=1, 1, 67d220bc
0, 118148040, 118148040, 0, 25, 29b3ad66, S=1, 1, 67d220bc
0, 120146410, 120146410, 0, 1119, 714ef5d1, S=1, 1, 67d220bc
0, 120146410, 120146410, 0, 28, bbad7fed, S=1, 1, 67d220bc
0, 120708000, 120708000, 0, 2060, 703084f7, S=1, 1, 67d220bc
0, 120855420, 120855420, 0, 25, 6db8d81f, S=1, 1, 67d220bc
0, 121122000, 121122000, 0, 2184, 04a7be71, S=1, 1, 67d220bc
0, 121395330, 121395330, 0, 25, a205e183, S=1, 1, 67d220bcThes are the lines from SRT file where the warning happens :
146
00:21:34,840 --> 00:21:36,600
Make!
147
00:21:42,280 --> 00:21:46,800
Make! Hei, Make. Make!
148
00:21:47,880 --> 00:21:49,240
Make!
149
00:21:49,400 --> 00:21:52,760
Odota minua, Make!
150
00:22:00,400 --> 00:22:01,760
Make!Sometimes muxing subtitles in different order (for example Finish before Danish and then Swedish) would solve this problem, but i would like to know why such things are happening.
-
FFmpeg recording works on one laptop but not the other
30 novembre 2019, par Jason TThe following command :
ffmpeg -f dshow -framerate 30 -video_size 640x480 -i video="HD Pro Webcam C920" out.mp4
works on one laptop (with C920 LogiTech camera) (Im calling it GOOD LAPTOP). It outputs a recorded video. But it will fail on another laptop (called BAD LAPTOP) and by fail on another I mean - it doesnt output a video (see below for output).
The suggestions are to change parameters based on the specific error that occur on BAD LAPTOP. I have tried many different suggestions but they dont seem to work. Furthermore, they dont provide much insight into the underlying cause of the problem.
Ive used the same camera on both laptops. Im using static windows binaries downloaded from FFmpeg web-site (veranoe). Please note the versions used below were different but that doesnt appear to matter.
Trying to diagnose. Anyone have an idea of where the problem may lie. It seems to indicate a problem at the level of the system / camera setup.
Please note that I’ve updated BAD LAPTOP but still no dice. Also please note that Ive tried this on several systems already and it seems to run ok (i.e., produce an output video)
BAD LAPTOP :
$ ffmpeg -y -f dshow -framerate 30 -video_size 640x480 -t 10 -i video="HD Pro Webcam C920" out.mp4
ffmpeg version git-2019-11-26-59d264b Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9.2.1 (GCC) 20191125
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
libavutil 56. 36.100 / 56. 36.100
libavcodec 58. 62.100 / 58. 62.100
libavformat 58. 35.100 / 58. 35.100
libavdevice 58. 9.101 / 58. 9.101
libavfilter 7. 67.100 / 7. 67.100
libswscale 5. 6.100 / 5. 6.100
libswresample 3. 6.100 / 3. 6.100
libpostproc 55. 6.100 / 55. 6.100
Input #0, dshow, from 'video=HD Pro Webcam C920':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 640x480, 30 fps, 30 tbr, 10000k tbn, 10000k tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
Press [q] to stop, [?] for help
video=HD Pro Webcam C920: I/O error
[libx264 @ 06cb7a00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 06cb7a00] profile High 4:2:2, level 3.0, 4:2:2, 8-bit
[libx264 @ 06cb7a00] 264 - core 158 - H.264/MPEG-4 AVC codec - Copyleft 2003-2019 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'out.mp4':
Metadata:
encoder : Lavf58.35.100
Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv422p, 640x480, q=-1--1, 30 fps, 10000k tbn, 30 tbc
Metadata:
encoder : Lavc58.62.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
frame= 0 fps=0.0 q=0.0 Lsize= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknownGOOD LAPTOP :
$ ffmpeg -y -f dshow -framerate 30 -video_size 640x480 -t 10 -i video="Logitech HD Pro Webcam C920" out.mp4
ffmpeg version N-92780-gbb586a9703 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 8.2.1 (GCC) 20181201
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-ico
nv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --en
able-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-lib
soxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx
264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvi
dstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enabl
e-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enab
le-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
libavutil 56. 25.100 / 56. 25.100
libavcodec 58. 42.104 / 58. 42.104
libavformat 58. 25.100 / 58. 25.100
libavdevice 58. 6.101 / 58. 6.101
libavfilter 7. 46.101 / 7. 46.101
libswscale 5. 4.100 / 5. 4.100
libswresample 3. 4.100 / 3. 4.100
libpostproc 55. 4.100 / 55. 4.100
Input #0, dshow, from 'video=Logitech HD Pro Webcam C920':
Duration: N/A, start: 35609.500000, bitrate: N/A
Stream #0:0: Video: mjpeg (Baseline) (MJPG / 0x47504A4D), yuvj422p(pc, bt470bg/unknown/unknown), 640x480,
30 fps, 30 tbr, 10000k tbn, 10000k tbc
Stream mapping:
Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 000001ec0b750100] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 000001ec0b750100] profile High 4:2:2, level 3.0, 4:2:2, 8-bit
[libx264 @ 000001ec0b750100] 264 - core 157 r2935 545de2f - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http
://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 ps
y_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma
_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 con
strained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 k
eyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69
qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'out.mp4':
Metadata:
encoder : Lavf58.25.100
Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuvj422p(pc), 640x480, q=-1--1, 30 fps, 10000k tbn
, 30 tbc
Metadata:
encoder : Lavc58.42.104 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
frame= 62 fps= 31 q=29.0 size= 0kB time=00:00:00.10 bitrate= 3.8kbits/s dup=1 drop=0 speed=0.0495x
frame= 77 fps= 30 q=29.0 size= 0kB time=00:00:00.60 bitrate= 0.6kbits/s dup=1 drop=0 speed=0.237x
frame= 92 fps= 30 q=29.0 size= 0kB time=00:00:01.09 bitrate= 0.3kbits/s dup=1 drop=0 speed=0.363x
frame= 107 fps= 30 q=29.0 size= 0kB time=00:00:01.59 bitrate= 0.2kbits/s dup=1 drop=0 speed=0.453x
frame= 168 fps= 30 q=29.0 size= 256kB time=00:00:03.63 bitrate= 577.3kbits/s dup=1 drop=0 speed=0.654x
frame= 183 fps= 30 q=29.0 size= 256kB time=00:00:04.13 bitrate= 507.5kbits/s dup=1 drop=0 speed=0.683x
frame= 198 fps= 30 q=29.0 size= 256kB time=00:00:04.63 bitrate= 452.7kbits/s dup=1 drop=0 speed=0.706x
frame= 213 fps= 30 q=29.0 size= 512kB time=00:00:05.13 bitrate= 817.1kbits/s dup=1 drop=0 speed=0.727x
frame= 228 fps= 30 q=29.0 size= 512kB time=00:00:05.63 bitrate= 744.6kbits/s dup=1 drop=0 speed=0.744x
frame= 243 fps= 30 q=29.0 size= 512kB time=00:00:06.13 bitrate= 683.9kbits/s dup=1 drop=0 speed=0.759x
frame= 259 fps= 30 q=29.0 size= 512kB time=00:00:06.66 bitrate= 629.2kbits/s dup=1 drop=0 speed=0.777x
frame= 274 fps= 30 q=29.0 size= 512kB time=00:00:07.16 bitrate= 585.3kbits/s dup=1 drop=0 speed=0.789x
frame= 289 fps= 30 q=29.0 size= 512kB time=00:00:07.66 bitrate= 547.1kbits/s dup=1 drop=0 speed=0.799x
frame= 301 fps= 30 q=-1.0 Lsize= 973kB time=00:00:09.93 bitrate= 802.7kbits/s dup=1 drop=0 speed=0.975x
video:969kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.445649%
[libx264 @ 000001ec0b750100] frame I:4 Avg QP:24.23 size: 13237
[libx264 @ 000001ec0b750100] frame P:77 Avg QP:24.67 size: 7807
[libx264 @ 000001ec0b750100] frame B:220 Avg QP:26.09 size: 1534
[libx264 @ 000001ec0b750100] consecutive B-frames: 2.3% 0.7% 0.0% 97.0%
[libx264 @ 000001ec0b750100] mb I I16..4: 19.6% 70.5% 9.9%
[libx264 @ 000001ec0b750100] mb P I16..4: 3.6% 3.3% 0.3% P16..4: 54.9% 11.7% 9.5% 0.0% 0.0% skip:16
.8%
[libx264 @ 000001ec0b750100] mb B I16..4: 0.1% 0.2% 0.0% B16..8: 28.2% 1.1% 0.2% direct: 7.9% skip:62
.2% L0:51.0% L1:45.9% BI: 3.1%
[libx264 @ 000001ec0b750100] 8x8 transform intra:56.1% inter:69.3%
[libx264 @ 000001ec0b750100] coded y,uvDC,uvAC intra: 35.2% 85.0% 30.8% inter: 9.3% 38.8% 1.5%
[libx264 @ 000001ec0b750100] i16 v,h,dc,p: 32% 34% 8% 27%
[libx264 @ 000001ec0b750100] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 33% 18% 28% 2% 3% 5% 3% 5% 3%
[libx264 @ 000001ec0b750100] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 40% 19% 8% 3% 6% 11% 4% 6% 3%
[libx264 @ 000001ec0b750100] i8c dc,h,v,p: 48% 16% 31% 5%
[libx264 @ 000001ec0b750100] Weighted P-Frames: Y:3.9% UV:1.3%
[libx264 @ 000001ec0b750100] ref P L0: 39.0% 6.6% 38.0% 16.3% 0.1%
[libx264 @ 000001ec0b750100] ref B L0: 61.8% 30.3% 7.9%
[libx264 @ 000001ec0b750100] ref B L1: 84.4% 15.6%
[libx264 @ 000001ec0b750100] kb/s:790.62 -
FFmpeg media info incorrect when encoding aac audio track
11 janvier 2023, par user2028936I recently dipped my feet into encoding with FFmpeg. It's been working fine for me apart form 1 issues I have noticed recently. When I try and re-encode an audio track to acc the media info tags are somewhat wrong. Bitrate, streamsize etc seems to be copied form the source as opposed to reading it from the new track.



Essentially I want to copy the source video, audio and subtitles and also create an AAC version of the soundtrack for playback on devices that don't support HD audio.



Below is an example of what I am doing :



ffmpeg -i source.mkv -map_chapters 0 -map 0:v -c:v copy -c:s copy -map 0:a -c:a:0 copy -map 0:a c:a:1 aac destination.mkv




This results in a media info of :



Audio #1
ID : 2
Format : MLP FBA 16-ch
Format/Info : Meridian Lossless Packing FBA with 16-channel presentation
Commercial name : Dolby TrueHD with Dolby Atmos
Codec ID : A_TRUEHD
Duration : 1 h 50 min
Bit rate mode : Variable
Bit rate : 3 545 kb/s
Maximum bit rate : 5 826 kb/s
Channel(s) : 8 channels
Channel layout : L R C LFE Ls Rs Lb Rb
Sampling rate : 48.0 kHz
Frame rate : 1 200.000 FPS (40 SPF)
Bit depth : 24 bits
Compression mode : Lossless
Delay relative to video : 21 ms
Stream size : 2.73 GiB (29%)
Title : Dolby TrueHD 7.1 (Atmos)
Language : English
Default : Yes
Forced : No
Number of dynamic objects : 11
Bed channel count : 1 channel
Bed channel configuration : LFE

Audio #2
ID : 3
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : A_AAC-2
Duration : 1 h 50 min
Bit rate : 3 545 kb/s
Channel(s) : 8 channels
Channel layout : C L R Ls Rs Lb Rb LFE
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 2.73 GiB (29%)
Title : AAC 5.1
Writing library : Lavc58.62.100 aac
Language : English
Default : Yes
Forced : No




As you can see the bit rate, stream size, etc is copied from the source track which is incorrect. I've tried the -map_metadata -1 but that removes the metadata without creating a new one and also removed it from all video and audio tracks which I don't want.



Any other ideas what I am doing wrong or is this just a quirk of the software ?



Thanks in advance.



Adding -report output trimming the lines "Writing block of size..." as the file is huge :



ffmpeg started on 2019-12-04 at 14:31:25
Report written to "ffmpeg-20191204-143125.log"
Log level: 48
Command line:
"C:\\ffmpeg\\ffmpeg-20191118-d831edc-win64-static\\bin\\ffmpeg" -i input.mkv -report -map_chapters 0 -map 0:v -c:v copy -c:s copy -map 0:a -c:a:0 copy -map 0:a -c:a:1 aac destination.mkv
ffmpeg version git-2019-11-18-d831edc Copyright (c) 2000-2019 the FFmpeg developers
 built with gcc 9.2.1 (GCC) 20191010
 configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
 libavutil 56. 36.100 / 56. 36.100
 libavcodec 58. 62.100 / 58. 62.100
 libavformat 58. 35.100 / 58. 35.100
 libavdevice 58. 9.101 / 58. 9.101
 libavfilter 7. 66.100 / 7. 66.100
 libswscale 5. 6.100 / 5. 6.100
 libswresample 3. 6.100 / 3. 6.100
 libpostproc 55. 6.100 / 55. 6.100
Splitting the commandline.
Reading option '-i' ... matched as input url with argument 'input.mkv'.
Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'.
Reading option '-map_chapters' ... matched as option 'map_chapters' (set chapters mapping) with argument '0'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:v'.
Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'copy'.
Reading option '-c:s' ... matched as option 'c' (codec name) with argument 'copy'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:a'.
Reading option '-c:a:0' ... matched as option 'c' (codec name) with argument 'copy'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:a'.
Reading option '-c:a:1' ... matched as option 'c' (codec name) with argument 'aac'.
Reading option 'destination.mkv' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option report (generate a report) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input url input.mkv.
Successfully parsed a group of options.
Opening an input file: input.mkv.
[NULL @ 000001b290ddad00] Opening 'input.mkv' for reading
[file @ 000001b290ddbe00] Setting default whitelist 'file,crypto'
[matroska,webm @ 000001b290ddad00] Format matroska,webm probed with size=2048 and score=100
st:0 removing common factor 1000000 from timebase
st:1 removing common factor 1000000 from timebase
[matroska,webm @ 000001b290ddad00] Before avformat_find_stream_info() pos: 5080 bytes read:32768 seeks:0 nb_streams:2
[hevc @ 000001b290ddeb80] nal_unit_type: 32(VPS), nuh_layer_id: 0, temporal_id: 0
[hevc @ 000001b290ddeb80] Decoding VPS
[hevc @ 000001b290ddeb80] Main 10 profile bitstream
[hevc @ 000001b290ddeb80] nal_unit_type: 33(SPS), nuh_layer_id: 0, temporal_id: 0
[hevc @ 000001b290ddeb80] Decoding SPS
[hevc @ 000001b290ddeb80] Main 10 profile bitstream
[hevc @ 000001b290ddeb80] Decoding VUI
[hevc @ 000001b290ddeb80] nal_unit_type: 34(PPS), nuh_layer_id: 0, temporal_id: 0
[hevc @ 000001b290ddeb80] Decoding PPS
[hevc @ 000001b290ddeb80] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0, temporal_id: 0
[hevc @ 000001b290ddeb80] Decoding SEI
[hevc @ 000001b290ddeb80] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0, temporal_id: 0
[hevc @ 000001b290ddeb80] Decoding SEI
[hevc @ 000001b290ddeb80] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0, temporal_id: 0
[hevc @ 000001b290ddeb80] Decoding SEI
[hevc @ 000001b290ddeb80] Skipped PREFIX SEI 5
[matroska,webm @ 000001b290ddad00] All info found
[matroska,webm @ 000001b290ddad00] After avformat_find_stream_info() pos: 10219 bytes read:32768 seeks:0 frames:4
Input #0, matroska,webm, from 'input.mkv':
 Metadata:
 title : input
 ENCODER : Lavf58.35.100
 Duration: 01:50:06.89, start: 0.000000, bitrate: 11569 kb/s
 Chapter #0:0: start 0.000000, end 308.766792
 Metadata:
 title : Chapter 01
 Chapter #0:1: start 308.766792, end 679.720708
 Metadata:
 title : Chapter 02
 Chapter #0:2: start 679.720708, end 904.820583
 Metadata:
 title : Chapter 03
 Chapter #0:3: start 904.820583, end 1282.781500
 Metadata:
 title : Chapter 04
 Chapter #0:4: start 1282.781500, end 1487.736250
 Metadata:
 title : Chapter 05
 Chapter #0:5: start 1487.736250, end 1846.177667
 Metadata:
 title : Chapter 06
 Chapter #0:6: start 1846.177667, end 2116.531083
 Metadata:
 title : Chapter 07
 Chapter #0:7: start 2116.531083, end 2443.858083
 Metadata:
 title : Chapter 08
 Chapter #0:8: start 2443.858083, end 2731.979250
 Metadata:
 title : Chapter 09
 Chapter #0:9: start 2731.979250, end 3178.383542
 Metadata:
 title : Chapter 10
 Chapter #0:10: start 3178.383542, end 3636.507875
 Metadata:
 title : Chapter 11
 Chapter #0:11: start 3636.507875, end 3867.488625
 Metadata:
 title : Chapter 12
 Chapter #0:12: start 3867.488625, end 4208.037167
 Metadata:
 title : Chapter 13
 Chapter #0:13: start 4208.037167, end 4502.372875
 Metadata:
 title : Chapter 14
 Chapter #0:14: start 4502.372875, end 4853.431917
 Metadata:
 title : Chapter 15
 Chapter #0:15: start 4853.431917, end 5267.470542
 Metadata:
 title : Chapter 16
 Chapter #0:16: start 5267.470542, end 5543.329458
 Metadata:
 title : Chapter 17
 Chapter #0:17: start 5543.329458, end 5847.132958
 Metadata:
 title : Chapter 18
 Chapter #0:18: start 5847.132958, end 6150.269125
 Metadata:
 title : Chapter 19
 Chapter #0:19: start 6150.269125, end 6606.891958
 Metadata:
 title : Chapter 20
 Stream #0:0, 3, 1/1000: Video: hevc (Main 10), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x1600 [SAR 1:1 DAR 12:5], 23.98 fps, 23.98 tbr, 1k tbn, 23.98 tbc
 Metadata:
 title : input
 ENCODER : Lavc58.62.100 libx265
 DURATION : 01:50:06.891000000
 Stream #0:1(eng), 1, 1/1000: Audio: truehd, 48000 Hz, 7.1, s32 (24 bit) (default)
 Metadata:
 title : input
 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
 BPS-eng : 3544728
 DURATION-eng : 01:50:06.893000000
 NUMBER_OF_FRAMES-eng: 7928271
 NUMBER_OF_BYTES-eng: 2927455224
 _STATISTICS_WRITING_APP-eng: mkvmerge v40.0.0 ('Old Town Road + Pony') 64-bit
 _STATISTICS_WRITING_DATE_UTC-eng: 2019-11-30 10:59:25
 DURATION : 01:50:06.893000000
Successfully opened the file.
Parsing a group of options: output url destination.mkv.
Applying option map_chapters (set chapters mapping) with argument 0.
Applying option map (set input stream mapping) with argument 0:v.
Applying option c:v (codec name) with argument copy.
Applying option c:s (codec name) with argument copy.
Applying option map (set input stream mapping) with argument 0:a.
Applying option c:a:0 (codec name) with argument copy.
Applying option map (set input stream mapping) with argument 0:a.
Applying option c:a:1 (codec name) with argument aac.
Successfully parsed a group of options.
Opening an output file: destination.mkv.
[file @ 000001b290ea7e40] Setting default whitelist 'file,crypto'
Successfully opened the file.
Stream mapping:
 Stream #0:0 -> #0:0 (copy)
 Stream #0:1 -> #0:1 (copy)
 Stream #0:1 -> #0:2 (truehd (native) -> aac (native))
Press [q] to stop, [?] for help
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:1 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:2 (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:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:1 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:2 (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:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:1 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:2 (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:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:1 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:2 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
detected 12 logical cores
[graph_0_in_0_1 @ 000001b290dda840] Setting 'time_base' to value '1/48000'
[graph_0_in_0_1 @ 000001b290dda840] Setting 'sample_rate' to value '48000'
[graph_0_in_0_1 @ 000001b290dda840] Setting 'sample_fmt' to value 's32'
[graph_0_in_0_1 @ 000001b290dda840] Setting 'channel_layout' to value '0x63f'
[graph_0_in_0_1 @ 000001b290dda840] tb:1/48000 samplefmt:s32 samplerate:48000 chlayout:0x63f
[format_out_0_2 @ 000001b290e0ea00] Setting 'sample_fmts' to value 'fltp'
[format_out_0_2 @ 000001b290e0ea00] Setting 'sample_rates' to value '96000|88200|64000|48000|44100|32000|24000|22050|16000|12000|11025|8000|7350'
[format_out_0_2 @ 000001b290e0ea00] auto-inserting filter 'auto_resampler_0' between the filter 'Parsed_anull_0' and the filter 'format_out_0_2'
[AVFilterGraph @ 000001b290e1b3c0] query_formats: 4 queried, 6 merged, 3 already done, 0 delayed
[auto_resampler_0 @ 000001b290e0fe80] [SWR @ 000001b291232000] Using fltp internally between filters
[auto_resampler_0 @ 000001b290e0fe80] ch:8 chl:7.1 fmt:s32 r:48000Hz -> ch:8 chl:7.1 fmt:fltp r:48000Hz
[matroska @ 000001b290dfba40] get_metadata_duration returned: 6606893000
[matroska @ 000001b290dfba40] Write early duration from metadata = 6606893
Output #0, matroska, to 'destination.mkv':
 Metadata:
 title : input
 encoder : Lavf58.35.100
 Chapter #0:0: start 0.000000, end 308.766792
 Metadata:
 title : Chapter 01
 Chapter #0:1: start 308.766792, end 679.720708
 Metadata:
 title : Chapter 02
 Chapter #0:2: start 679.720708, end 904.820583
 Metadata:
 title : Chapter 03
 Chapter #0:3: start 904.820583, end 1282.781500
 Metadata:
 title : Chapter 04
 Chapter #0:4: start 1282.781500, end 1487.736250
 Metadata:
 title : Chapter 05
 Chapter #0:5: start 1487.736250, end 1846.177667
 Metadata:
 title : Chapter 06
 Chapter #0:6: start 1846.177667, end 2116.531083
 Metadata:
 title : Chapter 07
 Chapter #0:7: start 2116.531083, end 2443.858083
 Metadata:
 title : Chapter 08
 Chapter #0:8: start 2443.858083, end 2731.979250
 Metadata:
 title : Chapter 09
 Chapter #0:9: start 2731.979250, end 3178.383542
 Metadata:
 title : Chapter 10
 Chapter #0:10: start 3178.383542, end 3636.507875
 Metadata:
 title : Chapter 11
 Chapter #0:11: start 3636.507875, end 3867.488625
 Metadata:
 title : Chapter 12
 Chapter #0:12: start 3867.488625, end 4208.037167
 Metadata:
 title : Chapter 13
 Chapter #0:13: start 4208.037167, end 4502.372875
 Metadata:
 title : Chapter 14
 Chapter #0:14: start 4502.372875, end 4853.431917
 Metadata:
 title : Chapter 15
 Chapter #0:15: start 4853.431917, end 5267.470542
 Metadata:
 title : Chapter 16
 Chapter #0:16: start 5267.470542, end 5543.329458
 Metadata:
 title : Chapter 17
 Chapter #0:17: start 5543.329458, end 5847.132958
 Metadata:
 title : Chapter 18
 Chapter #0:18: start 5847.132958, end 6150.269125
 Metadata:
 title : Chapter 19
 Chapter #0:19: start 6150.269125, end 6606.891958
 Metadata:
 title : Chapter 20
 Stream #0:0, 0, 1/1000: Video: hevc (Main 10), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x1600 [SAR 1:1 DAR 12:5], q=2-31, 23.98 fps, 23.98 tbr, 1k tbn, 1k tbc
 Metadata:
 title : input
 ENCODER : Lavc58.62.100 libx265
 DURATION : 01:50:06.891000000
 Stream #0:1(eng), 0, 1/1000: Audio: truehd ([255][255][255][255] / 0xFFFFFFFF), 48000 Hz, 7.1, s32 (24 bit) (default)
 Metadata:
 title : input
 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
 BPS-eng : 3544728
 DURATION-eng : 01:50:06.893000000
 NUMBER_OF_FRAMES-eng: 7928271
 NUMBER_OF_BYTES-eng: 2927455224
 _STATISTICS_WRITING_APP-eng: mkvmerge v40.0.0 ('Old Town Road + Pony') 64-bit
 _STATISTICS_WRITING_DATE_UTC-eng: 2019-11-30 10:59:25
 DURATION : 01:50:06.893000000
 Stream #0:2(eng), 0, 1/1000: Audio: aac (LC) ([255][0][0][0] / 0x00FF), 48000 Hz, 7.1, fltp (24 bit), 469 kb/s (default)
 Metadata:
 title : input
 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
 BPS-eng : 3544728
 DURATION-eng : 01:50:06.893000000
 NUMBER_OF_FRAMES-eng: 7928271
 NUMBER_OF_BYTES-eng: 2927455224
 _STATISTICS_WRITING_APP-eng: mkvmerge v40.0.0 ('Old Town Road + Pony') 64-bit
 _STATISTICS_WRITING_DATE_UTC-eng: 2019-11-30 10:59:25
 DURATION : 01:50:06.893000000
 encoder : Lavc58.62.100 aac
cur_dts is invalid st:2 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)

....................
....................
[matroska @ 000001b290dfba40] Writing block of size 168 with pts 6606913, dts 6606913, duration 1 at relative offset 550755 in cluster at offset 9940898622. TrackNumber 2, keyframe 1
[matroska @ 000001b290dfba40] end duration = 6606914
[matroska @ 000001b290dfba40] stream 0 end duration = 6606912
[matroska @ 000001b290dfba40] stream 1 end duration = 6606914
[matroska @ 000001b290dfba40] stream 2 end duration = 6606914
frame=158407 fps=357 q=-1.0 Lsize= 9708475kB time=01:50:06.91 bitrate=12037.7kbits/s speed=14.9x 
video:6416483kB audio:3234397kB subtitle:0kB other streams:0kB global headers:2kB muxing overhead: 0.596787%
Input file #0 (input.mkv):
 Input stream #0:0 (video): 158407 packets read (6570478730 bytes); 
 Input stream #0:1 (audio): 7928271 packets read (2927455224 bytes); 7928271 frames decoded (317130840 samples); 
 Total: 8086678 packets (9497933954 bytes) demuxed
Output file #0 (destination.mkv):
 Output stream #0:0 (video): 158407 packets muxed (6570478730 bytes); 
 Output stream #0:1 (audio): 7928271 packets muxed (2927455224 bytes); 
 Output stream #0:2 (audio): 309699 frames encoded (317130840 samples); 309700 packets muxed (384567176 bytes); 
 Total: 8396378 packets (9882501130 bytes) muxed
7928271 frames successfully decoded, 0 decoding errors
[AVIOContext @ 000001b291230100] Statistics: 8 seeks, 39676 writeouts
[aac @ 000001b290dff3c0] Qavg: 3839.668
[AVIOContext @ 000001b290de4080] Statistics: 9554742230 bytes read, 0 seeks