Giter Site home page Giter Site logo

youtube's People

Contributors

ahmedash95 avatar arcanedev-maroc avatar izal avatar joedawson avatar panstromek avatar satoved avatar seblavoie avatar stojankukrika avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

youtube's Issues

Issue on upload

Greetings,

I seem to be getting the following issue when I try to upload a video to YouTube - it doesn't happen every time, but it happens often enough that I need to try to see if I can find a work around.

[2017-05-25 21:44:56] production.ERROR: Google_IO_Exception: Operation timed out after 100001 milliseconds with 0 bytes received in /home/forge/myamazingsite.com/vendor/google/apiclient/src/Google/IO/Curl.php:126
Stack trace:
#0 /home/forge/myamazingsite.com/vendor/google/apiclient/src/Google/IO/Abstract.php(136): Google_IO_Curl->executeRequest(Object(Google_Http_Request))
#1 /home/forge/myamazingsite.com/vendor/google/apiclient/src/Google/Http/MediaFileUpload.php(145): Google_IO_Abstract->makeRequest(Object(Google_Http_Request))
#2 /home/forge/myamazingsite.com/vendor/google/apiclient/src/Google/Http/MediaFileUpload.php(196): Google_Http_MediaFileUpload->makePutRequest(Object(Google_Http_Request))
#3 /home/forge/myamazingsite.com/vendor/craytor/youtube/src/Youtube.php(143): Google_Http_MediaFileUpload->nextChunk('M\x8Ar\xAFK]@j3H$\x17\xE1.5...')
#4 /home/forge/myamazingsite.com/bootstrap/cache/compiled.php(6468): Craytor\Youtube\Youtube->upload('/home/forge/cdn...', Array, 'unlisted')
#5 /home/forge/myamazingsite.com/app/Jobs/NewProcessVideo.php(160): Illuminate\Support\Facades\Facade::__callStatic('upload', Array)
#6 /home/forge/myamazingsite.com/app/Jobs/NewProcessVideo.php(74): App\Jobs\NewProcessVideo->uploadVideoToYouTube()
#7 [internal function]: App\Jobs\NewProcessVideo->handle()
#8 /home/forge/myamazingsite.com/bootstrap/cache/compiled.php(1375): call_user_func_array(Array, Array)
#9 /home/forge/myamazingsite.com/bootstrap/cache/compiled.php(9947): Illuminate\Container\Container->call(Array)
#10 /home/forge/myamazingsite.com/bootstrap/cache/compiled.php(10062): Illuminate\Bus\Dispatcher->Illuminate\Bus\{closure}(Object(App\Jobs\NewProcessVideo))
#11 /home/forge/myamazingsite.com/bootstrap/cache/compiled.php(10040): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(App\Jobs\NewProcessVideo))
#12 /home/forge/myamazingsite.com/bootstrap/cache/compiled.php(9950): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#13 /home/forge/myamazingsite.com/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(47): Illuminate\Bus\Dispatcher->dispatchNow(Object(App\Jobs\NewProcessVideo), false)
#14 /home/forge/myamazingsite.com/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(73): Illuminate\Queue\CallQueuedHandler->call(Object(Illuminate\Queue\Jobs\BeanstalkdJob), Array)
#15 /home/forge.myamazingsite.com/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(203): Illuminate\Queue\Jobs\Job->fire()
#16 /home/forge/myamazingsite.com/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(153): Illuminate\Queue\Worker->process('beanstalkd', Object(Illuminate\Queue\Jobs\BeanstalkdJob), Object(Illuminate\Queue\WorkerOptions))
#17 /home/forge/myamazingsite.com/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(75): Illuminate\Queue\Worker->runNextJob('beanstalkd', 'default', Object(Illuminate\Queue\WorkerOptions))
#18 /home/forge/myamazingsite.com/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(100): Illuminate\Queue\Worker->daemon('beanstalkd', 'default', Object(Illuminate\Queue\WorkerOptions))
#19 /home/forge/myamazingsite.com/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(84): Illuminate\Queue\Console\WorkCommand->runWorker('beanstalkd', 'default')
#20 [internal function]: Illuminate\Queue\Console\WorkCommand->fire()
#21 /home/forge/myamazingsite.com/bootstrap/cache/compiled.php(1375): call_user_func_array(Array, Array)
#22 /home/forge/myamazingsite.com/vendor/laravel/framework/src/Illuminate/Console/Command.php(169): Illuminate\Container\Container->call(Array)
#23 /home/forge/myamazingsite.com/vendor/symfony/console/Command/Command.php(254): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#24 /home/forge/myamazingsite.com/vendor/laravel/framework/src/Illuminate/Console/Command.php(155): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#25 /home/forge/myamazingsite.com/vendor/symfony/console/Application.php(821): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#26 /home/forge/myamazingsite.com/vendor/symfony/console/Application.php(187): Symfony\Component\Console\Application->doRunCommand(Object(Illuminate\Queue\Console\WorkCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#27 /home/forge/myamazingsite.com/vendor/symfony/console/Application.php(118): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#28 /home/forge/myamazingsite.com/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(121): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#29 /home/forge/myamazingsite.com/artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#30 {main}

I'm uploading my video like so:

$video = Youtube::upload(storage_path() . '/app/processed-videos/' . $this->videoId . '.mp4', [
            'title'       => 'my title',
            'description' => "my description",
            'tags'        => ['tag'],
            'category_id' => 25
        ], 'unlisted');

Am I able to do exception handling with the Youtube class? Possibly a try and catch, and if I can catch it just have it try the upload again?

Thanks!

Error Integrating in MongoDB

Hey, thank you for this library.There is a problem integrating this library with my mongoDB app
It does not save to the database and when I did it manually, there was a problem with this function getLatestAccessTokenFromDB() since $latest in mongodb is an array but it expects an object.

ErrorException in Youtube.php line 296

HI,
When I use your script I get this error:
"ErrorException in Youtube.php line 296: call_user_func_array() expects parameter 1 to be a valid callback, class 'Google_Client' does not have a method 'save'"

It update video to youtube(I get email when it finished) but didn't get video ID on my web application. Did you maybe know what is the problem?

This is my code in my controller in laravel:

                        $video = Youtube::upload( $destinationPath . $video->file_name, [
				'title'       => $request->get( 'title' ),
				'description' => $request->get( 'title' ),
				'category_id' => $this->user->organization_id
			] );

			$video->youtube_id = $video->getVideoId();

Failed to start the resumable upload

i upload successful when i use account developer console. but when i use other account, i can't upload video. it's show this error.
Google_Exception in MediaFileUpload.php line 334:
Failed to start the resumable upload (HTTP 401: youtube.header, Unauthorized)

can you help me !

Strange Error

When I hit the URL: '/youtube-auth',
I get:
BadMethodCallException in ServiceProvider.php line 237:
Call to undefined method [createAuthUrl]

Also when I try to access the Youtube::upload() function, it says:
FatalErrorException in VideoController.php line 27:
Call to undefined method Dawson\Youtube\YoutubeServiceProvider::upload()

Can you please help me to figure out whats wrong?
I've included the serviceprovider in app.php

how to build an upload controller?

hi, I'm currently making website for my final project, but I'm new on web development and i'm really confused with this package.

I have followed your steps, and I've got the access_token in my youtube_access_tokens table.

can you give me detailed explanation about how to pass the full path to my video that I wish to upload?

hopefully you can give me an example too

thanks,

Youtube Upload Issue

Whenever I am trying to upload a video to my youtube account after authentication (obviously), I am getting an error as following:

  1. Non-static method Dawson\Youtube\Youtube::upload() should not be called statically, assuming $this from incompatible context

For the above one I created a new instance of Youtube class inside my controller method like below

$youtube = new Youtube();

After that I access method like this $youtube->upload($pathToVideo, $params);

Browsing that route gave me an error "An access token is required to delete a video."

I dont know why its not saving access token to db. Any suggestion

Here is the function:

public function youtubeUpload()
{
    $youtube = new Youtube();
    $pathToMovieFile = "uservideos\\1\\github1.mp4";

    $params = [
        'title' => 'Laravel Screencast',
        'description' => 'My First Laravel Tutorial!',
        'tags' => [
            'laravel',
            'eloquent',
            'awesome' // Of course!
        ]
    ];

    $id = $youtube->upload($pathToMovieFile, $params);

    dd($id);
    return $id;
}

Not getting realpath of uploading video

Due to browser security reason, not getting realpath of uploading video file.
Please suggest me, is this possible to get realpath of video.
or any other way to get path of video from input file.please help me.
Thank you.

Issues with the refresh token

Hi Joe,

Awesome extension to laravel!!

I'm having issues with the stdClass::$refresh_token. I have noticed that if I don't run an authentication with my youtube channel daily it pops up with a Undefined property: stdClass::$refresh_token. Which is easy enough to resolve by re-authentication.

Is this normal operation of the access/refresh token? I would ideally like it to re authenticate again on its own. Could you perhaps point me in the right direction in the code so I might do a rewrite? I am kind of thinking something is wrong in my code. I did rewrite the youtube.php to point to my correct file storage path but other than this its straight adjusted use of the extension.

Matt

How to update video metadata

Hi.
Thanks for the awesome plugin.

I would like to know if there is any plan to include updating the video data.
What I want to do now is that the uploader can update his video data (descriptions,tags,privacy) even after some time.

Currently I can't seems to find it.

Thanks

Middleware for Auth

Hi, first of all, thanks for this package is very usefull!. Just one question, how can I add an user auth Middleware for the Youtube Auth without editing the package?

Thanks.

Cannot upload video to channel

Hi @joedawson ..

As what I commented in #22 ..
I have trouble uploading the video into the Youtube channel.

I received the following errors.
Error calling PUT https://www.googleapis.com/upload/youtube/v3/videos?part=status%2Csnippet&uploadType=resumable&upload_id=AEnB2Uo861Mp6x6yxJYpAPDjpEObncJVyWr51MET2a9aGWDmczxW253CcOWuVj25B2XjCjDOrCJ7lZzK_WcyquqAB8UUNUCysUsZ-_5emt9Gt3ZZO7krQ9E: (400) Failed to parse Content-Range header.

I did a read and the error could be because of the same video being uploaded. But I checked the channel and no same videos is being uploaded.

I've been getting lots of email and pressure from the client and my team lead to solve this issue and I really hope you can help me to solve this problem. I'm gonna continue with reading about this and if I found a solution, I'll let you know also.

Thanks in advance.

Thumbnail method is not working

I want to add custom thumbnail to youtube video.
My code is like this

$pathToImage = 'D:\267345581.jpg';

$video = Youtube::upload($videopath, [
	'title'       => 'cranes',
	'description' => 'You can also specify your video description here.',
	'tags'        => ['foo', 'bar', 'baz'],
	'category_id' => 10
])->withThumbnail($pathToImage);

but its not working
please tell me what is the problem in this code.
thank you.

Single User, Single Channel video uploading with error

I'm trying to set up a single channel uploading process and keep receiving this error:
SplFileInfo::getType(): Lstat failed for (file path).

I've changed permissions of that folder to 755 and then 777 and still no luck. Any ideas?

Could not find route.

Hi, great work with this package. For an unknown reason the default auth route (/youtube-auth) is not working for me. I just get NotFoundHttpException. Thanks.

Uploaded Videos stay on 0%

Hi there,

bit of a random one I'm using your library to upload videos to YouTube, but unfortunately the videos seem to stay on 0% in the video manager of my youtube account - I was wondering whether there is some error that I'm missing that is being thrown or could it be some kind of permissions issue? I have put a try catch around your upload method to catch Google_ServiceException and Google_Exception, but nothing is being caught, is this an issue that you've seen / overcome?

Thanks for any help

How to cancel an upload?

How to cancel an upload because the connection is slow? When I upload a video sometimes my connection is slow and the uploading is maintained long

'Google_IO_Exception' with message 'SSL read: error:00000000:lib(0):func(0):reason(0), errno 10053'

Hi, firstly thank you so much for this great package.
We are using your youtube module in our laravel project.
We deployed laravel to Windows machine and using IIS.
Sometimes in large videos, up to 1GB we're getting this error:

'Google_IO_Exception' with message 'SSL read: error:00000000:lib(0):func(0):reason(0), errno 10053'

I know this issue may not be related to you but maybe you can suggest some tips.

Is there any limitation for uploading filesize limit or etc?

Error in upload

Sorry about this, probably I am doing something wrong. I am getting Non-static method Dawson\Youtube\Youtube::upload() should not be called statically, assuming $this from incompatible context when trying to do:

   $params = [
        'title' => 'title',
        'description' => 'description'
        'category_id' => 28,
        'tags' => ['test']
    ];

    $id = Youtube::upload($video, $params);

$_GET['code'] is not set.

Hi,
First I want to say thank you for your awesome code. I using it, but I have a problem with this.

capture

Do you have any idea?

Thank you.

Call to undefined BladeCompiler::directive

Hi

When I try to install this it give me this error:
PHP Fatal error: Call to undefined method Illuminate\View\Compilers\BladeCompiler::directive() in /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php on line 213

I'm using Laravel 5.0 I can't upload to Laravel 5.1

Token expires after few hours.

I think once I authenticate using youtube-auth, the token expires after few hours, is it so? because i am getting error as "Undefined property: stdClass::$refresh_token" and, hitting youtube-auth again solves the problem

Video tutorial

is there any link to video tutorial for this package?

An access token is required to delete a video

Hello, sorry for my English. I have this problem and I checked other solutions that has given others but have not worked for me. I am using the version dev-master and I checked in google and I have activated YouTube Data API v3, also generate my Client ID and Client secret but not because it will not let me connect.
Any idea because it can be? thank you very much.

Why asks user to login with google account to use youtube upload?

Hi,
I have one question for creator of that great script. I love it!
I use this script to my users can upload video to youtube, but have a some problem with som users who didn't have gmail account and want to use this website. Why ask user to login with google account to use youtube upload when we have app credentials in settings?

Unlisted video

Hello,

Your script works great, but, how can i pass unlisted parameter?

Unique ask for permission. Is it possible?

Hi Joe. First, your app works so good and thanks.
I was wondering if there is any way that google does not ask us permission to do so or only once.
Our app has videos that are moderated and then, uploaded to one unique youtube channel. it is not so good that the app ask us for permission every time that the moderators log in.
Is any whay to do that?

Sorry for my english.

Greetings.

Additional parameters for youtube?

$params = [
    'title' => 'Laravel Screencast',
    'description' => 'My First Laravel Tutorial!',
    'category_id' => 10,
    'tags' => [
        'laravel',
        'eloquent',
        'awesome' // Of course!
    ]
];

Why not more params? Private and all this stuff? Youtube offers quite a lot of options that can be called via json-object. Some additional would be nice. Actually it should be possible to throw them into the array with the description and a value, while a method in the background generates the json-object.

Vimeo functionality in youtube???

 /**
     * Request an access token. This is the final step of the
     * OAuth 2 workflow, and should be called from your redirect url.
     *
     * @param string $code The authorization code that was provided to your redirect url
     * @param string $redirect_uri The redirect_uri that is configured on your app page, and was used in buildAuthorizationEndpoint
     * @return array This array contains three keys, 'status' is the status code, 'body' is an object representation of the json response body, and headers are an associated array of response headers
     */
    public function accessToken($code, $redirect_uri) {
        return $this->request(self::ACCESS_TOKEN_ENDPOINT, array(
            'grant_type' => 'authorization_code',
            'code' => $code,
            'redirect_uri' => $redirect_uri
        ), "POST", false);
    }

It would be nice to add the functionality of the vimeo.php extension in the youtube one. It would make it easier create proper structures in the programming.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.