#6525(ffmpeg:new): Still image file format codecs are tricky to filter out of -codecs output
#6525: Still image file format codecs are tricky to filter out of -codecs output -------------------------------------+------------------------------------- Reporter: tangent | Type: Status: new | enhancement Component: ffmpeg | Priority: normal Keywords: codecs, | Version: 3.2.4 help, output | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- I am interested in constructing a short command that reliably filters `ffmpeg -codecs` output to show only the list of lossless video encoders. So far, I have come up with this: {{{ $ ffmpeg -codecs 2> /dev/null | grep '^..EV..S ' | grep -Ev 'image|bitmap' }}} The second `grep` command filters out a bunch of codecs I'm not interested in like `bmp` and `pcx` because they are not "video" codecs in the way I understand the term. There is something of a gray area here, which I will deal with below. I propose that these encoders have their `V` tag in the `DEVILS` scheme replaced by either `I` or `M`: * `I` means an "image" codec, and implies that you can only encode one frame at a time with this codec, and that each frame will have a separate image header. I believe `bmp` is in this class, for example. To make a single-file movie with this encoder, you must put it into a container like AVI, MKV, or MPEG-TS. I propose that a still image file format like `jpeg-ls` keeps its `V` tag because it is often used within an A/V container format: `avi` + `jpeg-ls` = Lossless MJPEG, so `jpeg-ls` is a "video" codec to me. I'm not aware of anyone using `avi` + `bmp`, by contrast. A thought experiment you can use to decide this issue is to ask whether you are likely to find this encoder used as the argument to an `-f` flag or a `-c:v` flag. We expect `bmp` to be used with `-f` for a "pile of frames" output, but `jpeg-ls` to be used with `-c:v` and some container format with `-f` to produce a single-file movie. * `M` means a format like `gif` or `apng` that allows multiple frames with timing information per file, so that you don't need the container if you don't need associated audio or other streams. If that idea is rejected, at least give some other way to reliably filter these codecs out of the `ffmpeg -codecs` output. I'd like to see you settle on either `bitmap` or `image` and apply that term uniformly to all of the still image file formats I'm talking about here. -- Ticket URL: <https://trac.ffmpeg.org/ticket/6525> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
* `I` means an "image" codec, and implies that you can only encode one
#6525: Still image file format codecs are tricky to filter out of -codecs output -------------------------------------+----------------------------------- Reporter: tangent | Owner: Type: enhancement | Status: closed Priority: wish | Component: avcodec Version: unspecified | Resolution: invalid Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Changes (by cehoyos): * status: new => closed * component: ffmpeg => avcodec * priority: normal => wish * version: 3.2.4 => unspecified * keywords: codecs, help, output => * resolution: => invalid Comment: Replying to [ticket:6525 tangent]: frame at a time with this codec, and that each frame will have a separate image header. I don't think this makes sense ...
I believe `bmp` is in this class, for example.
... especially since FFmpeg is supposed to work fine for piped bmp streams. I don't think this will be implemented (because the distinction you request is impossible) but feel free to send a patch to the development mailing list for discussion. -- Ticket URL: <https://trac.ffmpeg.org/ticket/6525#comment:1> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
participants (1)
-
FFmpeg