Welcome to World of IPTV

Join us now to get access to all our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, and so, so much more. It's also quick and totally free, so what are you waiting for?

Forum Rules

Our Rules: Read to avoid getting banned!

Advertising

Introduce Yourself to the World with Us!

Resource Database

Find the newest resources around IPTV!

Account upgrade

Upgrade your account to unlock more benefits!

Question INFO Re-Encode on Edit

ferone

Extended Member
Ext. Member
Joined
May 27, 2020
Messages
4
Reaction score
0
Points
1
Location
Svizzera
Hi, is there an automatic command to do Re-Encode on Edit on all movies and TV series on a balance?
I have to recreate the (Create Symlink).

Tnx
 
Last edited:
Hi, is there an automatic command to do Re-Encode on Edit on all movies and TV series on a balance?
I have to recreate the (Create Symlink).

Tnx

There is features named "Mass Edit Movies" !
 
There is features named "Mass Edit Movies" !
yes I know, but you can do about 1000 maximum at a time, but between films and series I have more than 50000.
 
Channels MatchTime Unblock CDN Offshore Server Contact
100 cnx / 90€ 5Gbps / 180€ 48CPU-256GRAM 10Gbps 569€ Skype live:giefsl
500 cnx / 350€ 10Gbps / 350€ 48CPU-128GRAM 5Gbps / 349€ TG @changcdn
1000 cnx / 500€ 20Gbps / 700€ 40CPU-128GRAM 20Gbps / €980 http://coronaserver.com
I had a similar case where I had to change the server and re-encode at the same time. My code was a little longer but to just re-encode in chunks you can use this code.

PHP:
<?php
include "session.php"; include "functions.php";
if ((!$rPermissions["is_admin"]) OR (!hasPermissions("adv", "stream_tools"))) { exit; }

$getMovies = getMovies("s:3:/home/movies/2024");

$movieIds = array_column($getMovies, 'id');

if(!empty($movieIds)) {
    $batchIds = array_chunk($movieIds, 100);
    
    foreach ($batchIds as $mId) {
        APIRequest(array(
            "action" => "vod",
            "sub" => "start",
            "stream_ids" => array_values($mId)
        ));
        usleep(100000);
    }
}

function getMovies($rDNS) {
    global $db;
    $return = Array();
    $result = $db->query("SELECT `id`, `stream_display_name`, `stream_source` FROM `streams` WHERE `type` IN (2,5) AND JSON_EXTRACT(`stream_source`, '$[0]') LIKE '%" . $rDNS . "%'");
    if (($result) && ($result->num_rows > 0)) {
        while ($row = $result->fetch_assoc()) {
            $return[] = $row;
        }
    }
    return $return;
}
?>

How it works,
Copy this code and create new file inside /admin/movie_tools.php
then inside "movie_tools.php" change the path inside "getMovies("s:3:/home/movies/2024")"
Then it will search all movies and series that use that path. if you have example 50000 it will do it by chunks of 100 so it will call api for re-encode 50000/100 = 500 times.
My movies where by year 2022,2023,2024 etc. so instead of re-encode all i did year by year by specifying the path.
and then call the file http://yourip/admin/movie_tools.php wait it to finish and it will re-encode.
if you know a little bit php you can adjust it for your needs.
 
shape1
shape2
shape3
shape4
shape5
shape6
Back
Top