Live data from Hacker News

FFmpeg 4.3

ffmpeg.org

151–160 of 226 posts

Re: FFmpeg 4.3

#151

Earlier quoted context omitted.

On my side, I frequently forget my own age, people's name, things my girlfriend remembers from 5 summers ago. However, I'll never forget things like "tar -zxvf", "ffmpeg -i vid.mp4 image-%04d.png" and "convert image-*.png +dither anim.gif".

I have muscle memorized "youtube-dl --extract-audio --audio-format mp3 https://YouTube.com?v=123etc"

You probably want "-f bestaudio" instead of "--extract-audio". The former will download just the audio and skip the video which is significantly faster (and cheaper when on a metered connection). However you will have to do the conversion to MP3 yourself afterwards (e.g. with ffmpeg) if you want that format specifically.

Re: FFmpeg 4.3

#152
post #47

I wanted to create a slideshow a couple weeks ago and came across this article [0] on creating a Ken Burns Effect Slideshow. Very cool and is a great demo of some of ffmpeg's functionality. However, the final command is a little crazy: ffmpeg -i 1.jpg -i 2.jpg -i 3.jpg -filter_complex "color=c=black:r=60:size=1280x800:d=10[black];[0:v]format=pix_fmts=yuva420p,crop=w=2*floor(iw/2):h=2*floor(ih/2),zoompan=z='if(eq(on,1…

Just did a little 1-day hackathon project where we built out a video presentation automation tool. One of those components would compile together a series of photos, video, and audio clips (with optional text to go with it for subtitle generation) and it would build everything out. The final command would look insane, there being a line for each added clip and any spacing between them, but it worked perfectly.

Re: FFmpeg 4.3

#153

Earlier quoted context omitted.

On my side, I frequently forget my own age, people's name, things my girlfriend remembers from 5 summers ago. However, I'll never forget things like "tar -zxvf", "ffmpeg -i vid.mp4 image-%04d.png" and "convert image-*.png +dither anim.gif".

I have muscle memorized "youtube-dl --extract-audio --audio-format mp3 https://YouTube.com?v=123etc"

These days, with AAC being supported pretty much everywhere you're probably better off just using the " -f 140" option to get the 128kbps m4a file, which at least saves the further (albeit subtle) degradation caused by another lossy to lossy transcode.

Re: FFmpeg 4.3

#154

ffmpeg is absolutely phenomenal. I recently used it to combine multiple separate audio tracks from a webrtc session into a single file. For anyone that hates compiling ffmpeg from source, John Van Sickle does an amazing job of doing the work for you by making binaries publicly available for each version: https://johnvansickle.com/ffmpeg/

Good resource, but I usually end up building my own to take advantage of the improved AAC encoding with libfdk-aac which can't be distributed pre-compiled.

Re: FFmpeg 4.3

#155
I use ffmpeg to run a fun twitch stream VOD to highlight reel pipeline. Example with explicit language: https://www.youtube.com/watch?v=ETR3IXyGgEo. ffmpeg handles everything from frame-extraction (to feed a deep learning model), audio spectrogram calculation (also features for the model), video trimming (to cut the interesting clips), video concatenation (to join the clips), and the text overlay

Re: FFmpeg 4.3

#156

I use ffmpeg to run a fun twitch stream VOD to highlight reel pipeline. Example with explicit language: https://www.youtube.com/watch?v=ETR3IXyGgEo . ffmpeg handles everything from frame-extraction (to feed a deep learning model), audio spectrogram calculation (also features for the model), video trimming (to cut the interesting clips), video concatenation (to join the clips), and the text overlay

What is the deep learning model and what does it do?

Re: FFmpeg 4.3

#157
post #156

I use ffmpeg to run a fun twitch stream VOD to highlight reel pipeline. Example with explicit language: https://www.youtube.com/watch?v=ETR3IXyGgEo . ffmpeg handles everything from frame-extraction (to feed a deep learning model), audio spectrogram calculation (also features for the model), video trimming (to cut the interesting clips), video concatenation (to join the clips), and the text overlay

What is the deep learning model and what does it do?

It's just a standard vision convnet like ResNet-18, or ResNet-50. It gets fed facecam with an audio spectrogram concatenated to it (pretty hacky, but seems to help). All it does is binary prediction of {interesting, not interesting}, and I use some heuristics to pick regions of video based on how many frames were "interesting" to the model.

Feel free to take a look at the (research quality at best) code: https://github.com/eqy/autotosis

Re: FFmpeg 4.3

#158
post #55
post #47

I wanted to create a slideshow a couple weeks ago and came across this article [0] on creating a Ken Burns Effect Slideshow. Very cool and is a great demo of some of ffmpeg's functionality. However, the final command is a little crazy: ffmpeg -i 1.jpg -i 2.jpg -i 3.jpg -filter_complex "color=c=black:r=60:size=1280x800:d=10[black];[0:v]format=pix_fmts=yuva420p,crop=w=2*floor(iw/2):h=2*floor(ih/2),zoompan=z='if(eq(on,1…

If you read the post by the link, each of these settings (or rather groups thereof) look reasonable and readabale in isolation. This demonstrates, in a rather extreme example, the colossal composability of the interface, even if it lacks nice formatting here.

I feel the same about imagemagick. Oh the things you can do with just curl, bash, imagemagick... And gnuplot if you're rich.

Re: FFmpeg 4.3

#159
post #156

Earlier quoted context omitted.

What is the deep learning model and what does it do?

It's just a standard vision convnet like ResNet-18, or ResNet-50. It gets fed facecam with an audio spectrogram concatenated to it (pretty hacky, but seems to help). All it does is binary prediction of {interesting, not interesting}, and I use some heuristics to pick regions of video based on how many frames were "interesting" to the model. Feel free to take a look at the (research quality at best) code: https://gith…

Thanks.

Re: FFmpeg 4.3

#160
post #87

Does anyone have a better documentation source for modern ffmpeg? Usually when I use it I get all sorts of different answers with different 'methods', and the official docs only confuse it more. Also I hope to see pure GPU transcoding sometime. H264 to h265 transcodes in pure GPU space are Uber fast, but so far only done by other software.

> Also I hope to see pure GPU transcoding sometime. H264 to h265 transcodes in pure GPU space are Uber fast, but so far only done by other software. FFmpeg has had pure GPU transcoding for quite some time. See https://trac.ffmpeg.org/wiki/HWAccelIntro It even has a GPU-based scaler for NVIDIA.

It doesn't work pure GPU for transcoding between formats. You can do h264 to h264, but not h264 to h265, which can be done with other software if the hardware supports it.
Post reply on HN