Trying to extract subtitles to txt file
ffmpeg.exe -i video.mkv -c copy -map 0:s:0 subs.txt
but get the following error
Unable to find a suitable output format for 'subs.txt'
subs.txt: Invalid argument
full console output:
ffmpeg version N-81872-gbe1d324 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.4.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
libavutil 55. 32.100 / 55. 32.100
libavcodec 57. 60.101 / 57. 60.101
libavformat 57. 51.102 / 57. 51.102
libavdevice 57. 0.102 / 57. 0.102
libavfilter 6. 63.100 / 6. 63.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 2.100 / 2. 2.100
libpostproc 54. 0.100 / 54. 0.100
Input #0, matroska,webm, from 'video.mkv':
Metadata:
CREATION_TIME : 2018-10-28T02:41:51Z
ENCODER : Lavf57.7.2
Duration: 00:11:45.39, start: 0.000000, bitrate: 2774 kb/s
Stream #0:0: Video: h264 (Main), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 180k tbc (default)
Stream #0:1(eng): Audio: aac (LC), 48000 Hz, stereo, fltp (default)
Metadata:
title : Stereo
Stream #0:2(eng): Subtitle: ass
[NULL @ 00000000038c9540] Unable to find a suitable output format for 'subs.txt'
subs.txt: Invalid argument
It only works when I specify ass
extension for output file like this:
ffmpeg.exe -i video.mkv -c copy -map 0:s:0 subs.ass
it extraxts properly and creates subs.ass file with subtitles
How ffmpeg interprets extension of output file?
Why do I have to specify exact extension for output file?
similar question, but different error here: ffmpeg unable to find a suitable output format for 'subs.srt'