Estou no Linux Mint 19. Estou tentando extrair um videoclipe de um arquivo mkv.
Encontrei um comando de amostra antigo em algumas notas que tinha, mas para mpegs. Alterei as strings relevantes e tentei executar este comando:
ffmpeg -i input.mkv -ss 00:12:38.000 -t 00:02:71 output.mkv
Recebi esta mensagem de erro:
Invalid duration specification for t: 00:02:71
Eu queria começar o clipe às 12:38 do vídeo e queria que o clipe tivesse 2:71 de duração.
A saída completa está abaixo. Obrigado por qualquer pista
Mint19Cinnamon3.8.9> ffmpeg -i input.mkv -ss 00:12:38.000 -t 00:02:71 output.mkv
ffmpeg version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
WARNING: library configuration mismatch
avcodec configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared --enable-version3 --disable-doc --disable-programs --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libtesseract --enable-libvo_amrwbenc
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
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
Input #0, matroska,webm, from 'input.mkv':
Metadata:
encoder : libebml v1.3.9 + libmatroska v1.5.2
creation_time : 2019-11-15T05:11:58.000000Z
Duration: 00:49:56.61, start: 0.000000, bitrate: 4331 kb/s
Stream #0:0(eng): Video: h264 (High), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
Metadata:
BPS-eng : 3689288
DURATION-eng : 00:49:56.577000000
NUMBER_OF_FRAMES-eng: 71846
NUMBER_OF_BYTES-eng: 1381904488
_STATISTICS_WRITING_APP-eng: mkvmerge v38.0.0 ('The Silent Type') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2019-11-15 05:11:58
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:1(eng): Audio: eac3, 48000 Hz, 5.1(side), fltp, 640 kb/s (default)
Metadata:
BPS-eng : 640000
DURATION-eng : 00:49:56.608000000
NUMBER_OF_FRAMES-eng: 93644
NUMBER_OF_BYTES-eng: 239728640
_STATISTICS_WRITING_APP-eng: mkvmerge v38.0.0 ('The Silent Type') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2019-11-15 05:11:58
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:2(eng): Subtitle: subrip
Metadata:
title : English
BPS-eng : 54
DURATION-eng : 00:47:28.011000000
NUMBER_OF_FRAMES-eng: 701
NUMBER_OF_BYTES-eng: 19492
_STATISTICS_WRITING_APP-eng: mkvmerge v38.0.0 ('The Silent Type') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2019-11-15 05:11:58
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Invalid duration specification for t: 00:02:71
Mint19Cinnamon3.8.9>
Responder1
-t 00:02:71
significa 2 minutos e 71 segundos, então deve ser escrito como -t 00:03:11
. Se você quiser que tenha 2 segundos e 710 milissegundos de duração, use-t 00:02.71