Nekmo / telegram-upload

Upload and download files from Telegram up to 4 GiB using your account
MIT License
1.06k stars 233 forks source link

Feature request – Upload m4b files as audio files #209

Open tissole opened 1 year ago

tissole commented 1 year ago

m4b audio files (usually audiobooks) are uploaded as files that can not be played, they can only be downloaded.

What I Did

telegram-upload --to -1001234567 "D:\Audiobooks\myfile.m4b"

I would like to be able to upload them as audio files with metadata, that can be played inside Telegram clients.

Nekmo commented 1 year ago

Can you upload a file to test? thanks

tissole commented 1 year ago

Sure, here it is Test.zip

Nekmo commented 1 year ago

I have uploaded this file using Telegram Desktop and the audio cannot be played in Telegram Desktop o Telegram Android. Are you sure that this file can be played using the official Telegram clients?

tissole commented 1 year ago

image I used another script to upload this file, but the metadata does not appear. If you change the extension to m4a the file is uploaded as audio, with both scripts (still no metadata, probably hachoir's fault).

But if the file with changed extension is uploaded with the official client, then... image

Nekmo commented 1 year ago

As I read, m4a and m4b are compatible with each other:

https://www.tunefab.com/es/tutorials/m4a-vs-m4b.html

tissole commented 1 year ago

Yes, they are from the same family of mp4 container. The reason the official Telegram desktop client does not upload them as audio files is because they forget to mention this type of file here, probably.

m4a files are uploaded as audio with telegram-upload, but without any metadata, no thumbnail and no info about author and title.

Nekmo commented 1 year ago

Yes, they are from the same family of mp4 container. The reason the official Telegram desktop client does not upload them as audio files is because they forget to mention this type of file here, probably.

m4a files are uploaded as audio with telegram-upload, but without any metadata, no thumbnail and no info about author and title.

The link to the source code is very interesting, thanks. I'll look to support this format.

cerinawithasea commented 1 month ago

HI I was wondering if this was being worked on, maybe i can help out? i have been trying to do the very same thing (sorta ) with tg-upload this is what i had sent to that dev. (i hope this isnt rude)

hi i was hoping maybe somebody could help me with captions ...im sure i want to much but what if...and i just did not ask I share a bunch of audiobooks and i have been using mp3tag export function to get the information of the imbedded tags wth this $filename(%title%.txt,utf-8) $loop(1)%albumsort% By: %ALBUMARTIST% Narrated by: %composer% Length: %_length% Genre: %genre% Release date: %year% Publisher: %publisher%

%itunesmediatype%$loopend()

ii have to copy paste but t is way easier then typing. i just got the tg_upload running and working and i was hoping maybe somebody could help me
Ill end up with something like this with what i have, i just cant use it if the little bot is uploading TIA anything will be great. im so new at this also 99% of the time i have .M4B if that matters Grace By: Natashia Deón Narrated by: Lisa Reneé Pitts Length: 13:41:59 Genre: Literature & Fiction/Literary Fiction/Historical Fiction/Fiction/Funny Release date: 2016-06-14 Publisher: Blackstone Audio, Inc.

Audiobook

The answer i got was

For that you need to install & integrate mediainfo-cli with tg-upload code.

I think "integrate" is carrying that statement ,and my wall of text with all that heavy lifting

Around the same time i had noticed @tissole working on basically the same thing here.(audiobooks anyway) Im not sure how much help i can be but it made sense to me for us to be working together on this issue rather then parallel IM not a programmer or anything i just follow directions well and i hate not figuring something out. One thing i did notice in the other bots flags that made me think od the problem @tissole voiced were these --as_photo - Send given file as picture. --as_video - Send given file as video. --as_audio - Send given file as audio. --as_voice - Send given file as voice. --as_video_note - Send given file as video note. I'm probably way off but why would you tell it that unless you ear trying to upload it as something its not seeing it as? This is wild speculation. i understand it as well as i do French (not at al) so i guess i stuck this here because IM also working with M4Bs and audiobooks it seemed like the right place. i am wondering the same questions i had about the other one tho..maybe its FINALLY my lucky day and this is all been figured out :)