Open gamersalpha opened 1 year ago
The error message suggests that the user running the youtube-dl command does not have permission to create directories in the /var/www/.cache directory. You may need to adjust the permissions of this directory to allow the user to create directories and files inside it.
One way to do this is to use the chmod command to change the owner and group of the directory to the user running the youtube-dl command. For example, you can use the following command to change the owner and group of the directory to the user www-data (replace www-data with the appropriate user for your system):
sudo chown -R www-data:www-data /var/www/.cache
This command changes the owner and group of the /var/www/.cache directory and all of its contents recursively (-R option) to www-data. Once the ownership is set correctly, the user running the youtube-dl command should have permission to create directories and files in the directory.
Greetings,
I am facing an issue with my web application which appears to be related to the youtube-dl program installed on my Ubuntu server. This is a known problem that has been reported on the following GitHub pages: https://github.com/yt-dlp/yt-dlp/issues/6247 and https://github.com/ytdl-org/youtube-dl/issues/31530. Fortunately, a solution has been proposed on https://github.com/yt-dlp/yt-dlp/issues/3766.
To resolve this issue, I removed the previously installed youtube-dl program by executing the command: "sudo pip remove youtube-dl". Then, I installed the new program using the following commands:
sudo add-apt-repository ppa:tomtomtom/yt-dlp # Add ppa repo to apt
sudo apt update # Update package list
sudo apt install yt-dlp # Install yt-dlp
I attempted to change the executable name of youtube-dl by searching through several source code files, including videos/configuration.php, objects/Configuration.php, objects/Configuration.php, and objects/include_config.php. Unfortunately, I was unable to locate the specific line of code that would allow me to change the name. Instead, I opted to change the name manually by executing the following command:
sudo mv /usr/bin/yt-dlp /usr/bin/youtube-dl
In the future, I am curious to see if AVIDEO will be able to automatically detect the correct program name installed on the server. Thank you for your attention to this matter.
I hope that this solution can be useful for others who may encounter a similar issue.
if you install the yt-dlp in your server, AVideo will use it automatically
ok so look what i have : i lunch in comand line :
ok now i try to upluoad a video :
and like see, Avideo don't detect it
Run this and try again
sudo curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp && sudo chmod a+rx /usr/local/bin/yt-dlp
Looks work but got a new error :/
on log i got this :
Array
(
[0] => Halsey & Kelsea Ballerini Perform 'Without Me' | CMT Crossroads
)
[30-Mar-2023 08:01:45 Europe/Berlin] decideFormatOrder: {"videoURL":"https:\/\/www.youtube.com\/watch?v=Leex4LSf6aY&list=RDLeex4LSf6aY&start_radio=1","audioOnly":"false","spectrum":"false","webm":"false","override_status":"","update_video_id":0,"inputHLS":"false","inputLow":"false","inputSD":"false","inputHD":"false","inputAutoHLS":"false","inputAutoMP4":"false","inputAutoWebm":"false","inputAutoAudio":"true","categories_id":3,"releaseDate":"2023-03-30 08:00","notifyURL":""}
[30-Mar-2023 08:01:45 Europe/Berlin] decideFormatOrder: auto Audio
[30-Mar-2023 08:01:45 Europe/Berlin] AVideo-Encoder Format::getFromOrder(60)
[30-Mar-2023 08:01:45 Europe/Berlin] Encoder::sendFile videos_id=0, format=mp3
[30-Mar-2023 08:01:46 Europe/Berlin] Encoder::sendFile sending file to aVideoEncoder.json from
[30-Mar-2023 08:01:46 Europe/Berlin] sendToStreamer to aVideoEncoder.json
[30-Mar-2023 08:01:46 Europe/Berlin] Encoder::save id=() title=(Halsey & Kelsea Ballerini Perform \'Without Me\' | CMT Crossroads)
[30-Mar-2023 08:01:47 Europe/Berlin] sendToStreamer spectrumimage not set
[30-Mar-2023 08:01:47 Europe/Berlin] sendToStreamer rawVideo not set
[30-Mar-2023 08:01:47 Europe/Berlin] sendToStreamer image not set
[30-Mar-2023 08:01:47 Europe/Berlin] sendToStreamer gifimage not set
[30-Mar-2023 08:01:47 Europe/Berlin] sendToStreamer webpimage not set
[30-Mar-2023 08:01:47 Europe/Berlin] sendToStreamer video not set
[30-Mar-2023 08:01:47 Europe/Berlin] sendToStreamer https://youtube.serveur.fr/YouPHPTube/aVideoEncoder.json in 0.096 seconds {"error":false,"target":"aVideoEncoder.json","postFields":{"duration":"EE:EE:EE","title":"Halsey & Kelsea Ballerini Perform 'Without Me' | CMT Crossroads","first_request":1,"categories_id":3,"format":"mp3","resolution":"","videoDownloadedLink":"https:\/\/www.youtube.com\/watch?v=Leex4LSf6aY&&start_radio=1","description":"\"Does it ever get lonely? Thinking you could live without me.\" Yes, queens! \ud83d\ude4c \ud83d\udc51 This is one serious powerhouse performance of 'Without Me' by Kelsea Ballerini and Halsey.\n\n#KelseaBallerini #Halsey #CMT #Crossroads\n\nSUBSCRIBE now for more CMT Crossroads: https:\/\/bit.ly\/2KPSNQD\n\nFor updates on all things country, follow CMT!\nCrossroads on CMT: http:\/\/www.cmt.com\/shows\/cmt-crossroads\nCMT on FB: https:\/\/www.facebook.com\/CMTCrossroads\/\nCMT on Twitter: https:\/\/twitter.com\/cmt\nCMT on Instagram: https:\/\/www.instagram.com\/cmt\/\n\nGreat music knows no boundaries. CMT Crossroads shows the far-reaching roots of country music by pairing country artists with musicians from other genres. Each episode will feature a different set of stars playing together, swapping stories and sharing their common love of music.","downloadURL":"","chunkFile":"","encoderURL":"https:\/\/youtube.serveur.fr\/YouPHPTube-Encoder\/","keepEncoding":"0","streamers_id":"4","user":"issa2020","pass":"_user_hash_dWFDVlB0SWMybFU4WWNMbzVvZ0RZbXRrek1uUnFwNjJCMGdPeFk0Y285MCs4Uld3T2JPeFBoRE9DT2VFOUtoSUxHSUc1WUtOUXMvUnVscDMwaVFFVmc9PQ==","return_vars":"{\"videos_id\":0,\"video_id_hash\":\"\",\"releaseDate\":\"2023-03-30 08:00\"}","releaseDate":"2023-03-30 08:00"},"response_raw":"{\"error\":false,\"video_id\":false,\"video_id_hash\":\"Qnhjb1hiQkRsSjZSYk1FekQ0QWROcVFqWmxOMm1PZ1p1N2J4VjV1QkE2UT0=\",\"releaseDate\":\"2023-03-30 08:00\"}","response":{"error":false,"video_id":false,"video_id_hash":"Qnhjb1hiQkRsSjZSYk1FekQ0QWROcVFqWmxOMm1PZ1p1N2J4VjV1QkE2UT0=","releaseDate":"2023-03-30 08:00"}}
[30-Mar-2023 08:01:47 Europe/Berlin] Encoder::save id=(17) title=(Halsey & Kelsea Ballerini Perform \'Without Me\' | CMT Crossroads)
[30-Mar-2023 08:01:51 Europe/Berlin] getReturn_vars {"videos_id":0,"video_id_hash":"Qnhjb1hiQkRsSjZSYk1FekQ0QWROcVFqWmxOMm1PZ1p1N2J4VjV1QkE2UT0=","releaseDate":"2023-03-30 08:00"}
[30-Mar-2023 08:01:51 Europe/Berlin] Encoder::save id=(17) title=(Halsey & Kelsea Ballerini Perform \'Without Me\' | CMT Crossroads)
[30-Mar-2023 08:01:51 Europe/Berlin] Encoder::save id=(17) title=(Halsey & Kelsea Ballerini Perform \'Without Me\' | CMT Crossroads)
[30-Mar-2023 08:01:51 Europe/Berlin] downloadFile: start queue_id = 17 url = https://www.youtube.com/watch?v=Leex4LSf6aY&&start_radio=1 pathFileName = /var/www/html/YouPHPTube-Encoder/videos/17_tmpFile.mp4
[30-Mar-2023 08:01:51 Europe/Berlin] getYoutubeDl: Getting from Youtube DL /usr/local/bin/yt-dlp --no-check-certificate --force-ipv4 --no-playlist -k -o /tmp/youtubeDlcN3iXE.mp4 -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4' 'https://www.youtube.com/watch?v=Leex4LSf6aY&&start_radio=1' [{"file":"\/var\/www\/html\/YouPHPTube-Encoder\/objects\/Encoder.php","line":470,"function":"getYoutubeDl","class":"Encoder","type":"::"},{"file":"\/var\/www\/html\/YouPHPTube-Encoder\/objects\/Encoder.php","line":968,"function":"downloadFile","class":"Encoder","type":"::"},{"file":"\/var\/www\/html\/YouPHPTube-Encoder\/view\/run.php","line":6,"function":"run","class":"Encoder","type":"::"}]
[30-Mar-2023 08:02:15 Europe/Berlin] getYoutubeDl: Copying [/tmp/youtubeDlcN3iXE.mp4] to [/var/www/html/YouPHPTube-Encoder/videos/17_tmpFile.mp4]
[30-Mar-2023 08:02:15 Europe/Berlin] downloadFile:getYoutubeDl SUCCESS queue_id = 17
[30-Mar-2023 08:02:15 Europe/Berlin] Encoder::save id=(17) title=(Halsey & Kelsea Ballerini Perform \'Without Me\' | CMT Crossroads)
[30-Mar-2023 08:02:15 Europe/Berlin] downloadFile: {"error":false,"filename":"17_tmpFile.mp4","pathFileName":"\/var\/www\/html\/YouPHPTube-Encoder\/videos\/17_tmpFile.mp4","msg":"We downloaded the file with success"}
[30-Mar-2023 08:02:15 Europe/Berlin] Original filesize is 98.79MB
[30-Mar-2023 08:02:15 Europe/Berlin] Encoder::save id=(17) title=(Halsey & Kelsea Ballerini Perform \'Without Me\' | CMT Crossroads)
[30-Mar-2023 08:02:15 Europe/Berlin] try [1] return_vars->videos_id is empty {"videos_id":0,"video_id_hash":"Qnhjb1hiQkRsSjZSYk1FekQ0QWROcVFqWmxOMm1PZ1p1N2J4VjV1QkE2UT0=","releaseDate":"2023-03-30 08:00"}
[30-Mar-2023 08:02:15 Europe/Berlin] Encoder::save id=(17) title=(Halsey & Kelsea Ballerini Perform \'Without Me\' | CMT Crossroads)
[30-Mar-2023 08:02:15 Europe/Berlin] getReturn_vars {"videos_id":0,"video_id_hash":"Qnhjb1hiQkRsSjZSYk1FekQ0QWROcVFqWmxOMm1PZ1p1N2J4VjV1QkE2UT0=","releaseDate":"2023-03-30 08:00"}
first, try to update your streamer and encoder.
if still fails share a more complete encoder log.
Hello i can't encode anymore video do u have information about this error please ?
First i update youtube-dll :
so now i can't understand why Avideo-encoder wants writer in /var/www/.cache
and i also tries this :
can u explain me what's is wrong please
thanks