Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extract video thumbnails #965

Open
morteza-rashidi opened this issue May 23, 2021 · 4 comments
Open

extract video thumbnails #965

morteza-rashidi opened this issue May 23, 2021 · 4 comments
Labels

Comments

@morteza-rashidi
Copy link

I use this product to receive messages from public channels
I extract text and video messages without any problems, but I have trouble extracting video messages.
Unfortunately, I have trouble extracting video images(thumbnails)

Please help me how to do this

tanks

@erfanmola
Copy link

Unfortunately, I have trouble extracting video images(thumbnails)

What kind of problem or error are you facing ?

@morteza-rashidi
Copy link
Author

I have no idea what to do

my code is

`require_once 'vendor/autoload.php';
$MadelineProto = new \danog\MadelineProto\API('session.madeline');

$MadelineProto->async(true);
$MadelineProto->loop(function () use ($MadelineProto)
{
yield $MadelineProto->start();
$Messages = yield $MadelineProto->messages->getHistory(['peer' => "@channel", 'offset_id' => 0, 'offset_date' => 0, 'add_offset' => 0, 'limit' => 15, 'max_id' => 0, 'min_id' => 0, 'hash' => 0]);
foreach ($Messages as $message){
yield $MadelineProto->downloadToFile($message, 'media/file.mp4'); /// download video
///
/// ???????? extracting video images(thumbnails) ?????
}
});`

@danog danog added the todo label Dec 19, 2021
@danog
Copy link
Owner

danog commented Dec 19, 2021

This was implemented in a project based on MadelineProto, TelegramApiServer, will implement in MadelineProto as well: xtrime-ru/TelegramApiServer#42
In the meantime, you can use the appropriate TAS method to fetch thumbnails.

@theeosdev
Copy link

Is there any progress on this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants
@danog @erfanmola @theeosdev @morteza-rashidi and others