20221121将行车记录仪记录的MJPEG格式的AVI片段合并的MKV转换为MP4
2022/11/21 21:51
(一)
缘起,用行车记录仪录制的爬拉胡线(惠州大南山)的AVI视频,一个片段5分钟。
使用mkvtoolnix-gui将AVI合并成为MKV视频之后:20221113惠州拉胡线2-DCIM-MOVI0000.mkv
"D:\Program Files\MKVToolNix\mkvtoolnix-gui.exe"
由于剪映只能识别最多2小时的视频的机器字幕。
但是使用PR2003不认识直接生成的MKV,需要使用ffmpeg转换mkv视频为mp4了。
文件导入失败:
错误信息
文件的压缩类型不受支持。
http://www.kxdw.com/soft/46157.html
Premiere Pro 2023最新版 v23.0.0.63 绿色版
Adobe_Premiere_Pro_2023_23.0.0.63_SP_20221018.rar
https://www.jianshu.com/p/8f89d0ace18c
Adobe全家桶分享共同学习
AVI片段:
视频1
8638kb/s,1920*1080(16:9)@30FPS,JPEG
音频1
512kb/s,32.0kHz,16位,1声道,PCM(Little/Signed)
MKV合并版本视频:
视频1
16.5Mb/s,1920*1080(16:9)@18.990FPS,JPEG
音频1
512kb/s,32.0kHz,16位,1声道,PCM(Little/Signed)
编码程序:mkvmerge v60.0.0('Are We Copies')64-bit
编码函数库:libebml v1.4.2 + libmatroska v1.6.4
(二)
将行车记录仪记录的MJPEG格式的AVI片段合并的MKV转换为MP4
百度搜索:
https://qa.1r1g.com/sf/ask/3667762171/
使用 FFmpeg 从 mjpeg 转换为 mp4 (libx264)
归档时间:4 年,2 月 前
查看次数:5445 次
最近记录:4 年,2 月 前
如果使用 FFmpeg 从 mjpeg 转换为 mp4 (libx264),则无法在 Windows · Mac 上进行播放。
图标上不显示缩略图。但是,使用 HTML5 Video 标签,播放是可能的。
为什么?如果你明白,请告诉我。谢谢你。
ffmpeg -i source_file.mov -b 4000k -vcodec libx264 destination_file.mp4
Gya*_*yan 6
通常的原因是像素格式。MJPEG 可能有 4:2:2 或 4:4:4 色度采样,大多数播放器在 H264 中不支持。所以试试
ffmpeg -i source_file.mov -pix_fmt yuv420p -b:v 4000k -c:v libx264 destination_file.mp4
【不修改码率,如果需要修改码率,请使用参数:-b 4m/-b:v 4M】
ffmpeg -i 1.mkv -vcodec libx264 1.mp4
ffmpeg -i 20221113惠州拉胡线2-DCIM-MOVI0000.mkv -vcodec libx264 20221113惠州拉胡线2-DCIM-MOVI0000.mp4
创建日期:2022/11/21 11:51
修改日期:2022/11/21 13:40
3小时的视频需要1小时49分钟。
(大致需要你需要转换的视频时长的2/3)
MKV合并版本视频:
视频1
16.5Mb/s,1920*1080(16:9)@18.990FPS,JPEG
音频1
512kb/s,32.0kHz,16位,1声道,PCM(Little/Signed)
编码程序:mkvmerge v60.0.0('Are We Copies')64-bit
编码函数库:libebml v1.4.2 + libmatroska v1.6.4
MKV转换为MP4视频之后的视频信息:
视频1
12.8Mb/s,1920*1080(16:9)@30FPS,AVC(High@L4)(CABAC/4 Ref Frames)
音频1
69.3kb/s,32.0kHz,1声道,AAC LC
编码程序:Lavf58.47.100
Microsoft Windows [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。
C:\Users\Administrator>p:
P:\>ffmpeg -i 20221113惠州拉胡线-DCIM-MOVI0000.mkv -vcodec libx264 20221113惠州拉胡线-DCIM-MOVI0000.mp4
ffmpeg version git-2020-06-28-4cfcfb3 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 9.3.1 (GCC) 20200621
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libb
luray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --e
nable-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 --enable-libgsm --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. 55.100 / 56. 55.100
libavcodec 58. 93.100 / 58. 93.100
libavformat 58. 47.100 / 58. 47.100
libavdevice 58. 11.100 / 58. 11.100
libavfilter 7. 86.100 / 7. 86.100
libswscale 5. 8.100 / 5. 8.100
libswresample 3. 8.100 / 3. 8.100
libpostproc 55. 8.100 / 55. 8.100
Guessed Channel Layout for Input Stream #0.1 : mono
Input #0, matroska,webm, from '20221113惠州拉胡线-DCIM-MOVI0000.mkv':
Metadata:
encoder : libebml v1.4.2 + libmatroska v1.6.4
creation_time : 2022-11-21T14:23:41.000000Z
Duration: 00:10:00.00, start: 0.000000, bitrate: 10983 kb/s
Stream #0:0: Video: mjpeg (Baseline) (MJPG / 0x47504A4D), yuvj420p(pc, bt470bg/unknown/unknown), 1920x1080, SAR 1:1 DAR 16:9, 30 fps, 30 tbr, 1k tbn, 1k tbc
(default)
Metadata:
BPS : 10563902
DURATION : 00:09:54.500000000
NUMBER_OF_FRAMES: 6453
NUMBER_OF_BYTES : 785030004
_STATISTICS_WRITING_APP: mkvmerge v60.0.0 ('Are We Copies?') 64-bit
_STATISTICS_WRITING_DATE_UTC: 2022-11-21 14:23:41
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:1: Audio: pcm_s16le, 32000 Hz, mono, s16, 512 kb/s (default)
Metadata:
BPS : 512000
DURATION : 00:10:00.000000000
NUMBER_OF_FRAMES: 15000
NUMBER_OF_BYTES : 38400000
_STATISTICS_WRITING_APP: mkvmerge v60.0.0 ('Are We Copies?') 64-bit
_STATISTICS_WRITING_DATE_UTC: 2022-11-21 14:23:41
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream mapping:
Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (pcm_s16le (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 0000000001f52040] using SAR=1/1
[libx264 @ 0000000001f52040] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0000000001f52040] profile High, level 4.0, 4:2:0, 8-bit
[libx264 @ 0000000001f52040] 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=34 lookahead_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_bia
s=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 qpm
ax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to '20221113惠州拉胡线-DCIM-MOVI0000.mp4':
Metadata:
encoder : Lavf58.47.100
Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuvj420p(pc, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 30 fps, 15360 tbn, 30 tbc (default
)
Metadata:
BPS : 10563902
DURATION : 00:09:54.500000000
NUMBER_OF_FRAMES: 6453
NUMBER_OF_BYTES : 785030004
_STATISTICS_WRITING_APP: mkvmerge v60.0.0 ('Are We Copies?') 64-bit
_STATISTICS_WRITING_DATE_UTC: 2022-11-21 14:23:41
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
encoder : Lavc58.93.100 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), 32000 Hz, mono, fltp, 69 kb/s (default)
Metadata:
BPS : 512000
DURATION : 00:10:00.000000000
NUMBER_OF_FRAMES: 15000
NUMBER_OF_BYTES : 38400000
_STATISTICS_WRITING_APP: mkvmerge v60.0.0 ('Are We Copies?') 64-bit
_STATISTICS_WRITING_DATE_UTC: 2022-11-21 14:23:41
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
encoder : Lavc58.93.100 aac
More than 1000 frames duplicated 5376kB time=00:00:28.36 bitrate=1552.5kbits/s dup=894 drop=0 speed= 4.8x
More than 10000 frames duplicated 569344kB time=00:08:19.45 bitrate=9338.3kbits/s dup=9998 drop=0 speed=2.21x
frame=17835 fps= 62 q=-1.0 Lsize= 736832kB time=00:10:00.00 bitrate=10060.2kbits/s dup=11382 drop=0 speed= 2.1x
video:731337kB audio:5078kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.056615%
[libx264 @ 0000000001f52040] frame I:567 Avg QP:24.49 size:172243
[libx264 @ 0000000001f52040] frame P:6280 Avg QP:25.01 size: 66710
[libx264 @ 0000000001f52040] frame B:10988 Avg QP:26.18 size: 21140
[libx264 @ 0000000001f52040] consecutive B-frames: 13.7% 10.6% 5.4% 70.3%
[libx264 @ 0000000001f52040] mb I I16..4: 6.1% 92.6% 1.2%
[libx264 @ 0000000001f52040] mb P I16..4: 3.4% 46.0% 1.2% P16..4: 3.8% 2.2% 1.0% 0.0% 0.0% skip:42.5%
[libx264 @ 0000000001f52040] mb B I16..4: 1.1% 10.0% 0.6% B16..8: 3.7% 2.6% 0.9% direct: 2.0% skip:79.1% L0:45.6% L1:35.3% BI:19.1%
[libx264 @ 0000000001f52040] 8x8 transform intra:89.8% inter:80.3%
[libx264 @ 0000000001f52040] coded y,uvDC,uvAC intra: 75.8% 60.7% 13.9% inter: 7.9% 8.2% 1.1%
[libx264 @ 0000000001f52040] i16 v,h,dc,p: 51% 28% 17% 4%
[libx264 @ 0000000001f52040] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 19% 28% 5% 4% 5% 4% 5% 7%
[libx264 @ 0000000001f52040] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22% 15% 12% 7% 9% 9% 8% 8% 8%
[libx264 @ 0000000001f52040] i8c dc,h,v,p: 45% 25% 27% 3%
[libx264 @ 0000000001f52040] Weighted P-Frames: Y:4.9% UV:3.0%
[libx264 @ 0000000001f52040] ref P L0: 58.7% 15.2% 16.0% 9.3% 0.8%
[libx264 @ 0000000001f52040] ref B L0: 83.1% 13.9% 3.0%
[libx264 @ 0000000001f52040] ref B L1: 97.5% 2.5%
[libx264 @ 0000000001f52040] kb/s:10077.55
[aac @ 0000000001f55f40] Qavg: 128.363
P:\>