bytelang / kplayer-go

A live streaming tool more suitable for non-graphical servers
https://kplayer.net
Apache License 2.0
756 stars 72 forks source link

请教一个问题 #118

Closed icaca closed 1 year ago

icaca commented 1 year ago

最近下了一些片子,都是mkv的,用kplayer推了1分钟不到就自动停了,也没有报错,在github上也看到类似的issues。 然后用ffmpeg转mp4,使用x264编码,会报Decoder not found。 之前用pr和handbrake导出就没有问题。

因此想问一下如果用ffmpeg批量导出,有没有推荐的参数配置?

vaptu commented 1 year ago

kplayer当前还不支持硬件编解码,可能由于在使用ffmpeg时使用了硬件编码导致kplayer无法正确识别相应的解码器。

尝试使用软解来进行视频编码看能不能解决问题,可以使用x264编码器来进行视频编码


推荐使用h264+aac的编码参数是最优性能和最佳编码。正在适配更多的解码器,这类问题在之后会逐步解决

icaca commented 1 year ago

我用的参数是这样的 -c:v libx264 -c:a aac 但是转出来的不能用,我再研究研究。谢谢大佬回复。

vaptu commented 1 year ago

可以提供下使用ffmpeg获取下转码完成后的视频的输出参数吗

ffmpeg -i xxx.mp4
icaca commented 1 year ago

因为视频有2个音轨,所以我得把第一个音轨删了

ffmpeg.exe -i 1.mkv -map 0:0 -map 0:2 -c:v libx264 -c:a aac -y 1.mp4

vaptu commented 1 year ago

贴一下这个命名的输出内容

ffmpeg -i 1.mp4
icaca commented 1 year ago

D:\movie\Detective.Conan.1996>D:\ffmpeg\ffmpeg.exe -i "1.mkv" -map 0:0 -map 0:2 -c:v libx264 -c:a aac -y 1.mp4 ffmpeg version N-111280-gd51b0580e4-20230625 Copyright (c) 2000-2023 the FFmpeg developers built with gcc 13.1.0 (crosstool-NG 1.25.0.196_227d99d) configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --disable-libpulse --enable-libvmaf --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth --enable-chromaprint --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libkvazaar --enable-libass --enable-libbluray --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librist --enable-libssh --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libvpl --enable-openal --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --disable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp --extra-version=20230625 libavutil 58. 13.101 / 58. 13.101 libavcodec 60. 21.100 / 60. 21.100 libavformat 60. 9.100 / 60. 9.100 libavdevice 60. 2.100 / 60. 2.100 libavfilter 9. 8.102 / 9. 8.102 libswscale 7. 3.100 / 7. 3.100 libswresample 4. 11.100 / 4. 11.100 libpostproc 57. 2.100 / 57. 2.100 [matroska,webm @ 0000020353834280] Could not find codec parameters for stream 3 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options [matroska,webm @ 0000020353834280] Could not find codec parameters for stream 4 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options Input #0, matroska,webm, from '1.mkv': Metadata: title : Conan Re 0001 hyunwoo95 encoder : libebml v1.4.0 + libmatroska v1.6.0 creation_time : 2021-03-04T05:26:26.000000Z Duration: 00:24:13.53, start: 0.000000, bitrate: 5143 kb/s Chapters: Chapter #0:0: start 0.000000, end 106.165000 Metadata: title : Opening Theme Chapter #0:1: start 106.165000, end 290.991000 Metadata: title : 1st Part Chapter #0:2: start 290.991000, end 954.502000 Metadata: title : 2nd Part Chapter #0:3: start 954.502000, end 1314.257000 Metadata: title : 3rd Part Chapter #0:4: start 1314.257000, end 1405.530000 Metadata: title : Ending Theme Chapter #0:5: start 1405.530000, end 1442.439000 Metadata: title : 4th Part Chapter #0:6: start 1442.439000, end 1453.526000 Metadata: title : Next Conan's Hint Stream #0:0(jpn): Video: h264 (High), yuv420p(progressive), 1440x1080 [SAR 1:1 DAR 4:3], 23.98 fps, 23.98 tbr, 1k tbn (default) Metadata: title : Fabrebatalla18 BPS-eng : 4771562 DURATION-eng : 00:24:13.452000000 NUMBER_OF_FRAMES-eng: 34848 NUMBER_OF_BYTES-eng: 866904623 _STATISTICS_WRITING_APP-eng: mkvmerge v48.0.0 ('Fortress Around Your Heart') 64-bit _STATISTICS_WRITING_DATE_UTC-eng: 2021-03-04 05:26:26 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream #0:1(jpn): Audio: aac (HE-AAC), 48000 Hz, stereo, fltp (default) Metadata: title : 日语2.0 BPS-eng : 127909 DURATION-eng : 00:24:13.526000000 NUMBER_OF_FRAMES-eng: 34043 NUMBER_OF_BYTES-eng: 23239961 _STATISTICS_WRITING_APP-eng: mkvmerge v48.0.0 ('Fortress Around Your Heart') 64-bit _STATISTICS_WRITING_DATE_UTC-eng: 2021-03-04 05:26:26 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream #0:2(chi): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s Metadata: title : 台配国语2.0@LUOXH0530 BPS-eng : 192000 DURATION-eng : 00:24:11.872000000 NUMBER_OF_FRAMES-eng: 45371 NUMBER_OF_BYTES-eng: 34844928 _STATISTICS_WRITING_APP-eng: mkvmerge v48.0.0 ('Fortress Around Your Heart') 64-bit _STATISTICS_WRITING_DATE_UTC-eng: 2021-03-04 05:26:26 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream #0:3(chi): Subtitle: hdmv_pgs_subtitle (default) Metadata: title : 简 BPS-eng : 51403 DURATION-eng : 00:23:55.392000000 NUMBER_OF_FRAMES-eng: 974 NUMBER_OF_BYTES-eng: 9223107 _STATISTICS_WRITING_APP-eng: mkvmerge v48.0.0 ('Fortress Around Your Heart') 64-bit _STATISTICS_WRITING_DATE_UTC-eng: 2021-03-04 05:26:26 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream #0:4(chi): Subtitle: hdmv_pgs_subtitle Metadata: title : 繁 BPS-eng : 38216 DURATION-eng : 00:23:55.392000000 NUMBER_OF_FRAMES-eng: 812 NUMBER_OF_BYTES-eng: 6857032 _STATISTICS_WRITING_APP-eng: mkvmerge v48.0.0 ('Fortress Around Your Heart') 64-bit _STATISTICS_WRITING_DATE_UTC-eng: 2021-03-04 05:26:26 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream #0:5(chi): Subtitle: subrip Metadata: title : 简 BPS-eng : 68 DURATION-eng : 00:23:55.400000000 NUMBER_OF_FRAMES-eng: 438 NUMBER_OF_BYTES-eng: 12319 _STATISTICS_WRITING_APP-eng: mkvmerge v48.0.0 ('Fortress Around Your Heart') 64-bit _STATISTICS_WRITING_DATE_UTC-eng: 2021-03-04 05:26:26 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream #0:6(chi): Subtitle: subrip Metadata: title : 繁 BPS-eng : 69 DURATION-eng : 00:23:55.400000000 NUMBER_OF_FRAMES-eng: 414 NUMBER_OF_BYTES-eng: 12464 _STATISTICS_WRITING_APP-eng: mkvmerge v48.0.0 ('Fortress Around Your Heart') 64-bit _STATISTICS_WRITING_DATE_UTC-eng: 2021-03-04 05:26:26 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264)) Stream #0:2 -> #0:1 (ac3 (native) -> aac (native)) Press [q] to stop, [?] for help [libx264 @ 00000203557ab940] using SAR=1/1 [libx264 @ 00000203557ab940] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 [libx264 @ 00000203557ab940] profile High, level 4.0, 4:2:0, 8-bit [libx264 @ 00000203557ab940] 264 - core 164 - H.264/MPEG-4 AVC codec - Copyleft 2003-2023 - 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_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=23 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 '1.mp4': Metadata: title : Conan Re 0001 hyunwoo95 encoder : Lavf60.9.100 Chapters: Chapter #0:0: start 0.000000, end 106.165000 Metadata: title : Opening Theme Chapter #0:1: start 106.165000, end 290.991000 Metadata: title : 1st Part Chapter #0:2: start 290.991000, end 954.502000 Metadata: title : 2nd Part Chapter #0:3: start 954.502000, end 1314.257000 Metadata: title : 3rd Part Chapter #0:4: start 1314.257000, end 1405.530000 Metadata: title : Ending Theme Chapter #0:5: start 1405.530000, end 1442.439000 Metadata: title : 4th Part Chapter #0:6: start 1442.439000, end 1453.526000 Metadata: title : Next Conan's Hint Stream #0:0(jpn): Video: h264 (avc1 / 0x31637661), yuv420p(progressive), 1440x1080 [SAR 1:1 DAR 4:3], q=2-31, 23.98 fps, 24k tbn (default) Metadata: title : Fabrebatalla18 BPS-eng : 4771562 DURATION-eng : 00:24:13.452000000 NUMBER_OF_FRAMES-eng: 34848 NUMBER_OF_BYTES-eng: 866904623 _STATISTICS_WRITING_APP-eng: mkvmerge v48.0.0 ('Fortress Around Your Heart') 64-bit _STATISTICS_WRITING_DATE_UTC-eng: 2021-03-04 05:26:26 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES encoder : Lavc60.21.100 libx264 Side data: cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A Stream #0:1(chi): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s Metadata: title : 台配国语2.0@LUOXH0530 BPS-eng : 192000 DURATION-eng : 00:24:11.872000000 NUMBER_OF_FRAMES-eng: 45371 NUMBER_OF_BYTES-eng: 34844928 _STATISTICS_WRITING_APP-eng: mkvmerge v48.0.0 ('Fortress Around Your Heart') 64-bit _STATISTICS_WRITING_DATE_UTC-eng: 2021-03-04 05:26:26 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES encoder : Lavc60.21.100 aac [out#0/mp4 @ 0000020353815fc0] video:405404kB audio:23097kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.228582% frame=34848 fps= 96 q=-1.0 Lsize= 429481kB time=00:24:13.32 bitrate=2420.9kbits/s speed=4.02x [libx264 @ 00000203557ab940] frame I:416 Avg QP:18.47 size:117021 [libx264 @ 00000203557ab940] frame P:9319 Avg QP:21.11 size: 24663 [libx264 @ 00000203557ab940] frame B:25113 Avg QP:23.07 size: 5440 [libx264 @ 00000203557ab940] consecutive B-frames: 2.4% 3.0% 4.5% 90.1% [libx264 @ 00000203557ab940] mb I I16..4: 14.4% 63.9% 21.7% [libx264 @ 00000203557ab940] mb P I16..4: 1.6% 5.5% 1.5% P16..4: 41.5% 9.9% 7.4% 0.0% 0.0% skip:32.5% [libx264 @ 00000203557ab940] mb B I16..4: 0.1% 0.3% 0.1% B16..8: 38.7% 1.3% 0.2% direct: 1.4% skip:57.9% L0:46.6% L1:51.9% BI: 1.4% [libx264 @ 00000203557ab940] 8x8 transform intra:63.0% inter:80.7% [libx264 @ 00000203557ab940] coded y,uvDC,uvAC intra: 46.8% 61.8% 35.9% inter: 7.6% 15.8% 2.6% [libx264 @ 00000203557ab940] i16 v,h,dc,p: 46% 24% 14% 16% [libx264 @ 00000203557ab940] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 13% 38% 5% 4% 4% 4% 4% 4% [libx264 @ 00000203557ab940] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 17% 19% 7% 7% 7% 6% 6% 5% [libx264 @ 00000203557ab940] i8c dc,h,v,p: 55% 20% 20% 5% [libx264 @ 00000203557ab940] Weighted P-Frames: Y:4.2% UV:2.7% [libx264 @ 00000203557ab940] ref P L0: 55.8% 8.8% 23.4% 11.6% 0.3% [libx264 @ 00000203557ab940] ref B L0: 83.9% 12.1% 3.9% [libx264 @ 00000203557ab940] ref B L1: 93.6% 6.4% [libx264 @ 00000203557ab940] kb/s:2284.95 [aac @ 0000020355cce380] Qavg: 566.971

icaca commented 1 year ago

D:\movie\Detective.Conan.1996>D:\ffmpeg\ffmpeg.exe -i "1.mkv"
ffmpeg version N-111280-gd51b0580e4-20230625 Copyright (c) 2000-2023 the FFmpeg developers built with gcc 13.1.0 (crosstool-NG 1.25.0.196_227d99d) configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --disable-libpulse --enable-libvmaf --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth --enable-chromaprint --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libkvazaar --enable-libass --enable-libbluray --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librist --enable-libssh --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libvpl --enable-openal --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --disable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp --extra-version=20230625 libavutil 58. 13.101 / 58. 13.101 libavcodec 60. 21.100 / 60. 21.100 libavformat 60. 9.100 / 60. 9.100 libavdevice 60. 2.100 / 60. 2.100 libavfilter 9. 8.102 / 9. 8.102 libswscale 7. 3.100 / 7. 3.100 libswresample 4. 11.100 / 4. 11.100 libpostproc 57. 2.100 / 57. 2.100 [matroska,webm @ 0000013b6af84a80] Could not find codec parameters for stream 3 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options [matroska,webm @ 0000013b6af84a80] Could not find codec parameters for stream 4 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options Input #0, matroska,webm, from '1.mkv': Metadata: title : Conan Re 0001 hyunwoo95 encoder : libebml v1.4.0 + libmatroska v1.6.0 creation_time : 2021-03-04T05:26:26.000000Z Duration: 00:24:13.53, start: 0.000000, bitrate: 5143 kb/s Chapters: Chapter #0:0: start 0.000000, end 106.165000 Metadata: title : Opening Theme Chapter #0:1: start 106.165000, end 290.991000 Metadata: title : 1st Part Chapter #0:2: start 290.991000, end 954.502000 Metadata: title : 2nd Part Chapter #0:3: start 954.502000, end 1314.257000 Metadata: title : 3rd Part Chapter #0:4: start 1314.257000, end 1405.530000 Metadata: title : Ending Theme Chapter #0:5: start 1405.530000, end 1442.439000 Metadata: title : 4th Part Chapter #0:6: start 1442.439000, end 1453.526000 Metadata: title : Next Conan's Hint Stream #0:0(jpn): Video: h264 (High), yuv420p(progressive), 1440x1080 [SAR 1:1 DAR 4:3], 23.98 fps, 23.98 tbr, 1k tbn (default) Metadata: title : Fabrebatalla18 BPS-eng : 4771562 DURATION-eng : 00:24:13.452000000 NUMBER_OF_FRAMES-eng: 34848 NUMBER_OF_BYTES-eng: 866904623 _STATISTICS_WRITING_APP-eng: mkvmerge v48.0.0 ('Fortress Around Your Heart') 64-bit _STATISTICS_WRITING_DATE_UTC-eng: 2021-03-04 05:26:26 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream #0:1(jpn): Audio: aac (HE-AAC), 48000 Hz, stereo, fltp (default) Metadata: title : 日语2.0 BPS-eng : 127909 DURATION-eng : 00:24:13.526000000 NUMBER_OF_FRAMES-eng: 34043 NUMBER_OF_BYTES-eng: 23239961 _STATISTICS_WRITING_APP-eng: mkvmerge v48.0.0 ('Fortress Around Your Heart') 64-bit _STATISTICS_WRITING_DATE_UTC-eng: 2021-03-04 05:26:26 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream #0:2(chi): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s Metadata: title : 台配国语2.0@LUOXH0530 BPS-eng : 192000 DURATION-eng : 00:24:11.872000000 NUMBER_OF_FRAMES-eng: 45371 NUMBER_OF_BYTES-eng: 34844928 _STATISTICS_WRITING_APP-eng: mkvmerge v48.0.0 ('Fortress Around Your Heart') 64-bit _STATISTICS_WRITING_DATE_UTC-eng: 2021-03-04 05:26:26 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream #0:3(chi): Subtitle: hdmv_pgs_subtitle (default) Metadata: title : 简 BPS-eng : 51403 DURATION-eng : 00:23:55.392000000 NUMBER_OF_FRAMES-eng: 974 NUMBER_OF_BYTES-eng: 9223107 _STATISTICS_WRITING_APP-eng: mkvmerge v48.0.0 ('Fortress Around Your Heart') 64-bit _STATISTICS_WRITING_DATE_UTC-eng: 2021-03-04 05:26:26 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream #0:4(chi): Subtitle: hdmv_pgs_subtitle Metadata: title : 繁 BPS-eng : 38216 DURATION-eng : 00:23:55.392000000 NUMBER_OF_FRAMES-eng: 812 NUMBER_OF_BYTES-eng: 6857032 _STATISTICS_WRITING_APP-eng: mkvmerge v48.0.0 ('Fortress Around Your Heart') 64-bit _STATISTICS_WRITING_DATE_UTC-eng: 2021-03-04 05:26:26 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream #0:5(chi): Subtitle: subrip Metadata: title : 简 BPS-eng : 68 DURATION-eng : 00:23:55.400000000 NUMBER_OF_FRAMES-eng: 438 NUMBER_OF_BYTES-eng: 12319 _STATISTICS_WRITING_APP-eng: mkvmerge v48.0.0 ('Fortress Around Your Heart') 64-bit _STATISTICS_WRITING_DATE_UTC-eng: 2021-03-04 05:26:26 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream #0:6(chi): Subtitle: subrip Metadata: title : 繁 BPS-eng : 69 DURATION-eng : 00:23:55.400000000 NUMBER_OF_FRAMES-eng: 414 NUMBER_OF_BYTES-eng: 12464 _STATISTICS_WRITING_APP-eng: mkvmerge v48.0.0 ('Fortress Around Your Heart') 64-bit _STATISTICS_WRITING_DATE_UTC-eng: 2021-03-04 05:26:26 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES At least one output file must be specified

vaptu commented 1 year ago

尝试使用流copy的方式来剔除其他流看是不是有效

ffmpeg.exe -i 1.mkv -map 0:0 -map 0:2 -c copy -y 1.mp4

或者 ffmpeg.exe -i 1.mkv -t 60 -map 0:0 -map 0:2 -c:v libx264 -c:a aac -y 1.mp4

将裁剪后视频仍然提示Decoder not found的视频文件提交,我debug下原因

icaca commented 1 year ago

好的 我试试 谢谢大佬

icaca commented 1 year ago

time="2023-06-26 08:48:39" level=warning msg="play resource failed" error="Decoder not found [-1128613112]" path=/video/Detective.Conan.1996/1.mp4 unique=iYJ3yi

1.zip

icaca commented 1 year ago

最早的时候用的-c copy 也是一样的。

vaptu commented 1 year ago

造成的原因是kplayer目前还不能更好的支持字幕流的数据,你可以选择将它在转码时将mkv容器中目标的字幕流数据合并到mp4容器的视频流中。

图中(#0:2)

image

确保输出后的mp4文件保持两种(video[h264] audio[aac])流类型数据

vaptu commented 1 year ago

多输入流适配的问题,新版本正在解决

icaca commented 1 year ago

有没有什么命令可以删除字幕 我找了一圈没找到

vaptu commented 1 year ago

如果命令无法删除可以尝试主流的GUI工具来删除流

icaca commented 1 year ago

好的 我研究研究

icaca commented 1 year ago

-map_chapters -1 加了这个命令好像就可以了

icaca commented 1 year ago

对了 还有一个问题,就是我用ffmpeg转的话,还得用kplayer生成一遍缓存,能否用ffmpeg生成缓存

vaptu commented 1 year ago

原理上,如果源视频编码正常并且是常见的编码格式是不需要ffmpeg重新二次编码再生成缓存的。上面的示例文件,只需要剔除额外的stream即可。使用-c copy不需要触发ffmpeg二次编解码

icaca commented 1 year ago

那使用kplayer能否多倍速生成cache,我现在用docker只能先播一遍,生成好缓存再拷贝到服务器上。

vaptu commented 1 year ago

https://docs.kplayer.net/v0.5.8/option/play.html#开始运行

image
icaca commented 1 year ago

文档我也一直在看,但是没有找到相关的描述。 你的意思是,直接安装然后用命令行可以实现多倍速生成缓存是么?

icaca commented 1 year ago

哦 看到了,谢谢。那我只要把docker启动命令改改应该就可以了