Ahmed96

Ahmed96

Member Since 4 Months Ago

Experience Points
320
Total
Experience

4,680 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed
0
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start your engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-in-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist Created with Sketch.

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • chatty-cathy Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

Level 1
320 XP
Sep
23
2 days ago
Activity icon

Replied to Explain How The Seasons System Works

Correct, I understood the topic and very thank you

Activity icon

Replied to Explain How The Seasons System Works

To my understanding, there are three tables, approximately, the publication table, the seasons table, the table of episodes, and each table has a relationship between many to many

Activity icon

Replied to Explain How The Seasons System Works

No, you did not understand what I mean

The idea, presumably, I have a series in which there are more than one part, and in each part there are more than 30 episodes, what is required to be the method of interconnectedness and the work of this idea in a database so that when a person follows an episode, for example, the first season, episode 1 series, and this series contains five parts that are required to show the rest of the parts In addition to the episodes of the first season, I hope I can clarify the idea now in a more accurate way

Sep
22
3 days ago
Activity icon

Started a new Conversation Explain How The Seasons System Works

Hello

It is possible to explain the way the Seasons system works, in the sense that if a series contains five parts and each part contains 30 episodes, how can it work in the database as a structure with Laravel.

thanks

Aug
10
1 month ago
Activity icon

Replied to InvalidArgumentException: Missing Required Client Configuration Options

function handle in code laravel job

public function handle() { //420 $lowBitrate1 = (new X264('aac'))->setKiloBitrate(1000); //720p $highBitrate1 = (new X264('aac'))->setKiloBitrate(2000);

    FFMpeg::fromDisk('s3')
        ->open($this->movie->path)
        ->exportForHLS()
        ->onProgress(function ($percent) {
            $this->movie->update([
                'percent' => $percent
            ]);
        })
        ->setSegmentLength(10)// optional
        ->addFormat($lowBitrate1)
        // ->addFormat($lowBitrate2)
        // ->addFormat($midBitrate1)
        // ->addFormat($midBitrate2)
        ->addFormat($highBitrate1)
        // ->addFormat($highBitrate2)
        ->toDisk('s3')
        ->save("public/Movies/{$this->movie->id}/{$this->movie->id}.m3u8");
}//end of handle
Activity icon

Replied to InvalidArgumentException: Missing Required Client Configuration Options

In the JavaScript file the video is processed

Aug
09
1 month ago
Activity icon

Replied to InvalidArgumentException: Missing Required Client Configuration Options

code js $(document).ready(function() {

$('#movie__file-input').on('change',function() {
    $('#movie__upload-wrapper').css('display' , 'none');
    $('#movie__properties').css('display' , 'block');

    var url = $(this).data('url');
    var movie = this.files[0];
    var movieId = $(this).data('movie-id');
    var movieName = movie.name.split('.').slice(0, -1).join('.');
    $('#movie__name').val(movieName);

    var formData = new FormData();
    formData.append('movie_id', movieId);
    // formData.append('name', movieName);
    formData.append('movie', movie);

    $.ajax({
        url: url,
        data: formData,
        method: 'POST',
        processData: false,
        contentType: false,
        cache: false,
        success: function (movieBeforeProcessing) {
            var interval = setInterval (function () {
                $.ajax({
                    url: `/ATeChatH/posts/${movieBeforeProcessing.id}`,
                    method: 'GET',
                    success: function (movieWhileProcessing) {
                        $('#movie__upload-status').html('Processing');
                        $('#movie__upload-progress').css('width', movieWhileProcessing.percent + '%');
                        $('#movie__upload-progress').html(movieWhileProcessing.percent + '%');

                        if (movieWhileProcessing.percent == 100) {
                            clearInterval(interval); //break interval
                            $('#movie__upload-status').html('Done Processing');
                            $('#movie__upload-progress').parent().css('display', 'none');
                            $('#movie__submit-btn').css('display', 'block');
                        }
                    },

                });//end of ajax call
            }, 3000);
        },
        xhr: function () {
            var xhr = new window.XMLHttpRequest();
            xhr.upload.addEventListener("progress", function (evt) {
                if (evt.lengthComputable) {
                    var percentComplete = Math.round(evt.loaded / evt.total * 100) + "%";
                    $('#movie__upload-progress').css('width', percentComplete).html(percentComplete);
                }
            }, false);
            return xhr;
        },
    }); // end of ajax call


}); // end of file input

}); //end of document

Activity icon

Replied to InvalidArgumentException: Missing Required Client Configuration Options

When I uploaded images with the same information as the author, the images were uploaded and were stored in Amazon normally

Activity icon

Started a new Conversation InvalidArgumentException: Missing Required Client Configuration Options

Hello I have an upload site on a Linux vps server, Ubuntu, the new version, which is used by Laravel and the packaged fmpeg for the upload client

A problem appears to me that I will attach, but I explain the type of problem. When I upload a video, the video is supposed to be uploaded, and then it goes to the processing, but times it raises and stops, and the error appears 500 times, it is raised and goes to treatment, but it stops here and the error appears to me that I will attach it and it is a problem in the country and does not match the information please Thank you for help

InvalidArgumentException: Missing required client configuration options: region: (string)

A "region" configuration value is required for the "s3" service (e.g., "us-west-2"). A list of available public regions and endpoints can be found at http://docs.aws.amazon.com/general/latest/gr/rande.html. in /var/www/html/vendor/aws/aws-sdk-php/src/ClientResolver.php:399

Stack trace: #0 /var/www/html/vendor/aws/aws-sdk-php/src/ClientResolver.php(295): Aws\ClientResolver->throwRequired() #1 /var/www/html/vendor/aws/aws-sdk-php/src/AwsClient.php(195): Aws\ClientResolver->resolve() #2 /var/www/html/vendor/aws/aws-sdk-php/src/S3/S3Client.php(327): Aws\AwsClient->__construct() #3 /var/www/html/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemManager.php(212): Aws\S3\S3Client->__construct() #4 /var/www/html/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemManager.php(129): Illuminate\Filesystem\FilesystemManager->createS3Driver() #5 /var/www/html/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemManager.php(101): Illuminate\Filesystem\FilesystemManager->resolve() #6 /var/www/html/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemManager.php(78): Illuminate\Filesystem\FilesystemManager->get() #7 /var/www/html/vendor/pbmedia/laravel-ffmpeg/src/FFMpeg.php(66): Illuminate\Filesystem\FilesystemManager->disk() #8 /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(261): Pbmedia\LaravelFFMpeg\FFMpeg->fromDisk() #9 /var/www/html/app/Jobs/StreamMovie.php(53): Illuminate\Support\Facades\Facade::__callStatic() #10 [internal function]: App\Jobs\StreamMovie->handle() #11 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(32): call_user_func_array() #12 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Util.php(36): Illuminate\Container\BoundMethod::Illuminate\Container{closure}() #13 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(90): Illuminate\Container\Util::unwrapIfClosure() #14

May
22
4 months ago
Activity icon

Replied to Laravel Ffmpeg Upload Video In Amazon S3 Failed 504 Gateway Time-out The Server Didn T Respond In Time

Exactly, but how do I increase the timeout for php, which makes me able to raise 10 gigabytes per hour or more without any connection to the server being interrupted? What should I add?

Activity icon

Replied to Laravel Ffmpeg Upload Video In Amazon S3 Failed 504 Gateway Time-out The Server Didn T Respond In Time

Sure, loading and processing is done on php, as well as nginx, so what commands that I add to php and nginx will increase the connection timeout?

May
21
4 months ago
Activity icon

Started a new Conversation Laravel Ffmpeg Upload Video In Amazon S3 Failed 504 Gateway Time-out The Server Didn T Respond In Time

Why after uploading a video size of more than 1 Giga, I see a problem in the nginx 504 gateway timeout preventing me from completing the processing process. The meaning of the video after uploading starts the processing process and because of this problem it does not go to processing use laravel ffmpeg and use amazon s3 service to store the videos on it and the entire site uploaded to Digital hosting

May
20
4 months ago
Activity icon

Replied to Is There Any Way That I Can Speed Up The Ffmpeg Processing Time

I think in sequence, accuracy after true accuracy, I am using the special method laravel -ffmpeg, but I expect in sequence, in addition to your high specifications, it is true that the reason may be this thing is poor hosting and many of the qualities are the reason I will try to raise my site on hosting Contabo gives better resources and more appropriate prices.

Activity icon

Replied to Is There Any Way That I Can Speed Up The Ffmpeg Processing Time

Regarding the speed, it affects hosting. Is it normal, even if the video is less than 1 megabyte, also affected by the speed of hosting because I have slow speed in all sizes, whether I upload a video of 1 megabyte or 1 Giga.

I use laravel-ffmpeg and through laravel queue I am cutting the video into several qualities I will attach the code to you below.

public function handle()
{
    //180p
    $lowBitrate1 = (new X264('aac'))->setKiloBitrate(613);
    //270p
    $lowBitrate2 = (new X264('aac'))->setKiloBitrate(906);
    //360p
    $midBitrate1 = (new X264('aac'))->setKiloBitrate(1687);
    //540p
    $midBitrate2 = (new X264('aac'))->setKiloBitrate(2227);
    //720p
    $highBitrate1 = (new X264('aac'))->setKiloBitrate(4300);
    //1080
    $highBitrate2 = (new X264('aac'))->setKiloBitrate(7917);

    FFMpeg::fromDisk('s3')
        ->open($this->movie->path)
        ->exportForHLS()
        ->onProgress(function ($percent) {
            $this->movie->update([
                'percent' => $percent
            ]);
        })
        ->setSegmentLength(10)// optional
        ->addFormat($lowBitrate1)
        ->addFormat($lowBitrate2)
        ->addFormat($midBitrate1)
        ->addFormat($midBitrate2)
        ->addFormat($highBitrate1)
        ->addFormat($highBitrate2)
        ->toDisk('s3')
        ->save("public/Movies/{$this->movie->id}/{$this->movie->id}.m3u8");
}//end of handle

This special code in the process of raising and processing in Java script will be attached below.

$('#movie__file-input').on('change',function() {
    $('#movie__upload-wrapper').css('display' , 'none');
    $('#movie__properties').css('display' , 'block');

    var url = $(this).data('url');
    var movie = this.files[0];
    var movieId = $(this).data('movie-id');
    var movieName = movie.name.split('.').slice(0, -1).join('.');
    $('#movie__name').val(movieName);

    var formData = new FormData();
    formData.append('movie_id', movieId);
    // formData.append('name', movieName);
    formData.append('movie', movie);

    $.ajax({
        url: url,
        data: formData,
        method: 'POST',
        processData: false,
        contentType: false,
        cache: false,
        success: function (movieBeforeProcessing) {
            var interval = setInterval (function () {
                $.ajax({
                    url: `/ATeChatH/posts/${movieBeforeProcessing.id}`,
                    method: 'GET',
                    success: function (movieWhileProcessing) {
                        $('#movie__upload-status').html('Processing');
                        $('#movie__upload-progress').css('width', movieWhileProcessing.percent + '%');
                        $('#movie__upload-progress').html(movieWhileProcessing.percent + '%');

                        if (movieWhileProcessing.percent == 100) {
                            clearInterval(interval); //break interval
                            $('#movie__upload-status').html('Done Processing');
                            $('#movie__upload-progress').parent().css('display', 'none');
                            $('#movie__submit-btn').css('display', 'block');
                        }
                    },

                });//end of ajax call
            }, 3000);
        },
        xhr: function () {
            var xhr = new window.XMLHttpRequest();
            xhr.upload.addEventListener("progress", function (evt) {
                if (evt.lengthComputable) {
                    var percentComplete = Math.round(evt.loaded / evt.total * 100) + "%";
                    $('#movie__upload-progress').css('width', percentComplete).html(percentComplete);
                }
            }, false);
            return xhr;
        },
    }); // end of ajax call


}); // end of file input
May
19
4 months ago
Activity icon

Started a new Conversation Is There Any Way That I Can Speed Up The Ffmpeg Processing Time

I am facing a problem with the processing process. I use a real joint server in a digital hosting package of $ 10 and use cloud service from Amazon s3. The problem is when uploading a video, whatever the size of the video, whether its size is 1 megabyte or 2 Giga. After the upload process, the processing process starts to upload, there is no problem But when the processing process takes a very long time so that I cannot complete it, what is the solution to that, is there a problem for me or is this process normal?