Video does not play

Hi. I currently have an instance of PeerTube locally, without ‹ https ›. The problem I am having is that the video I have uploaded is not playing. I have read in other forum threads about the version of ffmpeg, but it is all correct.

On another machine I generated a domain to create an instance of PeerTube with ‹ https › to test it and it works correctly.

Is it a mandatory requirement to have a domain? I have also seen something in the logs about « error: Client log: HLS.js error: networkError », this appears to me but I can’t find the solution.

Could someone help me? Thank you very much for your help.

@Chocobozzz any idea? thanks

If you disabled https, you must set https: false and the port 80 in your production.yaml. Something like:

webserver:
  https: false
  hostname: 'example.com'
  port: 80

Then restart Peertube, and try to upload a new file.

Note, just in case: as said in the documentation, Peertube does not support domain changes. So, if your instance is local, you won’t be able to make it public afterwards.

Thank you for your response. But when I change that (which I had active) I get an error at the bottom right that says something about « Unable to retrieve OAuth client credentials: Getting client tokens for host 10.241.247.127:9000 is forbidden. Make sure you have correctly configured PeerTube (config / directory), in particular the « web server » section. »

Despite this change, the videos still do not play. This is a local instance, just for testing. Any idea @JohnLivingston ?

EDIT: Even now, any video I upload, I get the message: « Failed to play video.
The video could not be played due to technical problems.
The media could not be uploaded, either because the server or network failed or because the format is not supported. »

EDIT2: It seems that a library is missing from the ffmpeg package (libfdk-aac.so.2 is missing). Even so, my video still won’t play and the only thing I see in the log is « error: Client log: HLS.js error: networkError - fatal: true… » Nothing else

This usually happen when there is an inconsistency between the production.yaml webserver section and the url you use in your browser.

Can you copy the webserver section of your config file? And the exact url that you open in your brower?

Maybe you have to run the update-host script. I’m not sure.

Or maybe try in private browser, perhaps your browser has a token for the old url.

Are the transcoding jobs finished? Have they failed? (you can see this on the /admin/system/jobs page).

Can you open your browser developer console (F12), go to the network tab, refresh the page, and try playing the video again. Then, copy following information for the first request that fail: the url, the error code, the error message.

Finally, I have left it as follows:

webserver:
  https: false
  hostname: '10.241.247.127'
  port: 9000

I don’t know if there are problems due to being local and not using ‹ https › or if it also has something to do with what is referenced in this post.

With the command « journalctl -feu peertube » I could see that a library (libfdk-aac.so.2) used by ffmpeg was missing, since the message « libfdk-aac.so.2 is missing » appeared. I saw this thanks to a post of yours where you forced to use HLS.

With all these changes, it seems that the server is working correctly and uploading/playing all the videos well, although I will continue testing.

@JohnLivingston Thank you very much for your patience and help, really. It is nice to receive help like this in a forum. :slightly_smiling_face:

I use this kind of setup on my dev environments, so it whould be working. As long as you open http://10.241.247.127:9000 in your browser.

Great!

Thanks :slight_smile:

1 « J'aime »

@JohnLivingston Sorry for the inconvenience again, but I have again problems and I think you can help me.

My PeerTube instance works correctly using the IP of the machine, everything goes perfect. Now on the other hand we have a F5 (www.F5.com) that makes it access a URL and redirect to the machine where PeerTube is (I don’t know how to do it).

The redirection works, that is, my PeerTube instance appears in that URL but I can not log in now, the ‹ OAuth › message appears and with the « journalctl » command I see the following: « invalid_client: Invalid client: client is invalid ». The curious thing is that with the IP, if I can log in.

The same happens with the videos, they don’t play but entering the URL by the IP address they play.

In the PeerTube configuration I have put the URL, but nothing. I have also put now 0.0.0.0.0 and the web works, at least.

Could you help me, what information or screenshots could you need so that we can try to solve the problem together?

Best regards and sorry for the inconvenience again.

If it helps, with the browser’s developer console I see the following message when I try to access the URL with the video and it doesn’t play:

« The page at ‹ https://my-url/w/ID-video › was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint »

As said before, this happens when the configuration in the webserver section differs from the url on which you are accessing Peertube.
You can’t access your instance from multiple urls, you must choose one (between IP and your public domain).

And as said before, Peertube does not support url change. If you change your instance url, you have to start over with a new database (or use the update-host script, link given previously, but this could break some things as said in the documentation).

I have no problem creating a new instance, but I would like to know what I should put. The url I have been given is: « videos-desa.es ». I don’t manage any of this, they just tell me it points to my server.

In fact, by typing the url, without having touched anything on the server, I access the GUI perfectly.

They tell me that a wildcard certificate is used, the clients attack on a F5 and it redirects to the server. But I don’t know if I need the certificates for HTTPS. I’m sorry for these problems, I think I’m making you much more confused, but this is what I know right now.

@JohnLivingston By configuring Nginx to redirect all HTTP traffic to HTTPS I was able to get it to work, no more HTTPS errors in the browser developer console except this one: « Service worker registration failed with: DOMException: Failed to register a ServiceWorker for scope (‹ https://videos-midominio.es ›) with script (‹ https://videos-midominio.es/ngsw-worker.js ›). An unknown error occurred when fetching the script ».

I don’t know if it is important or not. Any idea? The site is working fine though.

As far as i know, there is no such file in Peertube.
Either it comes from a plugin you have enabled, either its F5 that is injecting it in the page.

Okay. Thank you very much for your patience and help again :sweat_smile: