userqq / chaturbate-recorder

2 stars 3 forks source link

Help with installation and first run #3

Open alekssobolewski opened 5 years ago

alekssobolewski commented 5 years ago

Hi, @userqq would you like to help me with installation and first run of this script?

I have installed php7.2 with php-cli, eio and composer. After running composer install there are no errors, but ./index.php or php index.php gives no output. There is also no .env file generated.

Do not run Composer as root/super user! See https://getcomposer.org/root for details
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 41 installs, 0 updates, 0 removals
  - Installing react/event-loop (v0.4.3): Loading from cache
  - Installing amphp/amp (v2.1.1): Loading from cache
  - Installing amphp/react-adapter (v1.1.0): Loading from cache
  - Installing react/promise (v2.7.1): Loading from cache
  - Installing evenement/evenement (v3.0.1): Loading from cache
  - Installing react/stream (v1.1.0): Loading from cache
  - Installing react/promise-timer (v1.5.1): Loading from cache
  - Installing react/cache (v0.5.0): Loading from cache
  - Installing react/dns (v0.4.17): Loading from cache
  - Installing react/datagram (v1.4.0): Loading from cache
  - Installing clue/mq-react (v1.1.0): Loading from cache
  - Installing psr/http-message (1.0.1): Loading from cache
  - Installing ringcentral/psr7 (1.2.2): Loading from cache
  - Installing react/socket (v0.8.12): Loading from cache
  - Installing react/promise-stream (v1.1.1): Loading from cache
  - Installing react/http-client (v0.5.9): Loading from cache
  - Installing clue/buzz-react (v2.3.0): Loading from cache
  - Installing khr/php-mcurl-client (3.1.0): Loading from cache
  - Installing khr/react-curl (2.0.1): Loading from cache
  - Installing league/uri-parser (1.4.1): Loading from cache
  - Installing amphp/uri (v0.1.3): Loading from cache
  - Installing amphp/byte-stream (v1.5.1): Loading from cache
  - Installing amphp/process (v0.3.3): Loading from cache
  - Installing amphp/windows-registry (v0.3.1): Loading from cache
  - Installing amphp/parser (v1.0.0): Loading from cache
  - Installing amphp/cache (v1.2.0): Loading from cache
  - Installing daverandom/libdns (v2.0.1): Loading from cache
  - Installing amphp/dns (v0.9.14): Loading from cache
  - Installing amphp/sync (v1.0.1): Loading from cache
  - Installing amphp/parallel (v0.2.5): Loading from cache
  - Installing amphp/file (v0.3.1): Loading from cache
  - Installing amphp/socket (v0.10.11): Loading from cache
  - Installing amphp/http (v1.1.0): Loading from cache
  - Installing amphp/websocket (v0.2.3): Loading from cache
  - Installing kelunik/certificate (v1.1.1): Loading from cache
  - Installing amphp/artax (v3.0.14): Loading from cache
  - Installing chrisyue/php-m3u8 (2.3.2): Loading from cache
  - Installing opis/closure (3.2.0): Loading from cache
  - Installing amphp/parallel-functions (v0.1.3): Loading from cache
  - Installing symfony/polyfill-ctype (v1.11.0): Loading from cache
  - Installing vlucas/phpdotenv (v2.6.1): Loading from cache
react/event-loop suggests installing ext-libevent (>=0.1.0)
react/event-loop suggests installing ext-event (~1.0)
react/event-loop suggests installing ext-libev (*)
league/uri-parser suggests installing ext-intl (Allow parsing RFC3987 compliant hosts)
league/uri-parser suggests installing league/uri-schemes (Allow validating and normalizing URI parsing results)
daverandom/libdns suggests installing ext-intl (Required for IDN support)
amphp/parallel suggests installing ext-pthreads (Required for thread contexts)
Writing lock file
Generating autoload files
userqq commented 5 years ago

Hi. It's very raw project and I'm not sure it's posible to run it as is without any fixes.

You should create .env file by yourself. Sample you can find in README.md. You need to specify at least TEMPORARY_PATH.

If you don't want to upload files to vk.com, only store them locally you can do not specify ACCESS_TOKEN and comment following line https://github.com/userqq/chaturbate-recorder/blob/master/app/stream/File.php#L106

alekssobolewski commented 5 years ago

Thanks for answer!

Installing some additional PHP modules solved the case and now script seems to run smoothly. Here is part of the log (I have run it in screen session for some time).

PHP Warning:  Module 'memcached' already loaded in Unknown on line 0            
2019-05-10 13:11:30 > karlakole online                                          
2019-05-10 13:22:25 > lagerthaviking online                                     
2019-05-10 13:22:25 > lagerthaviking gone                                       
2019-05-10 13:22:26 > lagerthaviking online                                     
2019-05-10 13:22:26 > lagerthaviking gone                                       
2019-05-10 13:22:26 > lagerthaviking online                                     
2019-05-10 13:22:27 > lagerthaviking gone                                       
2019-05-10 13:22:28 > lagerthaviking online                                     
2019-05-10 13:22:28 > lagerthaviking gone                                       
2019-05-10 13:22:29 > lagerthaviking online                                     
2019-05-10 13:22:29 > lagerthaviking gone                                       
2019-05-10 13:22:29 > lagerthaviking online

In .env I specified VK API key form application created at vk.com/apps and TEMPORARY_PATH is pointed to directory in root. Now the problem is that there are no recordings either in that temp folder or VK.

userqq commented 5 years ago

Is TEMPORARY_PATH accessible for writting from user which runs the script?

Also you need to use token instead of api key. To get token you can open in browser following link: https://oauth.vk.com/authorize?client_id=YOUR_API_CLIENT_ID&scope=9999999&redirect_uri=http://oauth.vk.com/blank.html&display=touch&response_type=token and click "Allow", then copy access_token param from url bar.

alekssobolewski commented 5 years ago

I think so. Script is being run by root, and the temp directory is set /root/rec.

Thanks for instructions for obtaining the correct token. Unfortunately your link is not working, here is version that worked out for me. I somehow figured it out. https://oauth.vk.com/authorize?client_id=&scope=photos,video,audio,offline,nohttps&redirect_uri=https://oauth.vk.com/blank.html&display=page&response_type=token&revoke=1

I have set the correct token and now waiting for videos to appear on my VK account.

alekssobolewski commented 5 years ago

Here is another fragment of the log

2019-05-10 16:58:20 > blue_cat_emma online                                      
2019-05-10 16:58:21 > siswet19 online                                           
2019-05-10 16:58:22 > sarahminage online                                        
2019-05-10 16:58:31 > reddevilsroom online                                      
2019-05-10 16:58:33 > lagerthaviking online                                     
2019-05-10 17:06:00 > mohawkmolly online                                        
2019-05-10 17:06:01 > mohawkmolly gone                                          
2019-05-10 17:06:01 > mohawkmolly online                                        
2019-05-10 17:06:01 > mohawkmolly gone                                          
2019-05-10 17:06:02 > mohawkmolly online                                        
2019-05-10 17:06:02 > mohawkmolly gone                                          
2019-05-10 17:06:03 > mohawkmolly online

There are still no recordings on drive or on VK. After reading the code and log I think that script is not even trying to send video to VK. I suspect to see in log something like will upload file ... for model ... from Uploader.php

alekssobolewski commented 5 years ago

Okay, first success - recording is working. Streams are being recorded, but upload to VK does not work.