3 ms·
See also: * https://ffmpeg.guide/ https://ffmpeg.guide/ — create complex FFmpeg filtergraphs quickly and correctly * https://www.hadet.dev/ffmpeg-cheatsheet/
by asicsp 3y ago
See also:
* https://ffmpeg.guide/ https://ffmpeg.guide/ — create complex FFmpeg filtergraphs quickly and correctly
* https://www.hadet.dev/ffmpeg-cheatsheet/ https://www.hadet.dev/ffmpeg-cheatsheet/ — clipping, adding fade in/out, scaling, concat, etc
- arun-mani-j 3y agoffmpeg.guide is really awesome. Do we have something similar for ImageMagick?
- asicsp 3y agoI'm not aware of one. I checked my bookmarks and found https://imagemagick.org/Usage/basics/ https://imagemagick.org/Usage/basics/ which has examples, discusses philosophy and methodology
- boomboomsubban 3y agoThe second link's clipping command is not ideal in my experience. For some god known reason, ffmpeg behaves differently depending on whether you put the -ss and -t/-to flags before or after the -i flag. And for me, before worked better. It's also an issue in the original post.
- throw7 3y agomy understanding is options in the cli are tied to either global options, input file options, or output file options; so placing options after -i option(s) would tie it to the output file... i'm definitely not an ffmpeg expert though.
- zebracanevra 3y agoEffectively, placing ss before the input filename seeks the file (the container?) without decoding it. Placing it after will decode the streams while skipping to the point you specify. Seeking the container is usually much faster than decoding and then throwing away what you don't need, but it has fatal flaw: most videos use p-frames and thus require you to decode the frames before it. So, say you want to skip to 60 seconds in. The solution is to do "-ss 50 -i input.mkv -ss 10", which is fast and should get the keyframes you need.
- aargh_aargh 3y agoThat trick (-ss -i -ss) should not be necessary by default (unless you use -noaccurate_seek) according to current documentation. But I haven't verified it. https://ffmpeg.org/ffmpeg-all.html#toc-Main-options https://ffmpeg.org/ffmpeg-all.html#toc-Main-options -ss position (input/output) When used as an input option (before -i), seeks in this input file to position. Note that in most formats it is not possible to seek exactly, so ffmpeg will seek to the closest seek point before position. When transcoding and -accurate_seek is enabled (the default), this extra segment between the seek point and position will be decoded and discarded. When doing stream copy or when -noaccurate_seek is used, it will be preserved. When used as an output option (before an output url), decodes but discards input until the timestamps reach position.
- boomboomsubban 3y agoSpeed was never my concern, judging by what you said I think putting the -as after tried to cut things between p-frames and that often caused probls with the cut, while putting it before started the cut at the last p-frame? Something like that, I don't use ffmpeg enough to remember what problems I was having but I remember what fixed it.
- seba_dos1 3y ago> For some god known reason ...which becomes obvious once you notice that options apply either to one of the inputs or output.
- deleted 3y ago[deleted]
- rendaw 3y agoffmpeg.guide looks amazing, but it feels like ffmpeg should really have something better itself. It's crazy trying to shoehorn a graph (non-linear) into a commandline (flat, linear). Even just a more verbose json config would be great.
- throwaway290 3y agoOr just use ffmpeg-python.