• You MUST read the Babiato Rules before making your first post otherwise you may get permanent warning points or a permanent Ban.

    Our resources on Babiato Forum are CLEAN and SAFE. So you can use them for development and testing purposes. If your are on Windows and have an antivirus that alerts you about a possible infection: Know it's a false positive because all scripts are double checked by our experts. We advise you to add Babiato to trusted sites/sources or disable your antivirus momentarily while downloading a resource. "Enjoy your presence on Babiato"

PlayTube - The Ultimate PHP Video CMS & Video Sharing Platforms

PlayTube - The Ultimate PHP Video CMS & Video Sharing Platform V3.1

No permission to download
Error when inserting youtube link.
Hello.
You need to get a YouTube API key.
Enter it here. Import & Upload - Import & Upload Configuration - YouTube API key.
Unfortunately, Short Videos cannot be imported.
Sincerely.
 
Code:
<?php if (PT_IsAdmin()) { ?>
<option value="5" <?php echo ($pt->video->privacy == 5 && $pt->video->publication_date > 0) ? 'checked' : '' ?>>{{LANG blocked_video}}
</option>
<?php } ?>

###########################
tooooooooooooooooooooo
###########################
<?php if (PT_IsAdmin()) { ?>
<option value="1" <?php echo ($pt->video->user_id == 1 && $pt->video->publication_date > 0) ? 'checked' : '' ?>>{{LANG blocked_video}}
</option>
<?php } ?>


####################
value="1"
user_id == 1
####################
1= your Admin user id

orrrr



<?php if (PT_IsAdmin()) { ?>
<option value="" <?php echo ($pt->video->video_id == '' && $pt->video->publication_date > 0) ? 'checked' : '' ?>>{{LANG blocked_video}}
</option>
<?php } ?>


orrrr


<?php if (PT_IsAdmin()) { ?>
<option value="7" <?php echo ($pt->video->converted == 7 && $pt->video->publication_date > 0) ? 'checked' : '' ?>>{{LANG blocked_video}}
</option>
<?php } ?>

Bro, thanks a lot, but with all these options, the video becomes "private" and is still available. In addition, the user can make it "public" again. I think that in order for the administrator to block any video, an entry about it should be created in the database. I don't understand why the developer didn't provide such a feature? There are videos on Youtube that say that "The video is blocked or unavailable." At the same time, the video itself is there, it just does not show due to blocking. Perhaps the PlayTube developer will add this feature in new updates...
 
ajax\ffmpeg-submit.php
look 240p (ON)
hi friend, thanks for help, this code?
if ($pt->config->p240 == "on") {
$shell = shell_exec("$ffmpeg_b -y -i $video_file_full_path -vcodec libx264 -preset {$pt->config->convert_speed} -filter:v scale=426:-2 -crf 26 $video_output_full_path_240 2>&1");

so i need to put off?
 

HOW TO

HOW TO2


Some things you have to learn yourself and not immediately ask for the solution somewhere else. I also don't ask can someone do my laundry or clean my apartment. You have to learn that yourself. So sit down and deal with php.


Code:
Copies only the video, deletes the old one and makes it a quick start
$shell     = shell_exec("$ffmpeg_b -y -i $video_file_full_path -c copy -movflags +faststart -c:a copy $video_output_full_path_240 2>&1");

changes it to 1280* video bitrate 1800k fps 23,97 quickstart and audio 128kb aac and deletes the old
$shell     = shell_exec("$ffmpeg_b -y -i $video_file_full_path -filter_complex "scale=1280:trunc(ow/a/2)*2" -c:v h264_amf -b:v 1800k -maxrate 1800k -bufsize 1800k -r 24000/1001 -movflags +faststart -ac 2 -c:a aac -strict -2 -b:a 128k $video_output_full_path_240 2>&1");

Instructions for Windows
1. Download https://www.gyan.dev/ffmpeg/builds/
2. Extract it to your htdocs or somewhere else
Paste an example into Playtube: X:\\server\ffmpeg\bin\ffmpeg.exe
Also the path ffmpeg.exe

aaaaa.jpg

To enable exec() function, you need to remove it from the following line in your php.ini file:

disable_functions = "show_source, system, shell_exec, exec"

disable_functions = ""



I even have a 30-second preview appear when I hover over it with the mouse. So you don't have to click on each music video individually.

.mp4 to .webm 30 seconds from timeline 1:30 begin

Atachment show file createwebm.zip : Creates a 30 second webm file from the last video, which then appears as a thumbnail in the window as a preview


animated-fire-image-0346.gif
Browser must have video & audio on autoplay setting



Now search for all gif previews in the theme and change them to
<video autoplay src="'+gif+'" type="video/webm" width="331" height="186">

#####################################################
function show_gif(self,gif) {
if (gif && gif != '') {
myTimeout = setTimeout(function() {
$(self).append('<video autoplay src="'+gif+'" type="video/webm" width="331" height="186">');
}, 0);
}
}
#######################################################




or as a webp >> .mp4 to .webp 7 thumbs a 3 seconds individual concat


#####################################################
function show_gif(self,gif) {
if (gif && gif != '') {
myTimeout = setTimeout(function() {
$(self).append('<img src="'+gif+'" width="331" height="186">');
}, 0);
}
}
#######################################################

MassSearchAndReplace TOOL

There is a tool so that you don't have to edit all .html or .php files individually. Put the youplay folder on the desktop and use the mass finder to replace everything at the same time. This tool searches everything by keywords or codes so you don't have to do everything individually.

a delicious meal for everyone


claire-dancing.gif

Bro, does the Default theme work the same for you?
Can you show the video?
 
Ok, I just created it quickly, but I'll do it myself because I don't use the default theme





Look at the attachment file because you can't insert the code here as a BB code and you keep getting an error message. The problem is always here in the forum. Otherwise you have to wait 30 minutes until you can log in again.

Ok, I just created it quickly, but I'll do it myself because I don't use the default theme





Look at the attachment file because you can't insert the code here as a BB code and you keep getting an error message. The problem is always here in the forum. Otherwise you have to wait 30 minutes until you can log in again.


Bro, thank you so much!!! Your work undoubtedly helps a lot, but not everyone writes about it ;). Preview.gif files started working after I opened the code in themes\default\layout\videos\list.html (it has been commented out) . But when hovering over the preview, there is no sound ((. I have a Linux server, ffmpeg is installed in /usr/bin/ffmpeg. But when I write the path in the admin panel, it says that "there is no such file" ((. I gave him access 777. Nothing has changed, the error is still displayed. But the files are being converted, Debug FFMPEG is working. But here's the joke, when I write the path in the admin panel: ./assets/libs/ffmpeg/ffmpeg ffmpeg ffmpeg ffmpeg (by default in PlayTube), the message that "there is no file" disappears. Files from are also converted, and Debug FFMPEG also works. )) It is unclear why the server file does not see, but the default file sees ((
 
Yes, that was just created manually by me. Ubuntu Linux just has to build a shell or php exec. but you can also create it directly in playtube in the ajax\ffmpeg-submit.php the gifs are code for ffmpeg. So you don't have to do it yourself like I do because I only have a private music collection on localhost.
in Germany it's not that easy to have a server and offer music there, it's very punishable, so only localhost works
But if you upload more than one you have to adapt the ajax\ffmpeg-submit.php accordingly. (Edit) also works for Linux youtube-dl

You can also adjust this with Monit so that Monit monitors the database and when a video has been uploaded it automatically creates a preview with ffmpeg. There are 1000 possibilities, you just have to test everything.

Monit Exemplars


or mysql event to cronjob or exec php

I wouldn't use the playtube ffmpeg - who knows how it was compiled. Install ffmpeg 5 directly in Linux and readjust the paths. example:

$ffmpeg_b
to
$ffmpeg_b2 = "/usr/bin/ffmpeg";
Orginal $shell = shell_exec("$ffmpeg_b $gif_video_time -y -i $video_file_full_path ".$full_dir . $gif_video);
New $shell = shell_exec("$ffmpeg_b2 $gif_video_time -y -i $video_file_full_path ".$full_dir . $gif_video);

Or direct limsink
ln -s /usr/bin/ffmpeg /var/www/htdocs/PLAYTUBE/assets/libs/ffmpeg/ffmpeg

This is what it looks like for me.

To get more thumbs for the video poster, adjust the ajax\upload-video-ffmpeg.php


$thumb_1_duration = (int) ($total_seconds > 10) ? 11 : 1;
$thumb_2_duration = (int) ($total_seconds > 24) ? 25 : 15;
$thumb_3_duration = (int) $total_seconds - 1;
$thumb_4_duration = (int) $total_seconds / 2;
$thumb_5_duration = (int) ($total_seconds / 2) * 1.3;
$thumb_6_duration = (int) $total_seconds / 3;

$thumb_7_duration = (int) ($total_seconds > 13) ? 14 : 1;
$thumb_8_duration = (int) ($total_seconds > 25) ? 26 : 16;
$thumb_9_duration = (int) $total_seconds - 2;
$thumb_10_duration = (int) $total_seconds / 3;
$thumb_11_duration = (int) ($total_seconds / 3) * 1.4;
$thumb_12_duration = (int) $total_seconds / 5;


$uniq_id = rand(1111,9999);
$img_pos = array($thumb_1_duration, $thumb_2_duration, $thumb_3_duration, $thumb_4_duration, $thumb_5_duration, $thumb_6_duration, $thumb_7_duration, $thumb_8_duration, $thumb_9_duration, $thumb_10_duration, $thumb_11_duration, $thumb_12_duration);


It's cool, but I'm not that good at php and that's my problem ((. 🥺😢

I'm struggling with PlayTube and I can't finish it in any way. It's difficult if I don't understand php at the same level as you do.

In any case, I am grateful to you for the detailed answers and help!
 
coolrock updated PlayTube - The Ultimate PHP Video CMS & Video Sharing Platforms with a new update entry:

PlayTube - The Ultimate PHP Video CMS & Video Sharing Platforms - 3.1 Untouched

v3.1​

  • ADDED Braintree, PayFast payment gateways.
  • ADDED 50+ new APIs for future mobile updates.
  • ADDED switch accounts system.
  • FIXED date and time in message were not active.
  • FIXED can't upload a short if movie system is disabled.
  • FIXED When new member register and use special characters like &^%$#@ etc in password, they can't login.
  • FIXED video cropping not working when uploading shorts.
  • FIXED youtube shorts import not working.
  • FIXED Pro...

Read the rest of this update entry...
 
Th..you for update to 3.1 Install GOOD, BUT A LOT ERROR and no work.
 

Attachments

  • 2024-03-27_163049.png
    2024-03-27_163049.png
    114.7 KB · Views: 28
AdBlock Detected

We get it, advertisements are annoying!

However in order to keep our huge array of resources free of charge we need to generate income from ads so to use the site you will need to turn off your adblocker.

If you'd like to have an ad free experience you can become a Babiato Lover by donating as little as $5 per month. Click on the Donate menu tab for more info.

I've Disabled AdBlock