
Recherche avancée
Autres articles (81)
-
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...) -
Les sons
15 mai 2013, par -
Soumettre bugs et patchs
10 avril 2011Un logiciel n’est malheureusement jamais parfait...
Si vous pensez avoir mis la main sur un bug, reportez le dans notre système de tickets en prenant bien soin de nous remonter certaines informations pertinentes : le type de navigateur et sa version exacte avec lequel vous avez l’anomalie ; une explication la plus précise possible du problème rencontré ; si possibles les étapes pour reproduire le problème ; un lien vers le site / la page en question ;
Si vous pensez avoir résolu vous même le bug (...)
Sur d’autres sites (5905)
-
How do I change audio language using ffmpeg in video files contaning two or more audio tracks
19 mai 2020, par warezsoftwarezI am transcoding video files, that contain 2 audio tracks - Polish and English. Unfortunately my transcoder messes somehow with metadata, and at the output, when I'm checking video file using MediaInfo, i see that both audio tracks are described as English. I'd like to change description of 1st audio track to Polish, so accordingly to ffmpeg documentation :



To set the language of the first audio stream:
ffmpeg -i INPUT -metadata:s:a:0 language=eng OUTPUT




Unfortunately, running command :



ffmpeg -i INPUTPATH -metadata:s:a:0 language=pol OUTPUTPATH




to overwrite input file resulted in saving file thats size is 63KB but it is described as Polish audio (no second audio track - English somehow was deleted)



When I used this command, to save output file as another file, to avoid overwriting if something misses (which is current situation), but using parameter
-metadata:s:a:4
because I thought that maybe I'm reading metadata from ffmpeg incorrectly, it resulted in saving output file as 800Mb with only English (no Polish track).


I don't know what should I change in this command to run as I want it to - just changing metadata of first audio track language to Polish.



Here is full ffmpeg output :



C:\Users\user>ffmpeg -i F:\Path\33244813_6000_1_trailer.mp4 -metadata:s:a:4 language=pol F:\Path\testtest.mp4
ffmpeg version N-91931-gb69ea742ab Copyright (c) 2000-2018 the FFmpeg developers
 built with gcc 8.2.1 (GCC) 20180813
 configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enabl
e-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amr
wb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enab
le-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-amf --enable-ffnvcodec --e
nable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
 libavutil 56. 19.101 / 56. 19.101
 libavcodec 58. 30.100 / 58. 30.100
 libavformat 58. 18.100 / 58. 18.100
 libavdevice 58. 4.103 / 58. 4.103
 libavfilter 7. 29.100 / 7. 29.100
 libswscale 5. 2.100 / 5. 2.100
 libswresample 3. 2.100 / 3. 2.100
 libpostproc 55. 2.100 / 55. 2.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'F:\Path\33244813_6000_1_trailer.mp4':
 Metadata:
 major_brand : isom
 minor_version : 1
 compatible_brands: isom
 creation_time : 2020-04-22T16:18:04.000000Z
 Duration: 00:40:39.12, start: 0.000000, bitrate: 8848 kb/s
 Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], Closed C
aptions, 5068 kb/s, 25 fps, 25 tbr, 120k tbn, 50 tbc (default)
 Metadata:
 creation_time : 2020-04-22T16:18:04.000000Z
 handler_name : Video
 Stream #0:1(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], Closed C
aptions, 1857 kb/s, 25 fps, 25 tbr, 120k tbn, 50 tbc (default)
 Metadata:
 creation_time : 2020-04-22T16:18:04.000000Z
 handler_name : Video
 Stream #0:2(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], Closed Ca
ptions, 902 kb/s, 25 fps, 25 tbr, 120k tbn, 50 tbc (default)
 Metadata:
 creation_time : 2020-04-22T16:18:04.000000Z
 handler_name : Video
 Stream #0:3(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 640x480 [SAR 4:3 DAR 16:9], Closed Cap
tions, 628 kb/s, 25 fps, 25 tbr, 120k tbn, 50 tbc (default)
 Metadata:
 creation_time : 2020-04-22T16:18:04.000000Z
 handler_name : Video
 Stream #0:4(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 125 kb/s (default)
 Metadata:
 creation_time : 2020-04-22T16:18:04.000000Z
 handler_name : Sound
 Stream #0:5(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 253 kb/s (default)
 Metadata:
 creation_time : 2020-04-22T16:18:04.000000Z
 handler_name : Sound
Stream mapping:
 Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
 Stream #0:5 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 00000012bef91f80] using SAR=1/1
[libx264 @ 00000012bef91f80] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 00000012bef91f80] profile High, level 4.0, 4:2:0, 8-bit
[libx264 @ 00000012bef91f80] 264 - core 157 r2932 303c484 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.vid
eolan.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=34 looka
head_threads=5 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_lookah
ead=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 'F:\Path\testtest.mp4'
:
 Metadata:
 major_brand : isom
 minor_version : 1
 compatible_brands: isom
 encoder : Lavf58.18.100
 Stream #0:0(und): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 25 fps,
 12800 tbn, 25 tbc (default)
 Metadata:
 creation_time : 2020-04-22T16:18:04.000000Z
 handler_name : Video
 encoder : Lavc58.30.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
 Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 341 kb/s (default)
 Metadata:
 creation_time : 2020-04-22T16:18:04.000000Z
 handler_name : Sound
 encoder : Lavc58.30.100 aac
frame=60981 fps= 84 q=-1.0 Lsize= 816313kB time=00:40:39.12 bitrate=2741.7kbits/s dup=3 drop=0 speed=3.36x
video:713292kB audio:101322kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.208512%
[libx264 @ 00000012bef91f80] frame I:769 Avg QP:16.36 size: 46713
[libx264 @ 00000012bef91f80] frame P:37125 Avg QP:19.81 size: 15059
[libx264 @ 00000012bef91f80] frame B:23087 Avg QP:21.11 size: 5866
[libx264 @ 00000012bef91f80] consecutive B-frames: 40.4% 24.0% 10.2% 25.5%
[libx264 @ 00000012bef91f80] mb I I16..4: 40.3% 58.0% 1.7%
[libx264 @ 00000012bef91f80] mb P I16..4: 6.2% 12.5% 0.1% P16..4: 29.8% 3.7% 2.7% 0.0% 0.0% skip:45.0%
[libx264 @ 00000012bef91f80] mb B I16..4: 1.0% 1.7% 0.0% B16..8: 27.9% 1.1% 0.1% direct: 2.0% skip:66.2% L0:49
.4% L1:49.3% BI: 1.3%
[libx264 @ 00000012bef91f80] 8x8 transform intra:65.3% inter:95.1%
[libx264 @ 00000012bef91f80] coded y,uvDC,uvAC intra: 24.7% 39.7% 3.2% inter: 7.0% 14.6% 0.0%
[libx264 @ 00000012bef91f80] i16 v,h,dc,p: 34% 26% 13% 28%
[libx264 @ 00000012bef91f80] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 15% 41% 3% 3% 4% 3% 3% 2%
[libx264 @ 00000012bef91f80] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 32% 25% 20% 3% 6% 5% 4% 3% 2%
[libx264 @ 00000012bef91f80] i8c dc,h,v,p: 58% 19% 20% 3%
[libx264 @ 00000012bef91f80] Weighted P-Frames: Y:0.1% UV:0.0%
[libx264 @ 00000012bef91f80] ref P L0: 72.2% 6.3% 15.8% 5.7% 0.0%
[libx264 @ 00000012bef91f80] ref B L0: 86.6% 11.5% 1.9%
[libx264 @ 00000012bef91f80] ref B L1: 97.6% 2.4%
[libx264 @ 00000012bef91f80] kb/s:2395.53
[aac @ 00000012bef93b00] Qavg: 471.415



-
FFMPEG - latest build doesn't work, earlier build does
21 juin 2020, par rossmcmI have been using FFMPEG to overlay coloured rectangles on a video. I updated FFMPEG and it no longer works. No error is issued, it just doesn't do the job - the resulting video is the same as the input video. Here's the script :


FFMpeg -y -i Input.mp4 -filter_complex \
 "nullsrc=size=1920x1080, \
 drawbox=x=200:y=100:w=300:h=150:t=20:c=yellow, fade=in:st=10:d=1:alpha=1, fade=out:st=20:d=2:alpha=1 [tmp1]; \ 
 nullsrc=size=1920x1080, \
 drawbox=x=240:y=140:w=300:h=150:t=20:c=red, fade=in:st=15:d=1:alpha=1, fade=out:st=25:d=2:alpha=1 [tmp2]; \
 [tmp1][tmp2] overlay=0:0:shortest=1[tmp3]; \
 [0:v][tmp3] overlay=0:0:shortest=1" \
 Output.mp4



The output video should be the input video with a yellow rectangle added from T=10 to T=20 and a red rectangle from T=15 to T=25, fading them in and out.


The version that was working (3.4) was one that came with an ImageMagick installation. The version I updated it to was 4.2.3. I tried it on various other builds I had lying around and it only works with 3.4.


It seems unlikely that this is a regression so I haven't submitted a bug report. I figure it's more likely that I'm not doing something correctly and 3.4 is more lenient on its interpretation of my command.


Whatever, I prefer to be working with a current build, so I invite comments on what the reasons might be.


Console dump of 3.4 run


ffmpeg version 3.4 Copyright (c) 2000-2017 the FFmpeg developers
 built with gcc 7.2.0 (GCC)
 configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --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-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth --enable-libmfx
 libavutil 55. 78.100 / 55. 78.100
 libavcodec 57.107.100 / 57.107.100
 libavformat 57. 83.100 / 57. 83.100
 libavdevice 57. 10.100 / 57. 10.100
 libavfilter 6.107.100 / 6.107.100
 libswscale 4. 8.100 / 4. 8.100
 libswresample 2. 9.100 / 2. 9.100
 libpostproc 54. 7.100 / 54. 7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Input.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf58.29.100
 Duration: 00:01:48.67, start: 0.000000, bitrate: 1693 kb/s
 Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 1562 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
 Metadata:
 handler_name : VideoHandler
 Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 126 kb/s (default)
 Metadata:
 handler_name : SoundHandler
Stream mapping:
 Stream #0:0 (h264) -> overlay:main (graph 0)
 overlay (graph 0) -> Stream #0:0 (libx264)
 Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 000001f0d4a0e6a0] using SAR=1/1
[libx264 @ 000001f0d4a0e6a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 000001f0d4a0e6a0] profile High, level 4.0
[libx264 @ 000001f0d4a0e6a0] 264 - core 152 r2851 ba24899 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - 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 'Output-34.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf57.83.100
 Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 30 fps, 15360 tbn, 30 tbc (default)
 Metadata:
 encoder : Lavc57.107.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
 Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
 Metadata:
 handler_name : SoundHandler
 encoder : Lavc57.107.100 aac
frame= 3260 fps= 25 q=-1.0 Lsize= 21461kB time=00:01:48.56 bitrate=1619.3kbits/s speed=0.828x
video:19713kB audio:1634kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.534457%
[libx264 @ 000001f0d4a0e6a0] frame I:14 Avg QP:17.68 size:208205
[libx264 @ 000001f0d4a0e6a0] frame P:844 Avg QP:21.55 size: 16867
[libx264 @ 000001f0d4a0e6a0] frame B:2402 Avg QP:28.40 size: 1263
[libx264 @ 000001f0d4a0e6a0] consecutive B-frames: 0.7% 2.9% 0.4% 96.0%
[libx264 @ 000001f0d4a0e6a0] mb I I16..4: 14.0% 39.6% 46.4%
[libx264 @ 000001f0d4a0e6a0] mb P I16..4: 0.4% 0.7% 0.2% P16..4: 20.2% 9.1% 4.6% 0.0% 0.0% skip:64.8%
[libx264 @ 000001f0d4a0e6a0] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 12.4% 0.4% 0.1% direct: 0.1% skip:87.1% L0:42.9% L1:55.2% BI: 1.9%
[libx264 @ 000001f0d4a0e6a0] 8x8 transform intra:45.2% inter:68.3%
[libx264 @ 000001f0d4a0e6a0] coded y,uvDC,uvAC intra: 64.4% 81.6% 45.1% inter: 2.9% 4.2% 0.1%
[libx264 @ 000001f0d4a0e6a0] i16 v,h,dc,p: 32% 26% 6% 37%
[libx264 @ 000001f0d4a0e6a0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 20% 15% 5% 6% 7% 7% 7% 8%
[libx264 @ 000001f0d4a0e6a0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 32% 28% 8% 4% 6% 6% 6% 5% 5%
[libx264 @ 000001f0d4a0e6a0] i8c dc,h,v,p: 37% 25% 28% 10%
[libx264 @ 000001f0d4a0e6a0] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 000001f0d4a0e6a0] ref P L0: 70.4% 15.3% 10.8% 3.5%
[libx264 @ 000001f0d4a0e6a0] ref B L0: 93.1% 6.0% 0.9%
[libx264 @ 000001f0d4a0e6a0] ref B L1: 97.8% 2.2%
[libx264 @ 000001f0d4a0e6a0] kb/s:1486.03
[aac @ 000001f0d4a10a20] Qavg: 1586.609



And 4.2.3


ffmpeg version 4.2.3 Copyright (c) 2000-2020 the FFmpeg developers
 built with gcc 9.3.1 (GCC) 20200523
 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-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
 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
 libswscale 5. 5.100 / 5. 5.100
 libswresample 3. 5.100 / 3. 5.100
 libpostproc 55. 5.100 / 55. 5.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Input.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf58.29.100
 Duration: 00:01:48.67, start: 0.000000, bitrate: 1693 kb/s
 Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 1562 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
 Metadata:
 handler_name : VideoHandler
 Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 126 kb/s (default)
 Metadata:
 handler_name : SoundHandler
Stream mapping:
 Stream #0:0 (h264) -> overlay:main (graph 0)
 overlay (graph 0) -> Stream #0:0 (libx264)
 Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 000001e7b4531d40] using SAR=1/1
[libx264 @ 000001e7b4531d40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 000001e7b4531d40] profile High, level 4.0, 4:2:0, 8-bit
[libx264 @ 000001e7b4531d40] 264 - core 160 - H.264/MPEG-4 AVC codec - Copyleft 2003-2020 - 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 'Output-423.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf58.29.100
 Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 30 fps, 15360 tbn, 30 tbc (default)
 Metadata:
 encoder : Lavc58.54.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
 Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
 Metadata:
 handler_name : SoundHandler
 encoder : Lavc58.54.100 aac
frame= 3260 fps= 28 q=-1.0 Lsize= 21425kB time=00:01:48.56 bitrate=1616.7kbits/s speed=0.917x
video:19686kB audio:1625kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.535352%
[libx264 @ 000001e7b4531d40] frame I:14 Avg QP:17.68 size:208355
[libx264 @ 000001e7b4531d40] frame P:844 Avg QP:21.54 size: 16838
[libx264 @ 000001e7b4531d40] frame B:2402 Avg QP:28.43 size: 1261
[libx264 @ 000001e7b4531d40] consecutive B-frames: 0.7% 2.9% 0.4% 96.0%
[libx264 @ 000001e7b4531d40] mb I I16..4: 13.9% 39.7% 46.4%
[libx264 @ 000001e7b4531d40] mb P I16..4: 0.4% 0.7% 0.2% P16..4: 20.2% 9.1% 4.6% 0.0% 0.0% skip:64.8%
[libx264 @ 000001e7b4531d40] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 12.4% 0.4% 0.1% direct: 0.1% skip:87.1% L0:42.9% L1:55.2% BI: 1.9%
[libx264 @ 000001e7b4531d40] 8x8 transform intra:45.3% inter:68.3%
[libx264 @ 000001e7b4531d40] coded y,uvDC,uvAC intra: 65.2% 82.4% 45.8% inter: 2.9% 4.2% 0.1%
[libx264 @ 000001e7b4531d40] i16 v,h,dc,p: 32% 24% 6% 38%
[libx264 @ 000001e7b4531d40] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 19% 14% 5% 6% 7% 7% 7% 8%
[libx264 @ 000001e7b4531d40] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 32% 28% 8% 4% 6% 6% 6% 5% 5%
[libx264 @ 000001e7b4531d40] i8c dc,h,v,p: 37% 24% 28% 11%
[libx264 @ 000001e7b4531d40] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 000001e7b4531d40] ref P L0: 70.4% 15.3% 10.8% 3.5%
[libx264 @ 000001e7b4531d40] ref B L0: 93.1% 6.0% 0.9%
[libx264 @ 000001e7b4531d40] ref B L1: 97.8% 2.2%
[libx264 @ 000001e7b4531d40] kb/s:1483.98
[aac @ 000001e7b47fa800] Qavg: 1462.566



-
How to copy ffprobe dumped metadata to a converted video
23 mai 2020, par QuerI hope you're all doing safe ! I'm using windows 10 and have lots of home videos, some of them are on
.AVI
format. I just discovered google photos don't backup.AVI
videos, I tried converting it with GUI converters (FormatFactory, Wondershare, HandBrake) but when I tried to back it up, it wasn't preserving the metadata of my newly converted videos.


I tried further research on this matter and I stumble upon ffmpeg (w/c the GUIs were using). I successfully converted
.MOV
while preserving metadata using :


ffmpeg -i in.MOV -b:v 73000k -c:v libx264 -c:a aac -strict -2 -map_metadata 0 out.mp4




but when I tried converting
.AVI
videos, with the command above, it doesn't retain the original metadata for theout.mp4
.


I tried another approach and I found out a method of dumping the metadata on a
.txt
then restoring it on theout.mp4
.


ffprobe -v error -show_format -show_streams DSCF0421.AVI > output.txt 2>&1




The command above does save it on the
output.txt



output.txt


[STREAM]
index=0
codec_name=mjpeg
codec_long_name=Motion JPEG
profile=Baseline
codec_type=video
codec_time_base=33333/1000000
codec_tag_string=MJPG
codec_tag=0x47504a4d
width=640
height=480
coded_width=640
coded_height=480
closed_captions=0
has_b_frames=0
sample_aspect_ratio=N/A
display_aspect_ratio=N/A
pix_fmt=yuvj422p
level=-99
color_range=pc
color_space=bt470bg
color_transfer=unknown
color_primaries=unknown
chroma_location=center
field_order=unknown
timecode=N/A
refs=1
id=N/A
r_frame_rate=1000000/33333
avg_frame_rate=1000000/33333
time_base=33333/1000000
start_pts=0
start_time=0.000000
duration_ts=150
duration=4.999950
bit_rate=9739922
max_bit_rate=N/A
bits_per_raw_sample=8
nb_frames=150
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=0
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0
TAG:Make=FUJIFILM
TAG:Model=FinePix JX550
TAG:DateTime=2012:05:20 00:25:48
TAG:JPEGInterchangeFormat= 658
TAG:JPEGInterchangeFormatLength= 2698
TAG:Copyright= 
TAG:DateTimeOriginal=2012:05:20 00:25:48
TAG:DateTimeDigitized=2012:05:20 00:25:48
TAG:MakerNote=
 uwu
TAG:title=FUJIFILM AVI STREAM 0100
[/STREAM]
[STREAM]
index=1
codec_name=pcm_u8
codec_long_name=PCM unsigned 8-bit
profile=unknown
codec_type=audio
codec_time_base=1/11024
codec_tag_string=[1][0][0][0]
codec_tag=0x0001
sample_fmt=u8
sample_rate=11024
channels=1
channel_layout=unknown
bits_per_sample=8
id=N/A
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/11024
start_pts=0
start_time=0.000000
duration_ts=N/A
duration=N/A
bit_rate=88192
max_bit_rate=N/A
bits_per_raw_sample=N/A
nb_frames=55120
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=0
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0
[/STREAM]
[FORMAT]
filename=DSCF0421.AVI
nb_streams=2
nb_programs=0
format_name=avi
format_long_name=AVI (Audio Video Interleaved)
start_time=0.000000
duration=4.999950
size=6111800
bit_rate=9778977
probe_score=100
[/FORMAT]




Then I tried restoring it with either
.mp4
or.mkv



MP4

ffmpeg -i DSCF0421.AVI -i output.txt compressed.mp4

MKV

ffmpeg -i DSCF0421.AVI -i output.txt compressed.mkv




result of the command above :



MP4



C:\Users\PandaLabs\Desktop\Conversion underground>ffmpeg -i DSCF0421.AVI -i output.txt compressed.mp4
ffmpeg version git-2020-05-22-38490cb Copyright (c) 2000-2020 the FFmpeg developers
 built with gcc 9.3.1 (GCC) 20200513
 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-libsrt --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-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
 libavutil 56. 46.100 / 56. 46.100
 libavcodec 58. 86.101 / 58. 86.101
 libavformat 58. 43.100 / 58. 43.100
 libavdevice 58. 9.103 / 58. 9.103
 libavfilter 7. 82.100 / 7. 82.100
 libswscale 5. 6.101 / 5. 6.101
 libswresample 3. 6.100 / 3. 6.100
 libpostproc 55. 6.100 / 55. 6.100
Guessed Channel Layout for Input Stream #0.1 : mono
Input #0, avi, from 'DSCF0421.AVI':
 Duration: 00:00:05.00, start: 0.000000, bitrate: 9778 kb/s
 Stream #0:0: Video: mjpeg (Baseline) (MJPG / 0x47504A4D), yuvj422p(pc, bt470bg/unknown/unknown), 640x480, 9739 kb/s, 30 fps, 30 tbr, 30 tbn, 30 tbc
 Metadata:
 Make : FUJIFILM
 Model : FinePix JX550
 DateTime : 2012:05:20 00:25:48
 JPEGInterchangeFormat: 658
 JPEGInterchangeFormatLength: 2698
 Copyright :
 DateTimeOriginal: 2012:05:20 00:25:48
 DateTimeDigitized: 2012:05:20 00:25:48
 MakerNote :
 : 70, 85, 74, 73, 70, 73, 76, 77, 12, 0, 0, 0, 18, 0, 0, 0
 : 7, 0, 4, 0, 0, 0, 48, 49, 51, 48, 16, 0, 2, 0, 33, 0
 : 0, 0, 2, 1, 0, 0, 0, 16, 2, 0, 8, 0, 0, 0, 35, 1
 : 0, 0, 1, 16, 3, 0, 1, 0, 0, 0, 3, 0, 0, 0, 2, 16
 : 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 16, 16, 3, 0, 1, 0
 : 0, 0, 2, 0, 0, 0, 17, 16, 10, 0, 1, 0, 0, 0, 43, 1
 : 0, 0, 32, 16, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 33, 16
 : 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 48, 16, 3, 0, 1, 0
 : 0, 0, 0, 0, 0, 0, 49, 16, 3, 0, 1, 0, 0, 0, 0, 0
 : 0, 0, 0, 17, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 18
 : 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 19, 3, 0, 1, 0
 : 0, 0, 0, 0, 0, 0, 1, 19, 3, 0, 1, 0, 0, 0, 0, 0
 : 0, 0, 2, 19, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 48, 20
 : 7, 0, 129, 0, 0, 0, 52, 1, 0, 0, 49, 20, 4, 0, 1, 0
 : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 : 0, 0, 53, 57, 50, 68, 51, 49, 51, 49, 51, 57, 51, 54, 51, 49
 : 49, 50, 48, 51, 49, 56, 70, 70, 69, 53, 50, 83, 80, 48, 52, 54
 : 50, 54, 0, 78, 79, 82, 77, 65, 76, 32, 0, 0, 0, 0, 0, 100
 : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 : 0, 0, 0, 0, 0, 0
 title : FUJIFILM AVI STREAM 0100
 Stream #0:1: Audio: pcm_u8 ([1][0][0][0] / 0x0001), 11024 Hz, mono, u8, 88 kb/s
Input #1, tty, from 'output.txt':
 Duration: 00:00:00.80, start: 0.000000, bitrate: 46 kb/s
 Stream #1:0: Video: ansi, pal8, 640x400, 25 fps, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
 Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
 Stream #0:1 -> #0:1 (pcm_u8 (native) -> aac (native))
Press [q] to stop, [?] for help
[aac @ 0000017c4ae758c0] Too many bits 6408.707483 > 6144 per frame requested, clamping to max
[libx264 @ 0000017c4ae65440] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0000017c4ae65440] profile High 4:2:2, level 3.0, 4:2:2, 8-bit
[libx264 @ 0000017c4ae65440] 264 - core 159 - 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 'compressed.mp4':
 Metadata:
 encoder : Lavf58.43.100
 Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuvj422p(pc), 640x480, q=-1--1, 30 fps, 1000k tbn, 30 tbc
 Metadata:
 Make : FUJIFILM
 Model : FinePix JX550
 DateTime : 2012:05:20 00:25:48
 JPEGInterchangeFormat: 658
 JPEGInterchangeFormatLength: 2698
 Copyright :
 DateTimeOriginal: 2012:05:20 00:25:48
 DateTimeDigitized: 2012:05:20 00:25:48
 MakerNote :
 : 70, 85, 74, 73, 70, 73, 76, 77, 12, 0, 0, 0, 18, 0, 0, 0
 : 7, 0, 4, 0, 0, 0, 48, 49, 51, 48, 16, 0, 2, 0, 33, 0
 : 0, 0, 2, 1, 0, 0, 0, 16, 2, 0, 8, 0, 0, 0, 35, 1
 : 0, 0, 1, 16, 3, 0, 1, 0, 0, 0, 3, 0, 0, 0, 2, 16
 : 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 16, 16, 3, 0, 1, 0
 : 0, 0, 2, 0, 0, 0, 17, 16, 10, 0, 1, 0, 0, 0, 43, 1
 : 0, 0, 32, 16, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 33, 16
 : 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 48, 16, 3, 0, 1, 0
 : 0, 0, 0, 0, 0, 0, 49, 16, 3, 0, 1, 0, 0, 0, 0, 0
 : 0, 0, 0, 17, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 18
 : 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 19, 3, 0, 1, 0
 : 0, 0, 0, 0, 0, 0, 1, 19, 3, 0, 1, 0, 0, 0, 0, 0
 : 0, 0, 2, 19, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 48, 20
 : 7, 0, 129, 0, 0, 0, 52, 1, 0, 0, 49, 20, 4, 0, 1, 0
 : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 : 0, 0, 53, 57, 50, 68, 51, 49, 51, 49, 51, 57, 51, 54, 51, 49
 : 49, 50, 48, 51, 49, 56, 70, 70, 69, 53, 50, 83, 80, 48, 52, 54
 : 50, 54, 0, 78, 79, 82, 77, 65, 76, 32, 0, 0, 0, 0, 0, 100
 : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 : 0, 0, 0, 0, 0, 0
 title : FUJIFILM AVI STREAM 0100
 encoder : Lavc58.86.101 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
 Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 11025 Hz, mono, fltp, 66 kb/s
 Metadata:
 encoder : Lavc58.86.101 aac
[mjpeg @ 0000017c4ae70fc0] mjpeg_decode_dc: bad vlc: 0:0 (0000017c4ae71688)
[mjpeg @ 0000017c4ae70fc0] error dc
[mjpeg @ 0000017c4ae70fc0] error y=59 x=39
frame= 150 fps=104 q=-1.0 Lsize= 2327kB time=00:00:05.01 bitrate=3801.3kbits/s speed=3.49x
video:2290kB audio:33kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.175157%
[libx264 @ 0000017c4ae65440] frame I:2 Avg QP:25.35 size: 24876
[libx264 @ 0000017c4ae65440] frame P:38 Avg QP:26.87 size: 18472
[libx264 @ 0000017c4ae65440] frame B:110 Avg QP:27.42 size: 14477
[libx264 @ 0000017c4ae65440] consecutive B-frames: 1.3% 2.7% 0.0% 96.0%
[libx264 @ 0000017c4ae65440] mb I I16..4: 0.2% 98.9% 0.9%
[libx264 @ 0000017c4ae65440] mb P I16..4: 0.2% 54.8% 1.2% P16..4: 29.1% 11.2% 3.4% 0.0% 0.0% skip: 0.1%
[libx264 @ 0000017c4ae65440] mb B I16..4: 0.0% 22.9% 0.1% B16..8: 40.5% 14.0% 3.0% direct:15.2% skip: 4.3% L0:45.5% L1:42.5% BI:12.0%
[libx264 @ 0000017c4ae65440] 8x8 transform intra:98.6% inter:79.9%
[libx264 @ 0000017c4ae65440] coded y,uvDC,uvAC intra: 92.1% 99.0% 74.7% inter: 60.8% 91.7% 25.7%
[libx264 @ 0000017c4ae65440] i16 v,h,dc,p: 26% 7% 12% 55%
[libx264 @ 0000017c4ae65440] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 12% 10% 40% 6% 6% 6% 5% 7% 8%
[libx264 @ 0000017c4ae65440] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22% 11% 19% 10% 9% 10% 6% 8% 5%
[libx264 @ 0000017c4ae65440] i8c dc,h,v,p: 65% 7% 23% 5%
[libx264 @ 0000017c4ae65440] Weighted P-Frames: Y:2.6% UV:2.6%
[libx264 @ 0000017c4ae65440] ref P L0: 41.3% 11.9% 27.9% 18.5% 0.4%
[libx264 @ 0000017c4ae65440] ref B L0: 75.4% 19.4% 5.2%
[libx264 @ 0000017c4ae65440] ref B L1: 89.4% 10.6%
[libx264 @ 0000017c4ae65440] kb/s:3750.61
[aac @ 0000017c4ae758c0] Qavg: 27095.141




MKV



C:\Users\PandaLabs\Desktop\Conversion underground>ffmpeg -i DSCF0421.AVI -i output.txt compressed.mkv
ffmpeg version git-2020-05-22-38490cb Copyright (c) 2000-2020 the FFmpeg developers
 built with gcc 9.3.1 (GCC) 20200513
 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-libsrt --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-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
 libavutil 56. 46.100 / 56. 46.100
 libavcodec 58. 86.101 / 58. 86.101
 libavformat 58. 43.100 / 58. 43.100
 libavdevice 58. 9.103 / 58. 9.103
 libavfilter 7. 82.100 / 7. 82.100
 libswscale 5. 6.101 / 5. 6.101
 libswresample 3. 6.100 / 3. 6.100
 libpostproc 55. 6.100 / 55. 6.100
Guessed Channel Layout for Input Stream #0.1 : mono
Input #0, avi, from 'DSCF0421.AVI':
 Duration: 00:00:05.00, start: 0.000000, bitrate: 9778 kb/s
 Stream #0:0: Video: mjpeg (Baseline) (MJPG / 0x47504A4D), yuvj422p(pc, bt470bg/unknown/unknown), 640x480, 9739 kb/s, 30 fps, 30 tbr, 30 tbn, 30 tbc
 Metadata:
 Make : FUJIFILM
 Model : FinePix JX550
 DateTime : 2012:05:20 00:25:48
 JPEGInterchangeFormat: 658
 JPEGInterchangeFormatLength: 2698
 Copyright :
 DateTimeOriginal: 2012:05:20 00:25:48
 DateTimeDigitized: 2012:05:20 00:25:48
 MakerNote :
 : 70, 85, 74, 73, 70, 73, 76, 77, 12, 0, 0, 0, 18, 0, 0, 0
 : 7, 0, 4, 0, 0, 0, 48, 49, 51, 48, 16, 0, 2, 0, 33, 0
 : 0, 0, 2, 1, 0, 0, 0, 16, 2, 0, 8, 0, 0, 0, 35, 1
 : 0, 0, 1, 16, 3, 0, 1, 0, 0, 0, 3, 0, 0, 0, 2, 16
 : 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 16, 16, 3, 0, 1, 0
 : 0, 0, 2, 0, 0, 0, 17, 16, 10, 0, 1, 0, 0, 0, 43, 1
 : 0, 0, 32, 16, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 33, 16
 : 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 48, 16, 3, 0, 1, 0
 : 0, 0, 0, 0, 0, 0, 49, 16, 3, 0, 1, 0, 0, 0, 0, 0
 : 0, 0, 0, 17, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 18
 : 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 19, 3, 0, 1, 0
 : 0, 0, 0, 0, 0, 0, 1, 19, 3, 0, 1, 0, 0, 0, 0, 0
 : 0, 0, 2, 19, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 48, 20
 : 7, 0, 129, 0, 0, 0, 52, 1, 0, 0, 49, 20, 4, 0, 1, 0
 : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 : 0, 0, 53, 57, 50, 68, 51, 49, 51, 49, 51, 57, 51, 54, 51, 49
 : 49, 50, 48, 51, 49, 56, 70, 70, 69, 53, 50, 83, 80, 48, 52, 54
 : 50, 54, 0, 78, 79, 82, 77, 65, 76, 32, 0, 0, 0, 0, 0, 100
 : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 : 0, 0, 0, 0, 0, 0
 title : FUJIFILM AVI STREAM 0100
 Stream #0:1: Audio: pcm_u8 ([1][0][0][0] / 0x0001), 11024 Hz, mono, u8, 88 kb/s
Input #1, tty, from 'output.txt':
 Duration: 00:00:00.80, start: 0.000000, bitrate: 46 kb/s
 Stream #1:0: Video: ansi, pal8, 640x400, 25 fps, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
 Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
 Stream #0:1 -> #0:1 (pcm_u8 (native) -> vorbis (libvorbis))
Press [q] to stop, [?] for help
[libx264 @ 000002b3674f3f40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 000002b3674f3f40] profile High 4:2:2, level 3.0, 4:2:2, 8-bit
[libx264 @ 000002b3674f3f40] 264 - core 159 - 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, matroska, to 'compressed.mkv':
 Metadata:
 encoder : Lavf58.43.100
 Stream #0:0: Video: h264 (libx264) (H264 / 0x34363248), yuvj422p(pc), 640x480, q=-1--1, 30 fps, 1k tbn, 30 tbc
 Metadata:
 Make : FUJIFILM
 Model : FinePix JX550
 DateTime : 2012:05:20 00:25:48
 JPEGInterchangeFormat: 658
 JPEGInterchangeFormatLength: 2698
 Copyright :
 DateTimeOriginal: 2012:05:20 00:25:48
 DateTimeDigitized: 2012:05:20 00:25:48
 MakerNote :
 : 70, 85, 74, 73, 70, 73, 76, 77, 12, 0, 0, 0, 18, 0, 0, 0
 : 7, 0, 4, 0, 0, 0, 48, 49, 51, 48, 16, 0, 2, 0, 33, 0
 : 0, 0, 2, 1, 0, 0, 0, 16, 2, 0, 8, 0, 0, 0, 35, 1
 : 0, 0, 1, 16, 3, 0, 1, 0, 0, 0, 3, 0, 0, 0, 2, 16
 : 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 16, 16, 3, 0, 1, 0
 : 0, 0, 2, 0, 0, 0, 17, 16, 10, 0, 1, 0, 0, 0, 43, 1
 : 0, 0, 32, 16, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 33, 16
 : 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 48, 16, 3, 0, 1, 0
 : 0, 0, 0, 0, 0, 0, 49, 16, 3, 0, 1, 0, 0, 0, 0, 0
 : 0, 0, 0, 17, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 18
 : 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 19, 3, 0, 1, 0
 : 0, 0, 0, 0, 0, 0, 1, 19, 3, 0, 1, 0, 0, 0, 0, 0
 : 0, 0, 2, 19, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 48, 20
 : 7, 0, 129, 0, 0, 0, 52, 1, 0, 0, 49, 20, 4, 0, 1, 0
 : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 : 0, 0, 53, 57, 50, 68, 51, 49, 51, 49, 51, 57, 51, 54, 51, 49
 : 49, 50, 48, 51, 49, 56, 70, 70, 69, 53, 50, 83, 80, 48, 52, 54
 : 50, 54, 0, 78, 79, 82, 77, 65, 76, 32, 0, 0, 0, 0, 0, 100
 : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 : 0, 0, 0, 0, 0, 0
 title : FUJIFILM AVI STREAM 0100
 encoder : Lavc58.86.101 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
 Stream #0:1: Audio: vorbis (libvorbis) (oV[0][0] / 0x566F), 11024 Hz, mono, fltp
 Metadata:
 encoder : Lavc58.86.101 libvorbis
[mjpeg @ 000002b3674f0fc0] mjpeg_decode_dc: bad vlc: 0:0 (000002b3674f1688)
[mjpeg @ 000002b3674f0fc0] error dc
[mjpeg @ 000002b3674f0fc0] error y=59 x=39
frame= 150 fps= 95 q=-1.0 Lsize= 2317kB time=00:00:04.99 bitrate=3797.5kbits/s speed=3.16x
video:2290kB audio:19kB subtitle:0kB other streams:0kB global headers:3kB muxing overhead: 0.355840%
[libx264 @ 000002b3674f3f40] frame I:2 Avg QP:25.35 size: 24876
[libx264 @ 000002b3674f3f40] frame P:38 Avg QP:26.87 size: 18472
[libx264 @ 000002b3674f3f40] frame B:110 Avg QP:27.42 size: 14477
[libx264 @ 000002b3674f3f40] consecutive B-frames: 1.3% 2.7% 0.0% 96.0%
[libx264 @ 000002b3674f3f40] mb I I16..4: 0.2% 98.9% 0.9%
[libx264 @ 000002b3674f3f40] mb P I16..4: 0.2% 54.8% 1.2% P16..4: 29.1% 11.2% 3.4% 0.0% 0.0% skip: 0.1%
[libx264 @ 000002b3674f3f40] mb B I16..4: 0.0% 22.9% 0.1% B16..8: 40.5% 14.0% 3.0% direct:15.2% skip: 4.3% L0:45.5% L1:42.5% BI:12.0%
[libx264 @ 000002b3674f3f40] 8x8 transform intra:98.6% inter:79.9%
[libx264 @ 000002b3674f3f40] coded y,uvDC,uvAC intra: 92.1% 99.0% 74.7% inter: 60.8% 91.7% 25.7%
[libx264 @ 000002b3674f3f40] i16 v,h,dc,p: 26% 7% 12% 55%
[libx264 @ 000002b3674f3f40] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 12% 10% 40% 6% 6% 6% 5% 7% 8%
[libx264 @ 000002b3674f3f40] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22% 11% 19% 10% 9% 10% 6% 8% 5%
[libx264 @ 000002b3674f3f40] i8c dc,h,v,p: 65% 7% 23% 5%
[libx264 @ 000002b3674f3f40] Weighted P-Frames: Y:2.6% UV:2.6%
[libx264 @ 000002b3674f3f40] ref P L0: 41.3% 11.9% 27.9% 18.5% 0.4%
[libx264 @ 000002b3674f3f40] ref B L0: 75.4% 19.4% 5.2%
[libx264 @ 000002b3674f3f40] ref B L1: 89.4% 10.6%
[libx264 @ 000002b3674f3f40] kb/s:3750.61




It doesn't successfully restore the metadata of the source
.AVI



BTW, I don't intend to shrink the size of the video I just need to retain its created date and some miscellaneous.



Thank you in advance for those who will answer !