revanced-patches icon indicating copy to clipboard operation
revanced-patches copied to clipboard

feat(TikTok): Download video file name and metadata

Open Leseratte10 opened this issue 1 year ago • 6 comments

Application

TikTok / com.zhiliaoapp.musically

Issue

Right now, when I download a TikTok video, the video gets saved without any metadata. The file name is a 32-character random looking string, and there's no metadata inside the file, that means, going "back" from a downloaded file to the source TikTok is hard / impossible.

Patch

Ideally I would like to see two things, but I don't know if that is easily possible:

A) Instead of having that random byte string as file name, put the uploader's name and the video ID into the file name. For example, for the (nonexistant example) TikTok at https://www.tiktok.com/@example_user/video/1234567890123456789, make the file name "TikTok - example_user - 1234567890123456789.mp4" so that if I have that downloaded file on my phone or computer, I can use the file name to determine the URL to that TikTok.

B) The MP4 video format (and almost all other video formats) support a bunch of metadata like title, author, comment, and so on. If possible - but I don't know if it is, it's probably too difficult - it would be cool if that metadata (uploader, video ID, upload date, description/hashtags, full URL to the TikTok, ...) would be added into the video file metadata so the information can still be extracted if the file gets renamed later.

Motivation

Right now when you download TikTok posts, the files all have a pretty meaningless file name. Given a downloaded mp4 file, there is no way (or at least I don't know any way) to ever "find" that TikTok on the TikTok webpage or in the app again, or to find out anything (uploader, description, comments, ...) about the video.

If the video ID (and if possible, the uploader name) were included in the video file name (or, even better, in the MP4 metadata), then everyone can recreate the tiktok.com URL for the given video and re-visit it on the webpage or in the TikTok app.

Acknowledgements

  • [X] I have searched the existing issues and this is a new and no duplicate or related to another open issue.
  • [X] I have written a short but informative title.
  • [X] I filled out all of the requested information in this issue properly.

Leseratte10 avatar Sep 28 '22 19:09 Leseratte10

Sorting by date works too as an alternative

oSumAtrIX avatar Sep 28 '22 21:09 oSumAtrIX

"Sorting by date"? What do you mean with that? The downloaded files have a timestamp of the time they were downloaded. How does sorting these by date help find the original TikTok they were downloaded from?

Leseratte10 avatar Sep 29 '22 03:09 Leseratte10

It doesn't, i asumed you wanted to find the downloaded file, not the original account it was uploaded on.

oSumAtrIX avatar Sep 29 '22 15:09 oSumAtrIX

Ah, no, that's not what I meant. What I meant was, when I'm looking at one of the MP4 files of Tiktoks I downloaded in the past, to find a way to "get back" to that post in the TikTok app (to read comments, like, share, or whatever), and in order to do that, either the file name or the file metadata needs to contain stuff like the video ID and uploader name.

Leseratte10 avatar Sep 29 '22 16:09 Leseratte10

That would be great ❤️ TikTok - @user - yyyy.mm.dd

Grabber86 avatar Oct 07 '22 14:10 Grabber86

+1 It would be great if you could bring this feature.

Forrestcalm avatar Jul 25 '23 11:07 Forrestcalm