Hi Great Content. Can you please share the github repo or the source code also because that will be very helpful especially in the html,js and css context. Thanks
I dont think webRTC allows the server to interfere between the connection, i am not completely sure, but i dont think if its going to be possible to run the ML in the server-side. For example, As much as i know, Google meet also uses WebRTC and for ML, it runs those on cloud , not exactly on the server-side... And for many other applications like Discord, they run it in the client-side. So i think the best idea would be to keep a light-weight ML model and make it run in the client-side, ofcourse you would have much more limited resources... But probably that's the best thing if you're working on a personal project....or dont want to invest much. I also thought of the same thing, did some research and learned a lot of new stuff... I hope i was helpful:)
Woow really good job 🙂 Thank you so much Do you already have the second part of this video chat? to share screen or other stuff? thank you so much again
I hv'e done everything perfect and no errors..but i couldn't open the localhost as two peers in chrome..i duplicated the tab and opened it ..but it was not working☹️..can someone help me out..!🙃
@@TauhidCodes asusally,it was just showing connection opened when i console and in terminal also there is no error found.the problem is it was opening as individual peer..two persons were unalbe to connect even after clicking join room.
Thanks a lot for this nice tuto. Is it possible to make a recording of the video chats on the server ? Is it possible to force the communications to keep going through the server and not to connect directly P2P browser to browser ? Best regards
I believe WebSocket can stream audio/video itself but it is probably a little more complicated to implement (haven't tried it). If you implement another architecture like SFU or MCU by using WebRTC on the server then you can stream audio/video through the server as well.
Hey, thanks for the tutorial. I'm having an error that says KeyError: 'receiver_channel_name'. I have tried to debug on my own but I cannot seem to find the root of the problem. Please would you happen to have an idea on what might be causing this error. The console says Connection Opened and then Connection Closed as soon as I put in a username. Thank you.
Thanks for watching. As mentioned in the video, it will only work when the devices are in the same network. Otherwise, you will need STUN/TURN servers which you can either pay for or configure your own. Once you have access to STUN/TURN servers, you can put their credentials in a Javascript object and pass it as the argument to the RTCPeerConnection constructor. No other changes are likely to be required in the code. If I can find a way to configure my own STUN/TURN server, then I will try to make a video on it. But I hope that somebody does that before I do.
Its helped me very much Thanks to you but I am getting a problem the track of newly joined client is not being received by the user joined before that user Can you help me in that
There might be some mistakes in adding tracks of the answerer or setting remote tracks in the offerer. Could you share your code in a code sharing platform so that I can take a closer look?
@@TauhidCodes it seems the function to get the media from user is running after the whole code such that the connection is established first and empty media stream is being sent Can you tell me the solution from here if not where should I share the code with you
@@drac8854 django-channels supports protocols such as WebSocket, MQTT, etc. I don't know about flask-websocket but if you're trying to adapt it in flask then you need to write code that accepts WebSocket connections in your Flask server just as django-channels was used in the video.
Start with a page with an input field for room name and one for username. Whenever somebody enters with a username and room name, go to the chat page where the room name is appended as a keyword argument to your url route. Asign the room name to room_group_name in your AsyncWebsocketConsumer connect function using self.scope['url_route']['kwargs']['room_name'] if room_name is the keyword that you specified in your routing.py. Now, anybody who joins with the same room name will be in the same room and isolated from all other rooms.
Good work but it shows an error that "Cannot import ASGI_APPLICATION module %r" % path", i dont know how to deal with it because i tried so many times by following the documentation and it failed, any help?
You should probably define the sendSignal function first as shown in the video. If you have already done so before experiencing this error, clear your cache and cookies and test it again. Your browser may store the main.js file as cache and may not reflect the changes that you make later. I will put the repository link in the description once it is pushed.
Hi sir, can you help me, i have an error; when answering Uncaught (in promise) DOMException: Failed to execute 'setRemoteDescription' on 'RTCPeerConnection': Failed to set remote answer sdp: Called in wrong state: stable
You can deploy it on Heroku but you need to know how to deploy projects that use ASGI. PythonAnywhere does not support ASGI yet so you cannot deploy it there.
@@TauhidCodes yes, I have routing.py under chat app and i've included chat app in installed app still getting the same erroe would you please me with this?
CHANNEL_LAYERS = { "default": { "BACKEND": "channels.layers.InMemoryChannelLayer" } } use this in settings.py and if error is still there then try pasting this CHANNEL_LAYERS = { "default": { "BACKEND": "channels_redis.core.RedisChannelLayer", "CONFIG": { "hosts": [("127.0.0.1", 6379)], }, }, }
why showing this error "Uncaught (in promise) DOMException: Failed to execute 'setRemoteDescription' on 'RTCPeerConnection': Failed to set remote answer sdp: Called in wrong state: stable" can you help me?
@@andrewlau9691 if you want to deploy then the first thing you need to do is change your channel layer to redis instead of the in-memory channel layer that we used in the tutorial. You can configure redis in your Linux server and then specify the host name and port in your channel layer in settings.py. There probably won't be any more changes in the code. You can search how to deploy a django channels app. There are some good tutorials on that.
@@TauhidCodes Thanks for your help. I have already try the official channels demo in server . However, I can only do text chat on localhost. Once I deploy it in server, it doesn't work still. So could you show your settings.py to me? Or you would like other way to chat privately but not in utube? Thanks
You can have another text input besides the one for username so that users can enter the room name that they want to join. Then send that to your consumer so that the room name is assigned to self.room_group_name in the connect method. All users who connect to the consumer with the same room name will then be connected together.
Yes, brother. You can generate and store the room name, using the room name as the self.room_group_name attribute in your consumer connect method. Whenever somebody tries to join the room, you can check if they are authorized and allow them by adding their channel name to the group.
Thanks a lot for this tutorial! But I am facing few errors while implementing this.. Ex. DOMException: Failed to set remote answer sdp. Called in wrong state. And..I have infinite childnodes(video elements) getting appended during the video call..but I am not able to resolve it.Need help in resolving this issue :(
Perhaps it is continuously creating (hence, infinite videos) and sending an answer due to an error in handling the answerer logic. Could you share the link to your code from a repository sharing website? It is very difficult to understand code in the comments.
@@TauhidCodes No No...I meant to add you as a collaborator on GitHub instead of viewing so that changes can be made regarding the areas of error in my codes. Added you as collaborator.
@@satvikakoti1065 alright. I'll do what I can. I checked your code and couldn't find any errors. You can try clearing your history and cache of the past 7 days and then test it again. Sometimes your browser stores the main.js file in the cache so your changes aren't reflected.
@@yashodanaik3920 I later downloaded his github repo to understand the error, I just replaced few lines of code, Don't know where exactly the error persisted.
@@abnaparveen8556 Maybe the connections are not being established properly. Can you put the code in a code sharing platform and share the link so that I can have a look?
@@hafiznihal8277 I cannot understand the folder structure in the repository. Are you sure that it is correct? If you are trying to use Django channels like in this tutorial then many essential files are missing (asgi.py, settings.py). In that case, I would suggest that you redo the project from the beginning and do not skip any step. Also, I see that the template is still referred to as 'chat/main.html' in main_view in views.py even though there is no chat app/directory in your repository.
Thanks for the Tutorial!! TypeError: Group name must be a valid unicode string containing only ASCII alphanumerics, hyphens, or periods. WebSocket DISCONNECT / [127.0.0.1:58783] getting error for this line "webSocket = new WebSocket(endPoint);" can you help me out with this error
Asslamu Alikom Akhi), Hope that you are dong well, firstly let me please thank for you effort), after i hope that you may accept my request in the future videos make it small and partitioned as possible it will be easier to understand and to produce as well and please please please my dear brother in islam don't copy and past the code it is not good pattern in coding instead use function and call it as much as you want
hi bro, i have some problem, what is written in this place NUMB_TURN_CREDENTIAL = config('NUMB_TURN_CREDENTIAL', default=None) NUMB_TURN_USERNAME = config('NUMB_TURN_USERNAME', default=None)
you are the best, you saved my life, I had a thesis and I could not solve these problems in any way,but your video saved me!!!
Great tutorial! Keep up the good work. Hoping to see more like this. All the best
Thank you, Sir. It is an honour. By the mercy of the Creator, I learned from the best. Wish you all the best, Sir.
At min 48:20 when I write new webSocket it shows an error that webSocket is not a constructor. Can someone tell me how to get rid of that problem?
Thankuuuu soooo much for this video really helpful for this my internship project
Glad to know that it was helpful.
Please can u help me
hi bro i need code for this..
Hello bro ... Can you share your js code?
this is the thing that I needed so much
Hi Great Content. Can you please share the github repo or the source code also because that will be very helpful especially in the html,js and css context. Thanks
Awesome vid, keep going brother!!
bro at 53:50 for you getting Connection Opened! but for it's getting Connection Closed! i tried to it coudn't wt is solution for that?????
Hi, does it still work till now??. I mean is there no changes after 3 years?
I wish you shared a github repo.
Thank You so much brother, you are just spectacular.
This helped me, thanks a lot!
Great Job...are you planning for new video on share screen functionality.
Great work sir, how can I get the source code
Thanks A Lot for the video sir.. It's very helpful....
love from bhopal brother
I learned a lot from you. Where can I get the full code? thank U 🥰
Can we use this approach for get the frames from client then process some ML model at server side and revert back the frames to the client?
I dont think webRTC allows the server to interfere between the connection, i am not completely sure, but i dont think if its going to be possible to run the ML in the server-side.
For example, As much as i know, Google meet also uses WebRTC and for ML, it runs those on cloud , not exactly on the server-side... And for many other applications like Discord, they run it in the client-side.
So i think the best idea would be to keep a light-weight ML model and make it run in the client-side, ofcourse you would have much more limited resources... But probably that's the best thing if you're working on a personal project....or dont want to invest much.
I also thought of the same thing, did some research and learned a lot of new stuff... I hope i was helpful:)
Moreover, i think running it in the client side would have very less latency...
I Loved This Video, It Helped Me A Lot
Woow really good job 🙂 Thank you so much
Do you already have the second part of this video chat? to share screen or other stuff? thank you so much again
Thank You so much.. It really helped me a lot!!
Thank you, this tutorial is very helpful.
I hv'e done everything perfect and no errors..but i couldn't open the localhost as two peers in chrome..i duplicated the tab and opened it ..but it was not working☹️..can someone help me out..!🙃
Same here!!!!
What do your browser console and your terminal show?
@@TauhidCodes asusally,it was just showing connection opened when i console and in terminal also there is no error found.the problem is it was opening as individual peer..two persons were unalbe to connect even after clicking join room.
@@TauhidCodes [WinError 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted.
@@srimahalakshmiadivishnu6415 Could you share your code in a code sharing platform so I may have a better look?
how u are accessing the camera, what's the source? is the rtsp can be access.
Hi , i modified your code to make more rooms . It works locally well but after deployment devices only connect if they are on same wifi network.
can you share gitrepo
Hello, that was a nice project of yours, works good, but I have a question. How do I adapt this code to MCU approach ?
Great! Thank you for your sharing...
This code support for webcam, how about video from camera IP support rtsp method
Thanks a lot for this nice tuto.
Is it possible to make a recording of the video chats on the server ?
Is it possible to force the communications to keep going through the server and not to connect directly P2P browser to browser ?
Best regards
I believe WebSocket can stream audio/video itself but it is probably a little more complicated to implement (haven't tried it).
If you implement another architecture like SFU or MCU by using WebRTC on the server then you can stream audio/video through the server as well.
you are a good person. I like you
please share a github repository that has source code of this project, thank u alot
Thank you for your sharing.
and I want to learn making multiple rooms and screen sharing!
please make video Thank you!!
Hey, thanks for the tutorial. I'm having an error that says KeyError: 'receiver_channel_name'. I have tried to debug on my own but I cannot seem to find the root of the problem. Please would you happen to have an idea on what might be causing this error. The console says Connection Opened and then Connection Closed as soon as I put in a username. Thank you.
please make video on one to one video calling and voice calling using django channels
Sure. I'll looking into that. But it cannot be built using only django-channels. The video/voice calling part needs some other technology like WebRTC.
@@TauhidCodes bro making full project on that
Hi, this video was awesome. Is there a way where I can make this to connect to people on another network or can make a video about it?
Thanks for watching.
As mentioned in the video, it will only work when the devices are in the same network. Otherwise, you will need STUN/TURN servers which you can either pay for or configure your own. Once you have access to STUN/TURN servers, you can put their credentials in a Javascript object and pass it as the argument to the RTCPeerConnection constructor. No other changes are likely to be required in the code.
If I can find a way to configure my own STUN/TURN server, then I will try to make a video on it. But I hope that somebody does that before I do.
@@TauhidCodes thanks
Its helped me very much
Thanks to you
but I am getting a problem
the track of newly joined client is not being received by the user joined before that user
Can you help me in that
There might be some mistakes in adding tracks of the answerer or setting remote tracks in the offerer.
Could you share your code in a code sharing platform so that I can take a closer look?
@@TauhidCodes it seems the function to get the media from user is running after the whole code such that the connection is established first and empty media stream is being sent
Can you tell me the solution from here
if not where should I share the code with you
@@TauhidCodes I just found the solution
anyway thanks for the reply I just subscribed and keep uploading such amazing videos
Best wishes for you bro
@@kshitizbhurtel9137 Glad that you found it helpful. Thanks a lot, brother.
hii bro,i am also facing same problem ,can you please tell me how you solved it??
Thanks for making this video.
Thank you for watching.
thanks my bro
it works at localhost, but when it been deployed as it is on a real public server, users can't see nor chat each others
How to make video conferencing which allows to join more than 2 people??
Thanks for making this
I'll try to adapt this in flask
Awesome. That would be a new kind of implementation which could benefit somebody who's searching for something similar.
Hi
Could you talk more about django channel
Like what it is
And what does it do
It seems that django channel is a websocket library for django
So i guess flask-websocket is similar to django-channels (removing the async part)
@@drac8854 django-channels supports protocols such as WebSocket, MQTT, etc.
I don't know about flask-websocket but if you're trying to adapt it in flask then you need to write code that accepts WebSocket connections in your Flask server just as django-channels was used in the video.
Hi, did you use react here?
Thank you very much. I'm making file streams for images, videos, and audio.
very good!
production level code will need what else?
got a few other questions.
Daphne as ASGI server, ssl certification, Redis for Channel Layer and STUN/TURN servers for p2p connections.
@@TauhidCodes Thanks .. found your github repo. would be good to connect
@@rameshrao3792 sure. That would be great.
@@rameshrao3792 Hi.. Can you share the git repo plz
I am getting an error of this: Failed to load resource: the server responded with a status of 404 (Not Found) any 1 CAN HELPPP!!!
I am getting same error
Can you help pls ?
Helpful !! Thank you !
Thanks for the support, Sandhi.
Please post screen sharing tutorial... I am waiting for learn...
Great work 👍
Thanks for the support, man.
thanks soo much for this
Where is the final full source code !
Great tutorial
Glad that it was helpful. Thank you for watching.
Bro ,it's showing
Uncaught TypeError : btnjoin is null
What to do
Did u solve that??
Ya solved it
The btnJoin in both .js and .HTML files should be same
Hii bro actually in my code auto play is not working I mean video tab is not showing and i have followed your code only can you tell me please 🙏🙏
Hey is it possible to create a chat room where one's streams get shared only after starting a call and not right away?
Start with a page with an input field for room name and one for username. Whenever somebody enters with a username and room name, go to the chat page where the room name is appended as a keyword argument to your url route. Asign the room name to room_group_name in your AsyncWebsocketConsumer connect function using self.scope['url_route']['kwargs']['room_name'] if room_name is the keyword that you specified in your routing.py.
Now, anybody who joins with the same room name will be in the same room and isolated from all other rooms.
Good work but it shows an error that "Cannot import ASGI_APPLICATION module %r" % path", i dont know how to deal with it because i tried so many times by following the documentation and it failed, any help?
i am waiting for second tutorial screen sharing
i have an error : receiver_channel_name not found
how are you acessing webcam on http? mediaDevices.getUserMedia is supposed to work at https right?
It only works when you're on localhost. If you try to access it from another device, you'll get an error. So you'll have to use https:
Is it possible sfu architecture in Django
Thank you bro.
Can you please share the code, there are some errors coming.
eg: sendSignal is not defined at WebSocket , sendSignal('new-peer',{});
You should probably define the sendSignal function first as shown in the video.
If you have already done so before experiencing this error, clear your cache and cookies and test it again. Your browser may store the main.js file as cache and may not reflect the changes that you make later.
I will put the repository link in the description once it is pushed.
@@TauhidCodes In case you have repo link, please paste it. It would be really helpful.
I am getting the error cannot read property send of undefined websocket
Could you share your code from a code sharing platform? It is possible that your websocket variable is null.
Hi sir, can you help me, i have an error; when answering
Uncaught (in promise) DOMException: Failed to execute 'setRemoteDescription' on 'RTCPeerConnection': Failed to set remote answer sdp: Called in wrong state: stable
The issue might be in the answerer logic. Could you share your code in a code sharing platform and post the link?
how to solve the error
raise ImproperlyConfigured("Cannot import ASGI_APPLICATION module %r" % path)
django.core.exceptions.ImproperlyConfigured: Cannot import ASGI_APPLICATION module 'video.asgi'
can I host this project on herouko or pythonanywhere? will I be able to do it?
You can deploy it on Heroku but you need to know how to deploy projects that use ASGI. PythonAnywhere does not support ASGI yet so you cannot deploy it there.
I m getting error while writing chat.routing as no module name found?
Help me with this?
@@gopilayarao6701 Do you have a routing.py module under the chat app? Have you included the chat app in your installed apps?
@@TauhidCodes got it
@@TauhidCodes yes, I have routing.py under chat app and i've included chat app in installed app still getting the same erroe would you please me with this?
Sir, how to find our http link in this program...
how can I add sounds as subtitles, please can you help
You need to apply some ML, either in the cloud or in the client-side, not sure if its gonna run in the server-side.
the console doesnt show "connection opened" but shows error occurred if any.
CHANNEL_LAYERS = {
"default": {
"BACKEND": "channels.layers.InMemoryChannelLayer"
}
}
use this in settings.py and if error is still there then try pasting this
CHANNEL_LAYERS = {
"default": {
"BACKEND": "channels_redis.core.RedisChannelLayer",
"CONFIG": {
"hosts": [("127.0.0.1", 6379)],
},
},
}
@@tanmaysurendra5379 Thank you for cooperating. Redis channel layer will only work if Redis is configured.
Does it show anything in your browser console and terminal?
why showing this error "Uncaught (in promise) DOMException: Failed to execute 'setRemoteDescription' on 'RTCPeerConnection': Failed to set remote answer sdp: Called in wrong state: stable" can you help me?
Very good
Thanks for the support, Nily.
Great Job! This is WHAT I searching for! And can you share the code ? Thanks.
Glad to know that it helped. I will put the Github link in the description after I push it. But I can't find the time to do it.
@@TauhidCodes Looking forwrad to your code! Hope that you can find some time to put your code hh.
And by the way ,I would like to know can your code run directly on a linux cloud server? But not localhost? Thanks
@@andrewlau9691 if you want to deploy then the first thing you need to do is change your channel layer to redis instead of the in-memory channel layer that we used in the tutorial. You can configure redis in your Linux server and then specify the host name and port in your channel layer in settings.py. There probably won't be any more changes in the code.
You can search how to deploy a django channels app. There are some good tutorials on that.
@@TauhidCodes Thanks for your help. I have already try the official channels demo in server . However, I can only do text chat on localhost. Once I deploy it in server, it doesn't work still. So could you show your settings.py to me? Or you would like other way to chat privately but not in utube? Thanks
Good Job.
Thanks for the support, Shatabdy.
pls can you share the repo link of this code?
I haven't pushed the code yet. I will put it in the description when I do.
Code plz
How can I arrange different room for different conference?
You can have another text input besides the one for username so that users can enter the room name that they want to join. Then send that to your consumer so that the room name is assigned to self.room_group_name in the connect method. All users who connect to the consumer with the same room name will then be connected together.
is there any way to create multiple room and join multiple people?
Yes, brother. You can generate and store the room name, using the room name as the self.room_group_name attribute in your consumer connect method. Whenever somebody tries to join the room, you can check if they are authorized and allow them by adding their channel name to the group.
@@TauhidCodes unable to configure the stun server..can u help me .
@@Manassahoolipu I have not yet configured a STUN/TURN server. I believe that there are numerous guides that you can find. Best wishes.
@@TauhidCodes thanks for ur support
Can you share the js code for this please...
Sir muje e project set-up kariye na..iska me charges jo hai vo dunga please reply me
i have a doubt. how do i reach u? contact?
Thanks a lot for this tutorial!
But I am facing few errors while implementing this..
Ex. DOMException: Failed to set remote answer sdp. Called in wrong state.
And..I have infinite childnodes(video elements) getting appended during the video call..but I am not able to resolve it.Need help in resolving this issue :(
Perhaps it is continuously creating (hence, infinite videos) and sending an answer due to an error in handling the answerer logic.
Could you share the link to your code from a repository sharing website? It is very difficult to understand code in the comments.
@@satvikakoti1065 Do you mean Google colab? I haven't used it that much. Github: Tauhid-UAP
@@TauhidCodes No No...I meant to add you as a collaborator on GitHub instead of viewing so that changes can be made regarding the areas of error in my codes. Added you as collaborator.
I got the same issue broo
@@satvikakoti1065 alright. I'll do what I can. I checked your code and couldn't find any errors. You can try clearing your history and cache of the past 7 days and then test it again. Sometimes your browser stores the main.js file in the cache so your changes aren't reflected.
Sir, Is the program code is available?
Love it!
Glad to hear that. Thank you.
Can you show us how to deploy it?
Sir, My connection gets closed as soon as its opened, What may be the issue?
same with me , how to fix it?
@@yashodanaik3920 I later downloaded his github repo to understand the error, I just replaced few lines of code, Don't know where exactly the error persisted.
@@sanjayrao2147 is it solved now?
@@yashodanaik3920 Yes, The project works well without error
hey can you share the code please? something is not working, I don't have any errors but..
I haven't pushed the code yet. I will share it when I do. Thank you for watching.
Awesome, Can I have the source code?
code ...
Can you please give me the source code? I tried to follow you but maybe somewhere I did a mistake.
I will put it in the description after I push it.
I tried..Some error occured...not able to see vedeos and messages in one tab...Please can you share the code
What error does it show in your javascript and your console? I haven't been able to push the code yet.
@TauhidCodes user B tab vedeo is not showing on user A tab... and A is not in B
@@abnaparveen8556 Maybe the connections are not being established properly. Can you put the code in a code sharing platform and share the link so that I can have a look?
@@TauhidCodes github.com/abnaparveen/vedeo.git
@@hafiznihal8277 I cannot understand the folder structure in the repository. Are you sure that it is correct? If you are trying to use Django channels like in this tutorial then many essential files are missing (asgi.py, settings.py). In that case, I would suggest that you redo the project from the beginning and do not skip any step.
Also, I see that the template is still referred to as 'chat/main.html' in main_view in views.py even though there is no chat app/directory in your repository.
bro please share the code
can i get code
sir, could you please provide source code..
help ful
Thanks for the Tutorial!!
TypeError: Group name must be a valid unicode string containing only ASCII alphanumerics, hyphens, or periods.
WebSocket DISCONNECT / [127.0.0.1:58783]
getting error for this line "webSocket = new WebSocket(endPoint);"
can you help me out with this error
@TauhidCodes can you help me out with this error
Add encoding at the head of the code files
@@Genialbonehead you mean in the main.js file??
@@117tarun2 use explicit encoding ewerywhere. I mean in .py files and .html, but you can add in main.js too. Add explicit and save as desired encoding
hay bro please give us github ripo link . thanks in advance
I haven't pushed the code yet. I will share it when I do. Thank you for watching.
Please make video on screen share.
I plan on doing it but it might take a while. Thank you for watching.
Dada, Can you pleeeeeease provide the source code or GitHub repo. Khub upokar hoi :(
Dada, akhono code ta push korar shomoy pai ni. Korle description a diye dibo.
Can you share the source code.
I cannot find the time to push it. I will put it in the description when I do.
Is the source code available?
I will put it in the description after I push it.
Asslamu Alikom Akhi), Hope that you are dong well, firstly let me please thank for you effort), after i hope that you may accept my request in the future videos make it small and partitioned as possible it will be easier to understand and to produce as well
and please please please my dear brother in islam don't copy and past the code it is not good pattern in coding instead use function and call it as much as you want
hi bro, i have some problem,
what is written in this place
NUMB_TURN_CREDENTIAL = config('NUMB_TURN_CREDENTIAL', default=None)
NUMB_TURN_USERNAME = config('NUMB_TURN_USERNAME', default=None)