Most active commenters
  • porridgeraisin(3)

←back to thread

FFmpeg 8.0

(ffmpeg.org)
985 points gyan | 26 comments | | HN request time: 0.001s | source | bottom
Show context
pmarreck ◴[] No.44985875[source]
Impressed anytime I have to use it (even if I have to study its man page again or use an LLM to construct the right incantation or use a GUI that just builds the incantation based on visual options). Becoming an indispensable transcoding multitool.

I think building some processing off of Vulkan 1.3 was the right move. (Aside, I also just noticed yesterday that Asahi Linux on Mac supports that standard as well.)

replies(3): >>44985906 #>>44986225 #>>44986323 #
Culonavirus ◴[] No.44985906[source]
> incantation

FFmpeg arguments, the original prompt engineering

replies(4): >>44985969 #>>44985984 #>>44986587 #>>44987357 #
jeanlucas ◴[] No.44985984[source]
nope, that would be handling tar balls

ffmpeg right after

replies(4): >>44986062 #>>44986260 #>>44986660 #>>44987094 #
1. porridgeraisin ◴[] No.44986062[source]
Personally I never understood the problem with tar balls.

The only options you ever need are tar -x, tar -c (x for extract and c for create). tar -l if you wanna list, l for list.

That's really it, -v for verbose just like every other tool if you wish.

Examples:

  tar -c project | gzip > backup.tar.gz
  cat backup.tar.gz | gunzip | tar -l
  cat backup.tar.gz | gunzip | tar -x
You never need anything else for the 99% case.
replies(7): >>44986123 #>>44986158 #>>44986160 #>>44986179 #>>44986359 #>>44986655 #>>44992428 #
2. drivers99 ◴[] No.44986123[source]
Except it's tar -t to list, not -l
replies(1): >>44986206 #
3. sdfsdfgsdgg ◴[] No.44986158[source]
> tar -l if you wanna list, l for list.

Surely you mean -t if you wanna list, t for lisT.

l is for check-Links.

     -l, --check-links
             (c and r modes only) Issue a warning message unless all links to each file are archived.
And you don't need to uncompress separately. tar will detect the correct compression algorithm and decompress on its own. No need for that gunzip intermediate step.
replies(1): >>44986212 #
4. bigstrat2003 ◴[] No.44986160[source]
The problem is it's very non-obvious and thus is unnecessarily hard to learn. Yes, once you learn the incantations they will serve you forever. But sit a newbie down in front of a shell and ask them to extract a file, and they struggle because the interface is unnecessarily hard to learn.
replies(1): >>44986446 #
5. tombert ◴[] No.44986179[source]
Yeah I never really understood why people complain about tar; 99% of what you need from it is just `tar -xvf blah.tar.gz`.
replies(2): >>44986239 #>>44986693 #
6. porridgeraisin ◴[] No.44986206[source]
Whoops, lol. Well that's unfortunate.
7. porridgeraisin ◴[] No.44986212[source]
> -l

Whoops, lol.

> on its own

Yes.. I'm aware, but that's more options, unnecessary too, just compose tools.

replies(1): >>44986230 #
8. sdfsdfgsdgg ◴[] No.44986230{3}[source]
That's the thing. It’s not more options. During extraction it picks the right algorithm automatically, without you needing to pass another option.
9. aidenn0 ◴[] No.44986239[source]
You for got the -z (or -a with a recent gnutar).
replies(1): >>44986300 #
10. adastra22 ◴[] No.44986300{3}[source]
It’s no longer needed. You can leave it out and it auto-detects the file format.
11. jeanlucas ◴[] No.44986359[source]
it was just a reference to xkcd#1168

I wasn't expecting the downvotes for an xkcd reference

12. encom ◴[] No.44986446[source]
It's very similar to every other CLI program, I really don't understand what kind of usability issue you're implying is unique to tar?
replies(1): >>44986903 #
13. BeepInABox ◴[] No.44986655[source]
For anyone curious, unless you are running a 'tar' binary from the stone ages, just skip the gunzip and cat invocations. Replace .gz with .xz or other well known file ending for different compression.

  Examples:
    tar -cf archive.tar.gz foo bar  # Create archive.tar.gz from files foo and bar.
    tar -tvf archive.tar.gz         # List all files in archive.tar.gz verbosely.
    tar -xf archive.tar.gz          # Extract all files from archive.tar.gz
replies(1): >>44991119 #
14. CamperBob2 ◴[] No.44986693[source]
What value does tar add over plain old zip? That's what annoys me about .tar files full of .gzs or .zips (or vice versa) -- why do people nest container formats for no reason at all?

I don't use tape, so I don't need a tape archive format.

replies(4): >>44987064 #>>44987118 #>>44988357 #>>44989861 #
15. mrguyorama ◴[] No.44986903{3}[source]
As has been clearly demonstrated in this very thread, why is "Please list what files are in this archive" the option "-t"?

Principle of least surprise and all that.

replies(1): >>44988913 #
16. diggernet ◴[] No.44987064{3}[source]
A tar of gzip or zip files doesn't make sense. But gzipping or zipping a tar does.

Gzip only compresses a single file, so .tar.gz lets you bundle multiple files. You can do the same thing with zip, of course, but...

Zip compresses individual files separately in the container, ignoring redundancies between files. But .tar.gz (and .tar.zip, though I've rarely seen that combination) bundles the files together and then compresses them, so can get better compression than .zip alone.

17. fullstop ◴[] No.44987118{3}[source]
zip doesn't retain file ownership or permissions.
replies(1): >>44987176 #
18. diggernet ◴[] No.44987176{4}[source]
Good point. And if I remember right, tar allows longer paths than zip.
19. beagle3 ◴[] No.44988357{3}[source]
The zip directory itself is uncompressed, and if you have lots of small files with similar names, zipping the zip makes a huge difference. IIRC in the HVSC (C64 SID music archive), the outer zip used to save another 30%.
20. encom ◴[] No.44988913{4}[source]
And why is -v the short option for --invert-match in grep, when that's usually --verbose or --version in lots of other places. These idiosyncrasies are hardly unique to tar.
21. dns_snek ◴[] No.44989861{3}[source]
Plain old zip is tricky to parse correctly. If you search for them, you can probably find about a dozen rants about all the problems of working with ZIP files.
22. mkl ◴[] No.44991119[source]
> tar -cf archive.tar.gz foo bar

This will create an uncompressed .tar with the wrong name. You need a z option to specify gzip.

replies(1): >>44991556 #
23. Intermernet ◴[] No.44991556{3}[source]
Apparently this is now automatically determined by the file name, but I still habitually add the flag. 30 years of muscle memory is hard to break!
replies(1): >>44991953 #
24. mkl ◴[] No.44991953{4}[source]
I tried it to check before making the comment. In Ubuntu 25.04 it does not automatically enable compression based on the filename. The automatic detection when extracting is based on file contents, not name.
replies(1): >>44997537 #
25. themafia ◴[] No.44992428[source]

    gzip -dc backup.tar.gz | tar -x
You can skip a step in your pipeline.
26. BenjiWiebe ◴[] No.44997537{5}[source]
If you add a for auto, it will choose the right compression based on the file name.

tar -caf foo.tar.xz foo

Will be an xz compressed tarball.