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

Encoder generating 404 thumbnails from uploaded videos #684

Closed
nospi opened this issue May 15, 2018 · 15 comments
Closed

Encoder generating 404 thumbnails from uploaded videos #684

nospi opened this issue May 15, 2018 · 15 comments
Labels

Comments

@nospi
Copy link

nospi commented May 15, 2018

First of all cheers for the brilliant product. Secondly I just realised I posted this on the streamer repo not the encoder - many apologies. Please let me know if I should close and move this thread.

Just to be clear I'm NOT using direct uploads, this is entirely related to uploading to the encoder.

I've found that when using the encoder to download from YouTube, thumbnails are generating properly. However, whenever a video is uploaded to the encoder, it always results in the 404 Not Found error being generated for the video.

Initially I thought that there was a folder permissions error and that the images were not being created for each video. Upon closer inspection I can see that each video has indeed had an image generated for it, though that image is the actual 404 image.

I'm guessing that this is coming from ffmpeg? Or is it passing a call to youtube-dl even for videos that are uploaded?

Here's a copy of the image being generated:

image

I'm still looking to find where these are generated so apologies if i'm missing something simple. I can't seem to find anyone else having this exact issue with the encoder.

The encoder Max File Size is: 2.93GB
The Streamer Max File Size is: 2.93GB
The Streamer Max Video Storage Limit is: Unlimited
The Streamer Current Video Storage is: 28.30 Minutes

This is occurring with all file sizes, which are well under those limits. And with mp3's which is obviously to be expected.

@hersche
Copy link
Contributor

hersche commented May 15, 2018

this is not a bug, this is a commercial plugin, i think (the preview-picture make it a little unclear, but i think it's also valid for upload via encoder): MP4ThumbsAndGif @ https://easytube.club

but @DanielnetoDotCom , can you confirm this works also for uploaded via encoder (the picture on easytube only mark the mp4-upload-button)?

@nospi
Copy link
Author

nospi commented May 15, 2018

I believe that plugin is only for automatically extracting from direct uploads. The encoder is supposed to perform this function automatically. It is performing it at some stage, otherwise the images wouldn't have been generated in the videos directory.

I was under the assumption that this function wasn't being executed, and that when an img src was missing, a 404 replaced it. This is not the case though - each video does indeed have a respecitive image file, however that image file itself is the 404 image posted above.

Whatever process is attempting to get the thumbs from the video file (ffmpeg?) is having some issue there and resorting to the 404 image.

Quite probably a PHP module or setting I don't have.

@nospi
Copy link
Author

nospi commented May 15, 2018

My apologies, this should be on the encoder issue tracker.

Found the function: YouPHPTube-Encoder/objects/Encoder.php line 884

static function getImage($pathFileName, $seconds = 5) {
...
eval('$ffmpeg ="ffmpeg -i {$pathFileName} -ss {$duration} -vframes 1 -y {$destinationFile}";');
exec($ffmpeg . " < /dev/null 2>&1", $output, $return_val);
if ($return_val !== 0) {
...
return $global['systemRootPath'] . "view/img/notfound.jpg";
} else {
return $destinationFile;
}

The issue is this part here:

exec($ffmpeg . " < /dev/null 2>&1", $output, $return_val);

Should be:

exec($ffmpeg . " > /dev/null 2>&1", $output, $return_val);

The < should be >, otherwise it's taking input from /dev/null to ffmpeg and will throw an error. Thus returning something other than 0 and triggering the 404 file.

@hersche
Copy link
Contributor

hersche commented May 15, 2018

just rechecked it, you're right with the plugin, it's not needed. my wrong.

that's great when it works, i just tried and it generate me the pictures (can not reproduce it), but maybe that would be nice as a pull-request instead of a issue on youphptube-encoder? :)

@nospi
Copy link
Author

nospi commented May 15, 2018 via email

@hersche
Copy link
Contributor

hersche commented May 15, 2018

when you find some of them, it sounds to me, like it is worth to make a fork. there, it's unimportant, if you are on the master-branch or create a new.

but it's definently worth to commit them. you can also edit in github directly, but then you do a PR for every file automatic (as well as one fork and there a branch for every PR).

@nospi
Copy link
Author

nospi commented May 15, 2018 via email

@hersche
Copy link
Contributor

hersche commented May 16, 2018

nope, you have 0 repos yet :) just click on the "Fork"-button..

to be honest, i cant really imagine how to place it.

the plugin-structure allows a lot, and i think you would be able doing a plugin for another startpage or adding a link to new site (picture-gallery for example) easily. also entrys to admin-menus are partialy possible.

on the other hand, there's a lot of infos about the type, in category and on media, but only for audio/video.. why not add picture/image there (in the core)?

or just modify a plugin like youphpflix..

that decision is up to you :)

@nospi
Copy link
Author

nospi commented May 16, 2018 via email

@mcuix
Copy link

mcuix commented Aug 20, 2018

How do I replace the 404 thumbnails which have already been generated by the Encoder?

@DanielnetoDotCom
Copy link
Member

Edit it on the videos manager (streamer site)

@stale
Copy link

stale bot commented Feb 14, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Feb 14, 2019
@BartManX
Copy link

I have this problem too

@stale stale bot removed the wontfix label Feb 15, 2019
@DanielnetoDotCom
Copy link
Member

@BartManX you have to provide some details,

make sure you have the latest version and provide us your log file at the moment the error occurs

@stale
Copy link

stale bot commented Mar 17, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Mar 17, 2019
@stale stale bot closed this as completed Mar 24, 2019
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