How can I streaming a video from an URL using express JS? #1847
Unanswered
BrunoQuaresma
asked this question in
Q&A
Replies: 1 comment
-
app.get("/download/video", async (req, res) => {
const videoUrl = req.query.url
let stream = got.stream(videoUrl)
stream.pipe(res)
res.json({ url: "video.mp4" })
}) This should work in my opinion. OR app.get("/download/video", async (req, res) => {
const videoUrl = req.query.url
await pipeline(
got.stream(videoUrl),
res
);
res.json({ url: "video.mp4" })
}) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I know how to save the video on a file, but I would like to not save the vide and streams its content directly so I have something like:
I read some docs and tutorials, but I still have no idea what to change to stream the video directly.
Thanks in advance for your help.
Beta Was this translation helpful? Give feedback.
All reactions