Então, depois que eu converto o arquivo mkv para o mp4, o áudio é reproduzido na hora correta, mas o vídeo termina cedo. Isso significa que o bit inicial do vídeo foi cortado e, portanto, o vídeo inicia em um quadro posterior e, no final, o vídeo permanece no mesmo quadro, levando o problema de áudio / vídeo não em sincronia ... Como posso resolver isto?
Aqui está o meu comando:
ffmpeg -i "input.mkv" -codec copy -ss 00:15:20 -t 00:00:17 "output.mp4"
E a saída:
ffmpeg version N-88804-g3af2bf0af0 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 56. 0.100 / 56. 0.100
libavcodec 58. 2.100 / 58. 2.100
libavformat 58. 2.100 / 58. 2.100
libavdevice 58. 0.100 / 58. 0.100
libavfilter 7. 0.101 / 7. 0.101
libswscale 5. 0.101 / 5. 0.101
libswresample 3. 0.101 / 3. 0.101
libpostproc 55. 0.100 / 55. 0.100
Input #0, matroska,webm, from 'input.mkv':
Metadata:
CREATION_TIME : 2018-05-02T15:19:05Z
ENCODER : Lavf57.7.2
Duration: 01:33:57.65, start: 0.000000, bitrate: 13042 kb/s
Chapter #0:0: start 0.000000, end 58.458000
Metadata:
title : Chapter 1
Chapter #0:1: start 58.458000, end 245.312000
Metadata:
title : Chapter 2
Chapter #0:2: start 245.312000, end 527.160000
Metadata:
title : Chapter 3
Chapter #0:3: start 527.160000, end 819.786000
Metadata:
title : Chapter 4
Chapter #0:4: start 819.786000, end 1772.704000
Metadata:
title : Chapter 5
Chapter #0:5: start 1772.704000, end 2106.037000
Metadata:
title : Chapter 6
Chapter #0:6: start 2106.037000, end 2181.212000
Metadata:
title : Chapter 7
Chapter #0:7: start 2181.212000, end 2440.939000
Metadata:
title : Chapter 8
Chapter #0:8: start 2440.939000, end 2725.089000
Metadata:
title : Chapter 9
Chapter #0:9: start 2725.089000, end 3018.282000
Metadata:
title : Chapter 10
Chapter #0:10: start 3018.282000, end 3352.182000
Metadata:
title : Chapter 11
Chapter #0:11: start 3352.182000, end 3964.427000
Metadata:
title : Chapter 12
Chapter #0:12: start 3964.427000, end 4318.181000
Metadata:
title : Chapter 13
Chapter #0:13: start 4318.181000, end 4644.140000
Metadata:
title : Chapter 14
Chapter #0:14: start 4644.140000, end 5062.057000
Metadata:
title : Chapter 15
Chapter #0:15: start 5062.057000, end 5361.089000
Metadata:
title : Chapter 16
Chapter #0:16: start 5361.089000, end 5636.631000
Metadata:
title : Chapter 17
Stream #0:0: Video: h264 (Main), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 1k tbn, 180k tbc (default)
Stream #0:1(jpn): Audio: aac (LC), 48000 Hz, stereo, fltp (default)
Metadata:
title : Stereo
Output #0, mp4, to 'output.mp4':
Metadata:
encoder : Lavf58.2.100
Chapter #0:0: start 0.000000, end 17.000000
Metadata:
title : Chapter 5
Stream #0:0: Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 29.97 fps, 29.97 tbr, 16k tbn, 1k tbc (default)
Stream #0:1(jpn): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp (default)
Metadata:
title : Stereo
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 395 fps= 24 q=-1.0 Lsize= 30997kB time=00:00:16.99 bitrate=14938.1kbits/s speed=1.02x
video:30645kB audio:333kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.061779%