this post was submitted on 29 May 2025
33 points (100.0% liked)

Linux

54767 readers
732 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 6 years ago
MODERATORS
 

file title is an option present on mkvtoolnix (92.0 eyeglow on debian 12.11)

I could single open every file, remove the file title and save, but that's gonna take ages. almost 100 files.

top 13 comments
sorted by: hot top controversial new old
[–] [email protected] 1 points 6 days ago

I've been using some ancient java app called jmkvpropedit to do this.

[–] [email protected] 18 points 1 week ago (2 children)

If you are talking about the mkv embedded title, try this:

find -type f -iname "*.mkv" | while read "i" ; do mkvpropedit "${i}" --edit info --set "title=" ; done
[–] [email protected] 1 points 5 days ago

thank you for taking the time to write the actual command!

[–] [email protected] 6 points 1 week ago (2 children)

Just to be clear, this command will simply delete all the titles from all of the MKV files in that particular directory.

[–] [email protected] 1 points 5 days ago
[–] [email protected] 8 points 1 week ago* (last edited 1 week ago) (1 children)

Current directory and all its subdirectories - to be exact :)

You can execute the find command only (with arguments, so until the pipe) to verify modified files beforehand.

[–] [email protected] 1 points 5 days ago
[–] [email protected] 4 points 1 week ago (1 children)

Seems like it has a CLI. You can figure out how to do this action with a CLI command, then do something like find -name *mkv -exec ... to execute that command for all the files.

[–] [email protected] 1 points 6 days ago (1 children)
[–] [email protected] 1 points 6 days ago

Why? mkvpropedit already does everything OP wants. No need to get ffmpeg involved.

[–] [email protected] 1 points 1 week ago* (last edited 1 week ago)

Emacs Dired would be my goto here, though it's cumbersome if you dont know the bindings.

kill-rectangle and multiple-cursors within Dired are immensely useful

Edit: Oh, I just understood you want to mass modify the files themselves. In which case wgrep is useful here within Emacs, for modifying multiple buffers.

It essentially runs a grep command on a directory, collates all the results in a single buffer, lets you modify that buffer for all files, and then save in one go

[–] [email protected] 1 points 1 week ago (1 children)

Someone with more experience on sed or awk should chime in, but out of memory something like this (which MOST LIKELY WONT WORK, verify it before running it on anything important):

find -name *mkv -exec sed -e's/file=.*/file=' > {}.changed \;

That, at least in theory, reads every .mkv file recursively in a current working directory, finds lines that contain "file=" and replace that with "file=" and stores the output to .changed.

[–] [email protected] 3 points 6 days ago

I would be very hesitant to run sed on a bunch of files consisting primarily of highly compressed binary data.