victorstanciu

Joined 13 years ago

Karma
719
Submissions
104
Member since
Aug 1
https://tegowerk.eu
View on Hacker News

Recent submissions

Comment · 8 months ago
> tldr.sh is a community maintained database of examples, for example you can run it as tldr grep. Lots of people have told me they find it useful.

+1 for tldr. For example, here's the output of `tldr ffmpeg`:

  ffmpeg

  Video conversion tool.
  See also: `gst-launch-1.0`.
  More information: https://ffmpeg.org/ffmpeg.html#Options.

  - Extract the sound from a video and save it as MP3:
    ffmpeg -i path/to/video.mp4 -vn path/to/sound.mp3

  - Transcode a FLAC file to Red Book CD format (44100kHz, 16bit):
    ffmpeg -i path/to/input_audio.flac -ar 44100 -sample_fmt s16 path/to/output_audio.wav

  - Save a video as GIF, scaling the height to 1000px and setting framerate to 15:
    ffmpeg -i path/to/video.mp4 -filter:v 'scale=-1:1000' -r 15 path/to/output.gif

  - Combine numbered images (frame_1.jpg, frame_2.jpg, etc) into a video or GIF:
    ffmpeg -i path/to/frame_%d.jpg -f image2 video.mpg|video.gif

  - Trim a video from a given start time mm:ss to an end time mm2:ss2 (omit the -to flag to trim till the end):
    ffmpeg -i path/to/input_video.mp4 -ss mm:ss -to mm2:ss2 -codec copy path/to/output_video.mp4

  - Convert AVI video to MP4. AAC Audio @ 128kbit, h264 Video @ CRF 23:
    ffmpeg -i path/to/input_video.avi -codec:a aac -b:a 128k -codec:v libx264 -crf 23 path/to/output_video.mp4

  - Remux MKV video to MP4 without re-encoding audio or video streams:
    ffmpeg -i path/to/input_video.mkv -codec copy path/to/output_video.mp4

  - Convert MP4 video to VP9 codec. For the best quality, use a CRF value (recommended range 15-35) and -b:v MUST be 0:
    ffmpeg -i path/to/input_video.mp4 -codec:v libvpx-vp9 -crf 30 -b:v 0 -codec:a libopus -vbr on -threads number_of_threads path/to/output_video.webm
Comment · 1 year ago
> The pair, wearing only flat-soled sneakers [...]

I appreciate a good "AI" hate session as much as the next man, but these people would have had to be rescued no matter what tool they used to plan their trip, as long as the one tool they should have used--their brain--was apparently already on vacation ahead of them.

Comment · 1 year ago
Comment · 1 year ago
Shame on the author. I clicked the "cats" link in the header only to find out it's short for categories. Boo.
Comment · 1 year ago
It is! For the latest incarnation of my blog I forwent comments in favor of a simple mailto: link at the bottom of each post which prefills the email subject with the post's title. I've had significantly fewer interactions with readers this way, but they've also been much more meaningful and insightful. There is a performative nature to public forums of any kind--and HN is not immune to this--that stifles any genuine discussion, or drowns it in a sea of attention-seekers.

Yes, I am aware of the hypocritical irony of complaining about online comments in an online comment.

Comment · 1 year ago
You can use two integers, one that represents the entire number including decimals, and one that represents the precision, to know how many decimals are there. For example, you'd represent "123.45" as 12345 and 2. That's often how monetary amounts are stored in databases, to avoid a lot of common floating-point arithmetic pitfalls.
Comment · 1 year ago
Comment · 1 year ago
This reminded me of a Romanian joke from the communist era.

A son corresponds with his elderly father, who writes that he'd like to dig up the garden and plant potatoes, but the ground is hard and he's old, and can't the son come and help?

The son writes back that under no circumstances should he dig up the garden, that's where the money is hidden. The very next day, the Securitate (Romanian Secret Police) comes and digs up the entire garden looking for money.

A few days later, the son sends another letter: "I believe the garden should have been dug up by now, so you can go ahead and plant the potatoes."

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton