aboutsummaryrefslogtreecommitdiff
path: root/content/snippets/rip-edit-audio.md
blob: 0cbb35bf70a0cdfc368abb0134b265701a90d176 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
---
title: Ripping and cutting music sets
description: Ripping and cutting music sets
tags: ["commandline"]
---

Here's a simple process to rip audio, add metadata and cut the audio from the command line:

```console
yt-dlp --extract--audio --audio-quality 0 "https://youtu.be/vbkyazLGovM?si=SQXs6PHIcBrsr5to"
```

This rips a 3 hour set locally. Use `mv` if you want to rename the file. Let's call the file `set.m4a`.

Adding metadata using `exiftool`:

```console
exiftool -Title="Big set" -Artist="Wicked skengman" set.m4a
```

It's a three hour set and we only want from 2:30:00 until the end, so only the last 30 minutes, for this we can use `ffmpeg`.

```console
ffmpeg -ss 2:30:00 -i set.m4a -c copy output.m4a
```

`copy` copies the file without re-encoding.

If using `cmus` then run the following to update your library with the new file:

```console
:add ~/Music/
```