Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Respect current video resolutions when replacing the video file #6662

Open
EricGuic opened this issue Oct 9, 2024 · 5 comments
Open

Respect current video resolutions when replacing the video file #6662

EricGuic opened this issue Oct 9, 2024 · 5 comments

Comments

@EricGuic
Copy link
Contributor

EricGuic commented Oct 9, 2024

Describe the current behavior

Hi,
When Peertube is set to do only HLS transcoding by default, we can still manually trigger a web-video transcoding too.
(I use it on some video when we need to embed the stream in H5P interactiv object, which doesn't support well HLS stream).

But when I replace the video by a new version, all HLS resolution are transcoded as expected, but all pre-existing web-video resolutions are deleted (leaving the H5P interactive object with missing stream error).

BEFORE I upload a new version (with manually triggered web-video resolutions) :
hls by default with manually triggered webvideo BEFORE replacement

AFTER I've uploaded a new version (new HLS version, but all web-video have been deleted) :
hls new version without any webvideo AFTER replacement

Steps to reproduce

1.set Peertube to do only HLS resolutions
2.upload a video
3.manually trigger webtorrent transcoding of the video
4.upload a new version of the video
5.see that all web-video resolutions have been deleted

Describe the expected behavior

On an Peertube server with only one type of transcoding activated by default, I expect to see the "upload new version" process to check if any alternative transcoding (HLS or Web-video) already existed at the time of the replacement, and if so, it triggers the same transcoding.

So in my case, only HLS is set by default. But if Peertube "see" that web-video already existed for a video, it will trigger also this web-video transcoding during this replacement, in addition to the default HLS.

Additional information

  • PeerTube instance:

    • URL:
    • Version: 6.3.0
    • NodeJS version:
    • Ffmpeg version:
  • Browser name, version and platforms on which you could reproduce the bug:

  • Link to browser console log if relevant:

  • Link to server log if relevant (journalctl or /var/www/peertube/storage/logs/):

@EricGuic
Copy link
Contributor Author

And to add a precision :
I also expect in my case that the new web-video transcodings stay reachable behind the same url as the original one, so previous use of it (in my case in H5P object) still works after the replacement.

If it's usefull, in H5P, I'm setting as the source the download url of the web-video file, for example :
https://tube.reseau-canope.fr/download/web-videos/e96d8847-4b3b-4201-8cbd-a1a7258bb7f0-480.mp4
So if there isn't a better url to use, I would like this one to stay valid even after the replacement of the video, and the automatic trigger of the new web-video transcodings.

I hope I'm clear :-)

@Chocobozzz
Copy link
Owner

Chocobozzz commented Oct 21, 2024

Hi,

I also expect in my case that the new web-video transcodings stay reachable behind the same url as the original one

It would break cache invalidation. I suggest to create a dedicated issue to discuss about an endpoint that can redirect to the latest video file URL

@Chocobozzz Chocobozzz changed the title Upload new video file version delete web-video encoding Respect current video resolution when replacing the video file Oct 21, 2024
@Chocobozzz Chocobozzz changed the title Respect current video resolution when replacing the video file Respect current video resolutions when replacing the video file Oct 21, 2024
@EricGuic
Copy link
Contributor Author

Hi Chocobozzz, I must confess that I don't know what "cache invalidation" is, so I don't know what to write in this other dedicated issue.

@Chocobozzz
Copy link
Owner

I must confess that I don't know what "cache invalidation" is, so I don't know what to write in this other dedicated issue.

We change the name of the video file every time we update it (after a new transcoding job for example) so clients don't get the previous file when reverse proxy in front of PeerTube or CDNs caches static files.

I created the issue: #6701

@EricGuic
Copy link
Contributor Author

Thanks you for the explanation, and for creating the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants