5 ms·
FFmpeg is powerful technology, yet approaching it can be very daunting. So we decided to create an approachable guide for intermediate devs. Feedback is very mu
by buss_jan 4y ago
FFmpeg is powerful technology, yet approaching it can be very daunting. So we decided to create an approachable guide for intermediate devs.
Feedback is very much appreciated.
- chewz 4y agoThank you...
- vesinisa 4y agoThink you might have a editorial content left under the headline "Installing FFmpeg Check". There are instructions for installing FFmpeg (first I thought it was maybe some tool called "FFmpeg Check" to "check" the output of an FFmpeg command line, like in the above screenshot, but this turned out not to be the case :)
- buss_jan 4y agoThanks, removed the check, it was indeed just awkwardly worded.
- dontbenebby 4y agoAgreed - I’ve been looking for a one liner to turn a series of stills into a gif for a while and buried in my todos is a note to read the documentation so thanks, I’ll read this when I’m done w/ a few other todos this morning. Someone should do a gui for common tasks it can do line there used to be the Zenmap gui for nmap. (Learning how to do those sorts of simple guis quickly in python of something is another holiday todo, if anyone has suggestions on that - all my tools thus far are gui based and I need to make sure as many folks as possible use them.)
- vanderZwan 4y agoA few years ago I went through exactly that kind of holiday todo list and created a few bash scripts for video-to-gif, gif-to-video, and image stabilization. Here's the script I cobbled together from various internet searches for the video-to-gif one, it works well enough for that purpose and all you have to do is remove the video-to-PNG bits at the start.: https://gist.github.com/JobLeonard/5f99b712ba77b7aa82696c1368fd265f https://gist.github.com/JobLeonard/5f99b712ba77b7aa82696c136...
- dontbenebby 4y agoThanks for the code! I'm going to pull down a copy and take a look and then later tweak it... The goal is gonna be to have something where I can give it units of time as arguments and do clips. So for example, you could give it a dot mkv and say from 30 seconds in to 300 seconds in, take that into stills then create a GIF... or an aPNG but... I'll take a look, play around, I need to learn to read undocumented code better this will be a good exercise since it's not some possibly zero day malware that didn't get past noscript like the last time I did that... (But to swing it back to graphics: there a reason people don't use apng more? The reason I got ages ago is PNG is more for line drawings, not raster images like what you'd normally use a JPEG format for, but it's my understanding you can play with settings and get a similar level of compression without the patent encumberment of things like GIF with aPNG, and that it's supported by pretty much every browser except for... [checks wikipedia] Internet Explorer[1]?) Anyways TL;DR: sorry to wall of text you, I'm pounding caffeine and reading the news and jumping between several projects at once -- thanks for the code, I'm going to take a look later -- right now gotta switch locations in ~10 minutes like I'm a Tor circuit ;-) https://en.wikipedia.org/wiki/APNG#Support https://en.wikipedia.org/wiki/APNG#Support
- TruffleLabs 4y agoHandBrake is your gui to FFMpeg "HandBrake uses FFmpeg under the hood and generally can open whatever FFmpeg will, in addition to disc-based formats like DVD and Blu-ray." Via https://handbrake.fr/docs/en/1.3.0/technical/source-formats.html https://handbrake.fr/docs/en/1.3.0/technical/source-formats....
- dontbenebby 4y agoThanks for reminding me of this I wasn’t aware it was still being maintained- it IS useful
- antihero 4y agoThis is absolutely fantastic, thanks!
- bambax 4y agoExcellent guide, thanks! Shameless plug: a while ago I wrote a simple Python script to remove silent parts from video using ffmpeg, which AFAIK it doesn't do out of the box: https://github.com/bambax/Remsi https://github.com/bambax/Remsi It might be helpful to others.
- asicsp 4y agoSee also: https://github.com/WyattBlue/auto-editor https://github.com/WyattBlue/auto-editor (automatically edit video and audio by analyzing a variety of methods, most notably audio loudness)
- dceddia 4y agoLate 2020 I had the same thought, I was making screencasts and hated doing all the cutting to turn my 45 minutes of mistakes into a 3 minute video. So I made a similar script in Node, where it used ffmpeg’s silencedetect and instead of outputting a new video, it saved an EDL file that I could import into an editor like DaVinci Resolve, and then I could fine tune the edits. As soon as that worked I wanted more - mostly just really wanted the process to be interactive and real-time, instead of the run-check-tweak-repeat cycle of using a script. So I ended up down the rabbit hole of building a video editor instead of making screencasts, and now Recut exists (https://getrecut.com https://getrecut.com). It’s basically an interactive silence remover. I still haven’t finished those screencasts but now I have an editor haha. While it’s pretty basic, it’s saving folks a bunch of time, and there’s lots more cool stuff I want to add between automations and basic manual editing features.
- vagrantJin 4y agoWell done sir! Your're a hacker role model.
- tnorthcutt 4y ago1. Recut looks awesome, and 2. "I still haven’t finished those screencasts but now I have an editor" amazing :D
- jojohack 4y ago
- jpmattia 4y agoIt's a nice guide, and it will be very useful to a large number of folks. > Feedback is very much appreciated. Nothing about captions that I could find quickly, which seems like an oversight.
- buss_jan 4y agoIt is indeed, thanks for pointing it out. We'll add something about adding text.
- coldpie 4y agoThank you. Please get rid of the cookie popup. If a lawyer tells you you need it, find a better lawyer.
- ryandrake 4y agoI agree with this one. On mobile it's a full-screen capture, too. Totally overboard. Why would a reference guide even need cookies? If the author is worried about lawyers, I'd just ditch the cookie use altogether.
- waltbosz 4y agoHow long before browsers have a built in setting to automatically tell these cookie prompts "essential cookies only please"?
- pessimizer 4y agoNever. If there's anything that browser developers hate, it's for their users to have fine control over what the sites they visit either save (or run) on their computers. proof: they've had plenty of time, and even browsers that claim to be public services can't even keep the APIs stable for cookie/storage control.
- Eisenstein 4y agoopposing proof: Brave does.
- pessimizer 4y agoGodspeed to Brave.
- GeorgeWBasic 4y agoI sure would love it if they came up with a way to block those "intent to leave" popups too.
- 1vuio0pswjnm7 4y ago
- throw7 4y agoAn example on how to seek and cut video exactly on it's "I-frames" would be nice. The few times I've searched, I've never really found what I'm looking for. Usually I just use avidemux to seek and cut to keyframes.
- Melatonic 4y agoI frames are full frames as far as I know - they are considered keyframes because you CAN physically jump to them. In between frames are going through temporal compression (all frames are going through image compression individually as well) which means they rely on the previous and next frame for information.
- astrange 4y agoYou shouldn't need to care about that; video formats should support clipping to non-keyframes by including the preceding GOP at negative playback times, so it skips to the frame you started the clip at. (MOV in fact does support this, but ffmpeg doesn't play it back properly.)
- gyan 4y ago> ffmpeg doesn't play it back properly Can't repro here. Commands: ffmpeg -ss X -i INPUT -c copy -t 10 test.mp4 ffplay test.mp4 where X is not a KF time. Plays from X with audio in sync for 10 secs.
- astrange 4y agoWell, I haven't tried it recently, but it's probably rounding your start time to the nearest keyframe.
- deleted 4y ago[deleted]
- rogerz46 4y agoThank you so much for sharing this and really help my daily tasks. I can automate them in CLI instead of GUI now.
- vovi-z 4y agoI'm learning ffmpeg to do some audio/visual manipulation for a backend service and was looking for the basics. This is perfect. As far as feedback goes, I noticed when running through the guide that the following command is missing an -i flag: ffplay -vf "drawtext=text='HELLO THERE':y=h-text_h-10:x=(w/2-text_w/2):fontsize=200:f I've already learned a lot from the ffmpeg concepts section. Appreciate it.