3
I'm trying to extract a subtitle from a Blu-ray disc and it is an hdmv_pgs_subtitle
. So I try
ffmpeg -i file.m2ts -map 0:3 -scodec copy rip3/test.sub
and get
Could not write header for output file #0 (incorrect codec parameters ?):
Operation not permitted
Then I do
ffmpeg -i file.m2ts -map 0:3 -scodec copy rip3/test.sup
ffmpeg -i file.m2ts -map 0:3 -scodec copy rip3/test.srt
and a bunch of other different extensions, until I give .mkv
a shot, which works.
How can I find what extensions ffmpeg allows? I haven't found one place that e.g. names .mkv
as an extension
ffmpeg -formats
mentions matroska
, but doesn't say that .mkv
is the extension. So is there a way to find all supported file extensions for ffmpeg?
EDIT: After reading the answer from slhck I found the extensions by doing this command in the sourcefolder.
find . -type f -iname "*.c" -exec egrep -H ".extensions" {} \;
The filename will give some information about what kind of format it is.
To my knowledge HDMV PGS subtitles cannot be "exported" to a standalone format. What do you need to do with the subtitles, specifically? – slhck – 2013-09-23T19:58:08.420
i've never been much good with ffmpeg but fwiw(prob not much!!)besides -formats there's also ffmpeg -codecs – barlop – 2013-09-23T19:58:37.107
@slhck it was for ripping a bluray I had. I wanted to dump audio and subtitles and encode the movie. This was really hard because I wanted to do it incrementally (first movie, audio and subtitles) and I couldn't manage to dump the subtitles because I couldn't find the proper extension. Read a couple of places that it was sup, and know of others that are sub, srt, mpsub and some others I saw doing ffmpeg -codecs and -formats.
@ barlop fwiw codecs is what ffmpeg can read from and encode to not necessarily what it can output to. Format in the case of ffmpeg I think is the container of encoding. – plitter – 2013-09-23T20:40:08.177