Esta é a versão do ffmpeg com a qual estou trabalhando nos testes do Debian -
$ ffmpeg -version
ffmpeg version 4.4.1-2+b1 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 11 (Debian 11.2.0-12)
configuration: --prefix=/usr --extra-version=2+b1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
Este é o comando com o qual eu estava tentando trabalhar -
$ ffmpeg -ss 00:22:20 -t 60 -i 123.mkv 456.mkv
Isso vem da extração/cópia de áudio de uma parte específica de um arquivo de vídeo, possível? que eu havia perguntado anos atrás.
Também dei uma olhada no FFMpeg : Criando um videoclipe de aprox. 10 segundos quando a duração do vídeo é desconhecida sem áudio - mas se eu tentar usar o timestamp como mostrado, ele erro dizendo -
Invalid duration specification for ss: 00:22:20:0.0
O arquivo de mídia que estou reproduzindo tem cerca de 50 minutos ímpares e eu só quero esse arquivo de um minuto 22:20 segundos e um minuto depois.
Alguma coisa mudou no ffmpeg ou na maneira como ele processa as coisas. Eu obviamente mudei os nomes dos arquivos. No entanto, é isso que mostra o arquivo como se eu o colocasse em mkvinfo
$ mkvinfo 456.mkv
+ EBML head
|+ EBML version: 1
|+ EBML read version: 1
|+ Maximum EBML ID length: 4
|+ Maximum EBML size length: 8
|+ Document type: matroska
|+ Document type version: 4
|+ Document type read version: 2
+ Segment: size 6959454
|+ Seek head (subentries will be skipped)
|+ EBML void: size 81
|+ Segment information
| + Timestamp scale: 1000000
| + Title: 123
| + Multiplexing application: Lavf58.76.100
| + Writing application: Lavf58.76.100
| + Segment UID: 0x19 0xba 0x01 0xe0 0xed 0x6f 0x79 0xef 0xfb 0x9d 0xe6 0xcd 0x2b 0xad 0x2f 0x79
| + Duration: 00:23:54.905000000
|+ Tracks
| + Track
| + Track number: 1 (track ID for mkvmerge & mkvextract: 0)
| + Track UID: 4989308985802999081
| + "Lacing" flag: 0
| + Name: abcd
| + Language: und
| + Codec ID: V_MPEG4/ISO/AVC
| + Track type: video
| + Default duration: 00:00:00.041708333 (23.976 frames/fields per second for a video track)
| + Video track
| + Pixel width: 1280
| + Pixel height: 720
| + Interlaced: 2
| + Video colour information
| + Horizontal chroma siting: 1
| + Vertical chroma siting: 2
| + Codec's private data: size 45 (H.264 profile: High @L3.1)
| + Track
| + Track number: 2 (track ID for mkvmerge & mkvextract: 1)
| + Track UID: 5858605359486045911
| + "Lacing" flag: 0
| + Name: abcd
| + Language: eng
| + Codec ID: A_VORBIS
| + Track type: audio
| + Audio track
| + Channels: 2
| + Sampling frequency: 48000
| + Bit depth: 32
| + Codec's private data: size 3959
| + Track
| + Track number: 3 (track ID for mkvmerge & mkvextract: 2)
| + Track UID: 6757137498994684877
| + "Lacing" flag: 0
| + Name: abcd
| + Language: eng
| + Codec ID: S_TEXT/ASS
| + Track type: subtitles
| + Codec's private data: size 576
|+ Tags
| + Tag
| + Targets
| + Simple
| + Name: COMMENT
| + String: abcd
| + Simple
| + Name: ENCODER
| + String: Lavf58.76.100
| + Tag
| + Targets
| + Track UID: 4989308985802999081
| + Simple
| + Name: BPS
| + String: 1050683
| + Simple
| + Name: BPS
| + Tag language: eng
| + String: 1050683
| + Simple
| + Name: DURATION
| + Tag language: eng
| + String: 00:47:01.110000000
| + Simple
| + Name: NUMBER_OF_FRAMES
| + String: 67639
| + Simple
| + Name: NUMBER_OF_FRAMES
| + Tag language: eng
| + String: 67639
| + Simple
| + Name: NUMBER_OF_BYTES
| + String: 370511729
| + Simple
| + Name: NUMBER_OF_BYTES
| + Tag language: eng
| + String: 370511729
| + Simple
| + Name: _STATISTICS_WRITING_APP
| + String: mkvmerge v13.0.0 ('The Juggler') 64bit
| + Simple
| + Name: _STATISTICS_WRITING_APP
| + Tag language: eng
| + String: mkvmerge v13.0.0 ('The Juggler') 64bit
| + Simple
| + Name: _STATISTICS_WRITING_DATE_UTC
| + String: 2018-09-20 14:51:30
| + Simple
| + Name: _STATISTICS_WRITING_DATE_UTC
| + Tag language: eng
| + String: 2018-09-20 14:51:30
| + Simple
| + Name: _STATISTICS_TAGS
| + String: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
| + Simple
| + Name: _STATISTICS_TAGS
| + Tag language: eng
| + String: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
| + Simple
| + Name: ENCODER
| + String: Lavc58.134.100 libx264
| + Simple
| + Name: DURATION
| + String: 00:01:00.022000000
| + Tag
| + Targets
| + Track UID: 5858605359486045911
| + Simple
| + Name: BPS
| + String: 640000
| + Simple
| + Name: BPS
| + Tag language: eng
| + String: 640000
| + Simple
| + Name: DURATION
| + Tag language: eng
| + String: 00:47:01.120000000
| + Simple
| + Name: NUMBER_OF_FRAMES
| + String: 88160
| + Simple
| + Name: NUMBER_OF_FRAMES
| + Tag language: eng
| + String: 88160
| + Simple
| + Name: NUMBER_OF_BYTES
| + String: 225689600
| + Simple
| + Name: NUMBER_OF_BYTES
| + Tag language: eng
| + String: 225689600
| + Simple
| + Name: _STATISTICS_WRITING_APP
| + String: mkvmerge v13.0.0 ('The Juggler') 64bit
| + Simple
| + Name: _STATISTICS_WRITING_APP
| + Tag language: eng
| + String: mkvmerge v13.0.0 ('The Juggler') 64bit
| + Simple
| + Name: _STATISTICS_WRITING_DATE_UTC
| + String: 2018-09-20 14:51:30
| + Simple
| + Name: _STATISTICS_WRITING_DATE_UTC
| + Tag language: eng
| + String: 2018-09-20 14:51:30
| + Simple
| + Name: _STATISTICS_TAGS
| + String: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
| + Simple
| + Name: _STATISTICS_TAGS
| + Tag language: eng
| + String: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
| + Simple
| + Name: ENCODER
| + String: Lavc58.134.100 libvorbis
| + Simple
| + Name: DURATION
| + String: 00:01:00.003000000
| + Tag
| + Targets
| + Track UID: 6757137498994684877
| + Simple
| + Name: BPS
| + String: 40
| + Simple
| + Name: BPS
| + Tag language: eng
| + String: 40
| + Simple
| + Name: DURATION
| + Tag language: eng
| + String: 00:46:08.244000000
| + Simple
| + Name: NUMBER_OF_FRAMES
| + String: 636
| + Simple
| + Name: NUMBER_OF_FRAMES
| + Tag language: eng
| + String: 636
| + Simple
| + Name: NUMBER_OF_BYTES
| + String: 14113
| + Simple
| + Name: NUMBER_OF_BYTES
| + Tag language: eng
| + String: 14113
| + Simple
| + Name: _STATISTICS_WRITING_APP
| + String: mkvmerge v13.0.0 ('The Juggler') 64bit
| + Simple
| + Name: _STATISTICS_WRITING_APP
| + Tag language: eng
| + String: mkvmerge v13.0.0 ('The Juggler') 64bit
| + Simple
| + Name: _STATISTICS_WRITING_DATE_UTC
| + String: 2018-09-20 14:51:30
| + Simple
| + Name: _STATISTICS_WRITING_DATE_UTC
| + Tag language: eng
| + String: 2018-09-20 14:51:30
| + Simple
| + Name: _STATISTICS_TAGS
| + String: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
| + Simple
| + Name: _STATISTICS_TAGS
| + Tag language: eng
| + String: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
| + Simple
| + Name: ENCODER
| + String: Lavc58.134.100 ssa
| + Simple
| + Name: DURATION
| + String: 00:23:54.905000000
|+ Cluster
Agora, o que posso inferir do que foi dito acima é que o ffmpeg apenas cortou o vídeo e, portanto, mostra as propriedades da versão antiga, incluindo o tempo, embora o arquivo de mídia que criei tenha cerca de um minuto.
Existe alguma maneira de fazer melhor, o que significa que ele usa a versão ffmpeg de hoje e dá o mesmo, também a duração mudaria para um minuto em vez dos 23 minutos que está mostrando?
FWIW, mkvmerge do meu sistema atual é -
$ mkvmerge --veion
mkvmerge v64.0.0 ('Willows') 64-bit
A amostra que você postou parece boa, mas a mensagem de erro sugere que havia um extra
0.0
anexado à hora de início quando você executou o comando. Isso deve funcionar: