You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: mkdocs/docs/advanced.md
+7-22Lines changed: 7 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,11 +88,13 @@ ES will not start, if the data is corrupted. So, stop all containers, delete eve
88
88
In general the mapping update process is as follows:
89
89
90
90
1. Compare existing mapping with predefined expected mapping
91
-
1. If that is identical, there is nothing to do
92
-
1. Else create a `_backup` of the existing index
93
-
1. Delete the original index and create a new empty one with the new mapping in place
94
-
1. Copy over the previously created `_backup` index to apply the new mappings
95
-
1. Delete the now leftover `_backup` index.
91
+
- If that is identical, there is nothing to do
92
+
2. If the difference is just adding a new field, that is simply added in place
93
+
3. If the difference is a change in how an existing field is indexed, that needs a index rebuild:
94
+
- Reindex into a new index by appending a version to the index nummer, e.g. `ta_video_v2`.
95
+
- That will also remove any no longer needed fields.
96
+
- Delete the old index
97
+
- Create an alias to point all new requests to the new version of the index
96
98
97
99
If you are not sure if anything is happening, you can monitor your index and `docs.count` value for each index. Those values should change over time during the process and you should get an indicator of progress happening:
98
100
@@ -102,23 +104,6 @@ From within the ES container:
If that process gets interrupted before deleting the `_backup` index and you try to run this again, you will see an error like `resource_already_exists_exception`, for example `index [ta_comment_backup/...] already exists` indicating in this case that your migration previously failed for the `ta_comment` index.
106
-
107
-
First, make sure you still have the original index with the command above. After verifying, stop the TA container, then you can delete the `_backup` index, e.g. in the case of `ta_comment_backup`.
Then you can restart the container and the migration will run again. If your error persists, the ES and TA logs should give additional debug info.
121
-
122
107
## Manual yt-dlp update
123
108
!!! warning
124
109
Doing this is **very likely** going to break things for you. You will want to try this out on a testing instance first. Regularly there have been subtle changes in the yt-dlp API, so only do this if you know how to debug this project by yourself, but obviously share your fixes so any problems can be dealt with before release.
Copy file name to clipboardExpand all lines: mkdocs/docs/settings/actions.md
+34-15Lines changed: 34 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,22 +9,32 @@ Accessible at `/settings/actions/` of your **Tube Archivist** instance, this pag
9
9
!!! warning
10
10
This is inherently error prone, as there are many variables, some outside of the control of this project. Read this carefully and use at your own risk.
11
11
12
-
!!! note
13
-
The importer will *try* to fetch metadata from YouTube after identifying the video, as it is assumed this is newer, even if you add the info json file as described below.
14
-
15
12
Add the files you'd like to import to the `/cache/import` folder. Only add files, don't add subdirectories. All files you are adding need to have the same *base name* as the media file. Then, start the process from the settings page with the *Manual Media Files Import* button.
16
13
17
14
Valid media extensions are *.mp4*, *.mkv* or *.webm*. If you have other file extensions or incompatible codecs, convert them first to mp4. **Tube Archivist** can identify the videos with one of the following methods:
18
15
19
-
### Method 1:
16
+
### Prefer embedded metadata
17
+
If you activate that, the import process will prioritize the [embedded metadata](application.md/#embed-metadata) and will use that if available and will not try to fetch from YT directly. That can be advantageous if you know that data is fresh and trusted.
18
+
19
+
Otherwise TA will try to prioritize remote metadata from YT.
20
+
21
+
### Ignore missing metadata errors
22
+
The import task will stop with an error if there is no metadata available:
23
+
24
+
- No matching info json file
25
+
- No embedded metadata
26
+
- Not available on YT anymore
27
+
28
+
That is a core failure of the task. If you still want to continue, activate this option. You'll probably want to remove the file from `/cache/import` after the task finishes.
29
+
30
+
### Identify by info.json file
20
31
Add a matching *.info.json* file with the media file. Both files need to have the same base name, for example:
21
32
22
33
- For the media file: `<base-name>.mp4`
23
34
- For the JSON file: `<base-name>.info.json`
24
35
25
36
The import process then looks for the 'id' key within the JSON file to identify the video.
26
37
27
-
28
38
Sometimes you may need to create this file manually. The following are the absolute minimum required tags as keys for manual importing.
29
39
30
40
!!! note
@@ -55,21 +65,28 @@ However, you may fill out additional tags if they are known for a more complete
55
65
}
56
66
```
57
67
58
-
### Method 2:
68
+
### Filename Based Detection:
59
69
Detect the YouTube ID from filename. This accepts the default yt-dlp naming convention for file names like:
60
70
61
71
-`<base-name>[<youtube-id>].mp4`
62
72
63
73
!!! success "Required Naming Convention"
64
74
The YouTube ID in square brackets at the end of the filename is the crucial part.
65
75
76
+
### Import from other TA instances:
77
+
!!! warning
78
+
Make sure you trust the source from where you import files from. The importer makes a best effort to validate the metadata and will stop if there is an error in validation.
79
+
80
+
You can import media files from other **Tube Archivist** instances by putting them here as well. The nameing convention is identical, simply `<youtube-id>.mp4`. Just add the file, without the channel folder.
81
+
66
82
### Offline import:
67
83
If the video you are trying to import is not available on YouTube any more, **Tube Archivist** can import the required metadata:
68
84
69
-
- The file `<base-name>.info.json` is required to extract the required information.
85
+
- From the `<base-name>.info.json` file.
86
+
- Or the embedded metadata, make sure you have activated that on the settings page.
70
87
- Add the thumbnail as `<base-name>.<ext>`, where valid file extensions are *.jpg*, *.png* or *.webp*. If there is no thumbnail file, **Tube Archivist** will try to extract the embedded cover from the media file or will fallback to a default thumbnail.
71
88
- Add subtitles as `<base-name>.<lang>.vtt` where *lang* is the appropriate two letter ISO 639 language code. This will archive all subtitle files you add to the import folder, independent from your configurations. Subtitles can be archived and used in the player, but they can't be indexed or made searchable due to the fact, that they have a very different structure than the subtitles as **Tube Archivist** needs them.
72
-
- For videos, where the whole channel is not available any more, TA will extract as much info as possible from the info json file.
89
+
- For videos, where the whole channel is not available any more, TA will extract as much info as possible from the info json file and create the channel dynamically.
73
90
74
91
### Some notes:
75
92
@@ -78,14 +95,11 @@ If the video you are trying to import is not available on YouTube any more, **Tu
78
95
- A notification box will show with progress, follow the docker logs to monitor for errors.
79
96
80
97
!!! tip "Start Small"
81
-
Starting with a small subset of the files to import to test and confirm that your settings, configurations and files will work as recommended.
82
-
83
-
## Embed thumbnails into media file
84
-
This will write or overwrite all thumbnails in the media file using the downloaded thumbnail. This is only necessary if you didn't download the files with the option *Embed Thumbnail* enabled or you want to make sure all media files get the newest thumbnail.
98
+
Starting with a small subset of the files to import to test and confirm that your settings, configurations and files will work as expected.
85
99
86
100
## Embed metadata into media file
87
101
88
-
This starts a background task adding metadata into the media file. Is is meant to update your existing mediafiles. Also see [application/embed-metadata](application.md/#embed-metadata).
102
+
This starts a background task adding metadata and artwork into the media file. Is is meant to update your existing mediafiles. Also see [application/embed-metadata](application.md/#embed-metadata).
89
103
90
104
!!! tip "This is slow"
91
105
@@ -95,7 +109,7 @@ This starts a background task adding metadata into the media file. Is is meant t
95
109
This task will fail if there are any corrupted media files. That can happen due to various reasons, like filesystem, hardware or interrupted transfers. Or specifically, if yt-dlp and ffmpeg didn't download and merge a valid mp4 file.
96
110
97
111
- This is not a bug, but a happy accident, as that informs you of any problems in the media file that might have gone unnoticed otherwise.
98
-
- Changes are, a redownload will fix that. Then start the task again.
112
+
- Chances are, a redownload will fix that. Then start the task again.
99
113
100
114
## ZIP file index backup
101
115
This will backup your metadata into a zip file. The file will get stored at `/cache/backup` and will contain the necessary files to restore the Elasticsearch index formatted **nd-json** files. For data consistency, make sure there aren't any other tasks running that will change the index during the backup process. This is very slow, particularly for large archives.
@@ -120,8 +134,13 @@ This action will go through all your media files and looks at the whole index to
120
134
- Should the filename not match with the indexed media url, this will rename the video files correctly and update the index with the new link.
121
135
- When you delete media files from the filesystem outside of the **Tube Archivist** interface, this will delete leftover metadata from the index.
122
136
- When you have media files that are not indexed yet, this will grab the metadata from YouTube as if it was a newly downloaded video. This can be useful when restoring from an older backup file with missing metadata but already downloaded mediafiles. NOTE: This only works if the media files are named in the same convention as **Tube Archivist** expects, alternatively see above for *Manual Media Files Import*.
123
-
- The task will stop when adding a video fails, for example if the video is no longer available on YouTube.
124
137
- This will also check all of your thumbnails and download any that are missing.
125
138
126
139
!!! danger "BE AWARE"
127
140
There is no undo. Deleted references and metadata are removed and cannot be brought back without a restore operation.
141
+
142
+
### Prefer embedded metadata
143
+
This this trigger indexing a new video, if you enable this option, [embedded metadata](application.md/#embed-metadata) will be prefered and, if available, the task will not be fetched again from YT.
144
+
145
+
### Ignore missing metadata errors
146
+
The task will stop when adding a video fails, for example if the video is no longer available on YouTube and no embedded metadata was found so you can take appropriate actions. Activate this option to still continue the task, monitor the logs for the details.
Copy file name to clipboardExpand all lines: mkdocs/docs/settings/application.md
+5-6Lines changed: 5 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,6 +71,7 @@ This saves:
71
71
- Title
72
72
- Artist (Channel Name)
73
73
- Description
74
+
- Artwork: Cover art, channel art and playlist art
74
75
-`ta`: That's the TA metadata as indexed.
75
76
76
77
The `ta` tag is a json object and contains the complete metadata as indexed in TA. That can be advantageous to embed directly in the file, e.g. for data recovery, portability or reusing of the media files.
@@ -81,6 +82,7 @@ This includes, based on your configurations:
81
82
-**Comments**: All comments
82
83
-**Subtitles**: These are the full text segments as indexed and optimized for searching
83
84
-**Playlists**: Full playlist metadata if the video is part of any Playlist/s
85
+
-**Version**: TA version number of the embedded metadata format
84
86
85
87
??? "Examples accessing `ta` metadata"
86
88
Using ffprobe:
@@ -108,9 +110,6 @@ This includes, based on your configurations:
108
110
109
111
Also see [settings/embed-metadata-into-media-file](actions.md/#embed-metadata-into-media-file) to update metadata into existing files.
110
112
111
-
### Embed Thumbnail
112
-
This saves the thumbnail into the media file by passing `--embed-thumbnail` to yt-dlp.
113
-
114
113
## Subtitles
115
114
116
115
### Subtitle Language
@@ -129,15 +128,15 @@ Set your configuration for downloading and indexing comments. This takes the sam
129
128
130
129
Example:
131
130
132
-
-`all,100,all,30`: Get 100 max-parents and 30 max-replies-per-thread.
133
-
-`1000,all,all,50`: Get a total of 1000 comments over all, 50 replies per thread.
131
+
-`all,100,all,30,all`: Get 100 max-parents and 30 max-replies-per-thread at any depth.
132
+
-`1000,all,all,50,2`: Get a total of 1000 comments over all, 50 replies per thread only 2 levels of depth.
134
133
135
134
### Comment sort method
136
135
Change sort method between *top* or *new*. The default is *top*, as decided by YouTube.
137
136
138
137
- The [Refresh Metadata](scheduling.md#refresh-metadata) background task will get comments from your already archived videos, spreading the requests out over time.
139
138
140
-
Archiving comments is slow as only a few comments get returned per request with yt-dlp. Choose your configuration above wisely. Tube Archivist will download comments after the download queue finishes. Your videos will already be available while the comments are getting downloaded.
139
+
Archiving comments is slow as only a few comments get returned per request with yt-dlp. Choose your configuration above wisely. Tube Archivist will download comments after the download queue finishes during post processing. Your videos will already be available while the comments are getting downloaded.
0 commit comments