Back

[SOLVED] streaming media

  • 1
  • Web
  • Storage
  • Realtime
Mr.ppDulce
1 Aug, 2023, 23:08

Hello I’ve currently been able successfully store some audio and video recordings in appwrite storage is there anyway for me to stream the content afterwards?

TL;DR
The user was initially confused about video and audio formats. They were able to view the content fine from a web URL, but when recording and specifying the MIME type as "video/webm;codecs=vp8 opus," it stored it as "video/x-matroska" instead of "webm." This caused a weird error. The user was trying to stream the content by putting the URL in a video element, but was unsure of the typical streaming process outside of Appwrite. The solution was to use the Appwrite web SDK to get the URL of the file and then render it in an HTML element. The App
Drake
1 Aug, 2023, 23:14

Appwrite supports the range headers so you should be able to stream the content...how do you trypically do it?

Mr.ppDulce
1 Aug, 2023, 23:19

Do I not just call getFileView with the appropriate Parameters from the client sdk?

Drake
1 Aug, 2023, 23:20

with the web sdk, that function gives you the URL to the file. Then, you can put that into an HTML element to render it, just like an image

Drake
1 Aug, 2023, 23:20

again, how do you typically stream video and audio?

Mr.ppDulce
1 Aug, 2023, 23:23

I guess I’m confused by that question, is it not the same process?

Drake
1 Aug, 2023, 23:23

would you please explain to me what your process is typically outside of appwrite?

Mr.ppDulce
1 Aug, 2023, 23:34

Currently all I am doing is putting the url I get from function I listed above in to a video element and expecting it to stream.

Drake
1 Aug, 2023, 23:38

right. so what's not working?

Mr.ppDulce
2 Aug, 2023, 00:12

My file type was being set as video/x-matroska and not webm giving me a weird error

Mr.ppDulce
2 Aug, 2023, 00:12

Thank you for your assistance

Drake
2 Aug, 2023, 00:14

so after uploading, the file type is video/x-matroska? or when viewing?

Mr.ppDulce
2 Aug, 2023, 00:15

When uploading I was recording a webrtc stream and then uploading it and I guess in the process it did that due to me being on a Mac

Mr.ppDulce
2 Aug, 2023, 00:17

Not really sure why however when I record and specify the mine type as video/webm;codecs=vp8 opus it works fine and stores it as a webm

Mr.ppDulce
2 Aug, 2023, 00:17

Than I’m able to view it fine from the web url

Drake
2 Aug, 2023, 00:18

video and audio formats can be tricky. i always get confused between container types and codec types etc. etc.

Is there anything else you need?

Mr.ppDulce
2 Aug, 2023, 00:51

No sir thank you

Drake
2 Aug, 2023, 00:54

[SOLVED] streaming media

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more