Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

One can use it instead of cat to display text files. Easy syntax to remember.

  ffmpeg -v quiet -f data -i file.txt -map 0:0 -c text -f data -


I use dd for that.

    dd if=./file.txt
Can you also format your drive with ffmpeg? I'm looking for a more versatile dd replacement..


It can't create partition tables or filesystems, so no, but

  ffmpeg -f data -i /dev/zero -map 0:0 -c copy -f data - > /dev/sda
is roughly equivalent to to

  dd status=progress if=/dev/zero of=/dev/sda


you might need a -disposition default type option, otherwise, it introduce some abnormal behavior


I'm dying.



"Do you know ffmpeg supports OCR? I haven't found the command yet, but it does support it."

This is probably 80% of my experience with ffmpeg, to be honest, but the other 20% is invaluable enough anyway.


I thought this was a joke, but it really exists! https://ffmpeg.org/ffmpeg-filters.html#ocr


Lol what. I have a bot that processes ~50 videos a day, burning in translated whisper-generated subtitles. It also translates images using Tesseract, then overlaying texts in-place. I once thought of exporting frames as images to maybe do this for video too, I actually did not even start to think FFMPEG would have tesseract support on top of everything.

Later on though I've realized the quality of tesseract's OCR on arbitrary media is often quite bad. Google translates detection and replacement is so much ahead my current image system I'd think I would just somehow reutilize that for my app, either thru public API or browser emulation ...


I'm glad we've reached a point where there is quality parody content online for our industry.


Check out Krazam. I quote their Microservices video on a regular basis (https://youtu.be/y8OnoxKotPQ)


THIS!!! It was so refreshing!


That was one of the funniest things I've seen in a while!!!! I had to stop drinking my decaf for fear of spitting it all over my computer I was laughing out loud so much!

(ps: and no, it's not Rick Astley/Never Gonna Give You Up)


The artfully inserted, corrupted predicted frames was :chefskiss:


Good thing it's now multi-threaded so it can process all those command line arguments in parallel!


I bet ffmpeg special cases that combination of flags and calls cat.


Ah now I can replace all my useless uses of cat with ffmpeg


That doesn't work[1], but

  ffmpeg -v quiet -f data -i file.txt -map 0:0 -c copy -f data -
does.

[1] “Encoder 'text' specified, but only '-codec copy' supported for data streams”


can I use ffmpeg to embed a gif in a Hacker News comment, because I want that so much right now


No, but you can use ffmpeg to create a GIF from ASCII art embedded in a Hacker News comment:

  $ ffmpeg -v quiet -codecs | egrep -i 'gif|ascii'
   D.V.L. ansi                 ASCII/ANSI art
   DEV..S gif                  CompuServe GIF (Graphics Interchange Format)
(“D” and “E” in the first field indicate support for decoding and encoding)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: