我想将mp4剪辑拆分一段时间,但我不想重新编码因为我的cpu不太好,需要花费很多时间。当我使用encode:
尝试此代码时ffmpeg -i clip.mp4 -ss 00:00:25 -to 00:01:20 cutted.mp4
它工作正常,但我不想重新编码。所以我试试这段代码:
ffmpeg -i clip.mp4 -ss 00:00:25 -to 00:01:20 -c copy cutted.mp4
它在媒体播放器中完美播放,一开始有几个空白秒,没问题我可以在编辑时剪掉这些空白秒。但真正的问题是我无法在首映专业版中编辑该剪辑,因为它不同步。我能做些什么来解决它?任何ffmpeg功能?谢谢大家的帮助!
这里ffmpeg输出:
C:\Users\winuser>ffmpeg -i "D:\clips\clip_4579\clip.mp4" -ss 00:03
:00 -to 00:03:30 -c copy "D:\clips\clip_4579\renderless1.mp4"
ffmpeg version N-90155-g28924f4b48 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 7.3.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --e
nable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libblur
ay --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-
libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enab
le-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-li
bvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --en
able-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-
libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enabl
e-libspeex --enable-libxvid --enable-libmfx --enable-amf --enable-cuda --enable-
cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth
libavutil 56. 7.101 / 56. 7.101
libavcodec 58. 12.102 / 58. 12.102
libavformat 58. 9.100 / 58. 9.100
libavdevice 58. 2.100 / 58. 2.100
libavfilter 7. 12.100 / 7. 12.100
libswscale 5. 0.101 / 5. 0.101
libswresample 3. 0.101 / 3. 0.101
libpostproc 55. 0.100 / 55. 0.100
Input #0, mpegts, from 'D:\clips\clip_4579\clip.mp4':
Duration: 00:04:14.78, start: 14149.499000, bitrate: 2287 kb/s
Program 1
Stream #0:0[0x100]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, ster
eo, fltp, 164 kb/s
Stream #0:1[0x101]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(pro
gressive), 1280x720, 60 tbr, 90k tbn, 2k tbc
Stream #0:2[0x102]: Data: timed_id3 (ID3 / 0x20334449)
Output #0, mp4, to 'D:\clips\clip_4579\renderless1.mp4':
Metadata:
encoder : Lavf58.9.100
Stream #0:0: Video: h264 (Main) (avc1 / 0x31637661), yuv420p(progressive), 1
280x720, q=2-31, 60 tbr, 90k tbn, 90k tbc
Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 16
4 kb/s
Stream mapping:
Stream #0:1 -> #0:0 (copy)
Stream #0:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 0 fps=0.0 q=-1.0 size= 0kB time=00:00:00.00 bitrate=N/A speed=
frame= 0 fps=0.0 q=-1.0 size= 0kB time=00:00:00.00 bitrate=N/A speed=
frame= 0 fps=0.0 q=-1.0 size= 0kB time=00:00:00.00 bitrate=N/A speed=
frame= 551 fps=271 q=-1.0 size= 4864kB time=00:00:21.23 bitrate=1876.7kbits/
frame= 814 fps=380 q=-1.0 Lsize= 7381kB time=00:00:29.98 bitrate=2016.4kbits
/s speed= 14x
video:6757kB audio:594kB subtitle:0kB other streams:0kB global headers:0kB muxin
g overhead: 0.400338%