I always wondered how streaming videos worked. Thanks for the informative tutorial.
@cutesharwan3 жыл бұрын
God bless you(Basant),to help us useful content.
@thahirThavvagunta3 жыл бұрын
Super super super.... 👌👌👌👌👏👏👏👏👏.... Interesting topics which makes anyone to explore spring boot more and more
@titanmtp43683 жыл бұрын
Excellent topic. Please next topic for cdn and saga design patterns sir.
@sadiulhakim78142 ай бұрын
what i was looking for. Thanks man
@mohamedaminnaimi27707 ай бұрын
Thanks for the simple and clear tutorial
@mohamedlarbisoufi65683 жыл бұрын
it's amzing . we want a full tutorial about webflux with a real project to well practice
@zesment3 жыл бұрын
How is the range value used ? You get it from request header in the Controller, but it's never used in the Service
@stanewstanew8 ай бұрын
Looks like everything is done by Resource class and video tag. The requests are handled then underneath by netty. This tutorial is not precise. So streaming is actually implemented in the lower level in netty. Definitely not in webflux controller.
@046_mech_prasadd52 ай бұрын
It will be handled internellay by ResourceHttpMessageWriter....there is a write method in that class which takes the range from request header public Mono write(Publisher
@046_mech_prasadd52 ай бұрын
ResourceHttpMessageWriter handles the request headers, checks for range requests, and writes the response based on the Resource provided. If a range request is present, it uses methods like writeResource and writeSingleRegion to write the appropriate parts of the resource to the HTTP response. ResourceLoader is used to load resources, while ResourceHttpMessageWriter is responsible for writing those resources to the HTTP response. They work together to efficiently serve resources, including handling range requests for streaming content like videos. If you have any more questions or need further clarification, feel free to ask!
@abhijitprusty3 жыл бұрын
Super this is interisting one, we usually see videos around webflux, but this is different...amazing..
@nirmesh443 жыл бұрын
Fantastic and deep knowledge i got from this video. Thanks
@damyandimitrov6112 жыл бұрын
Fantastic explanation. Gives excellent basic knowledge on how to do it. Very good! Thank you for the lesson. I thought that it is much more difficult, but you made it so easy for us. Thank you, again!
@Javatechie2 жыл бұрын
Thanks buddy 😊
@oladimejijames95543 жыл бұрын
wow, thanks for this... now I understand video streaming after watching this.
@thineshn13213 жыл бұрын
Excellent ..! Awesome Content! Keep rocking ..!
@tech_talk053 жыл бұрын
Wow....Excellent Explanation...what a beautiful content...👏👏👏👏 Really Enjoyed it....it's so helpful n informative....through this channel you are continuously spreading your knowledge to everyone n helping us to grow...thanks a lot for your endless effort and dedication ....such a reliable and authentic channel for java.. .
@Javatechie3 жыл бұрын
Thanks Subhra 😊
@sreejithar4503 жыл бұрын
Another awesome content. Thank you so much. In fact your channel had became my scrum team's reference bank
@Javatechie3 жыл бұрын
Waooo thanks buddy. Good to hear this
@vi.v.tsvetkoff2 жыл бұрын
Why does the range header in logs have just start byte without end byte? At 14:35, for example, "bytes=7602176-", "bytes=7733248-", etc? Does the application send data from start byte to the end of file? Simply, if the first request "bytes=0-" will download the whole video?
@tiejeevan3 жыл бұрын
Man you are java God. Thank you
@emvoinamdinh3 жыл бұрын
Thanks so much Bro! i want to learn more from you !!!!
@raghavendraboddupalli11813 жыл бұрын
Excellent content Basanth..
@Talaria.School3 жыл бұрын
Thanks techie. It's time to go into gradle Kotlin coroutines and spring boot the perfect mix.
@japanesetranslation43153 жыл бұрын
Wow! nice video. Thank you.
@pritabratamallik53913 жыл бұрын
Sir now that the demo is done. Could you please, show us how to fetch the video from a DB or a media server and then stream it?
@anuragduttachowdhury94403 жыл бұрын
For that you can use your own REST API based File Server. That can be another SpringBoot Application.
@letscode80182 жыл бұрын
public Mono getVideoFromResource(long blobId){ VideoBlobFile videoBlobObj=videoBlobFileRepository.getReferenceById(blobId); String path=videoPath; if(OS.contains("win")){ path=videoPath; } String videoFileName=videoBlobObj.getVFile(); String videoFullPath=path+videoFileName; log.debug("filepath {}",videoFullPath); Resource res= new FileSystemResource(videoFullPath); return Mono.fromSupplier(()->res); } for file server you can use above code and for DB public Mono getVideo(long blobId){ VideoBlobFile videoBlobObj=videoBlobFileRepository.getReferenceById(blobId); byte[] videoBlob=videoBlobObj.getVBlob(); ByteArrayResource byteArrayResource=new ByteArrayResource(videoBlob); return Mono.fromSupplier(()->byteArrayResource.getByteArray()); }
@karansingh-eu5mg3 ай бұрын
@@anuragduttachowdhury9440 And then we have to use rest Template for that
@jitendrapandey1763 жыл бұрын
Awesome Java techie 👏👏👏👏
@amitkharbade3 жыл бұрын
Thanks for this tutorial🙏
@nagendrad92633 жыл бұрын
Useful video sir ....Thank you 👏🏻👏🏻👏🏻👏🏻
@AshishYadav-se4db3 жыл бұрын
Amazing content sir🔥🙏.
@RahulKumar-qu1if3 жыл бұрын
Very good content ☺️ sir.
@devashish_yt3 жыл бұрын
Great content 👏... thank you
@VivekanandaReddyC3 жыл бұрын
Very good content Basanth. One question, range is printing in the controller but how the stream is moving forward or backward without taking the range...
@Javatechie3 жыл бұрын
It's taking range from request header
@VivekanandaReddyC3 жыл бұрын
@@Javatechie request header is having the range but we're not using it to move forward/backward
@vijayank9233 жыл бұрын
Nice example . Can you please add few more examples , 1. How can we load videos from cloud server (AWS, GCP, Azure) or from Kafka server 2. Please add more size video (1GB) 3. How can we retain watched hours for next same users next time
@niteshapte3 жыл бұрын
3. Client should log such data in DB with necessary data like user id, video id, etc. 2. I think it's not needed as this is streaming and not uploading. 1. Not 100 percent sure but queues maybe. But with WebFlux, queues are not needed as it is non-blocking, so chances data loss is rare to zero. I am also planning to build an OTT. You can contact me on FB Messenger. I am doing some R&D at the moment. Maybe we can help each other.
@vijayank9233 жыл бұрын
@@niteshapte thanks . I’m looking if user paused in middle, next time same user and video how to take user to in same place ( assume maintaining users last watched logs)
@niteshapte3 жыл бұрын
@@vijayank923 I think paused time can be read through video metadata or simply by reading video tag properties using javascript and then details can be saved in DB. Upon reopening, read the details and set the value in video tag in html.
@kambalavijay68003 жыл бұрын
Good content. However, I still have a question. Where is it specified to cal the rest endpoint in order to fetch Mono
@ogabeksaidov19863 жыл бұрын
Great 👍👍👍👍👍
@johncerpa37823 жыл бұрын
Excellent, thank you
@fabricioaraujo76423 жыл бұрын
Wow thanks for your content man :) if could talk more about java streams api.
@Javatechie3 жыл бұрын
Can you please checkout my java 8 playlist all important stream context I already covered there .just check it out
@motolola3 жыл бұрын
Awesome video ...I am wondering how will it download in bits from ... say AWS S3 or any cloud media storage.
@anandsingh10113 жыл бұрын
awesome topic
@RAJU96223 жыл бұрын
Amazing content
@pratishrutipanda64613 жыл бұрын
Nice content 😊
@TimVanMeerbeeck7 ай бұрын
If you are still reading these reactions: If you add Spring Security around your spring video endpoint. (let's say you need a JWT to access the endpoint) Can you still use the default HTML5 video tag with the src? Or how would you adapt the source tag? I am blocked by this at the moment. Anyway thanks for the video!
@zesment3 жыл бұрын
There is an error in the logs : java.io.IOException: An established connection was dropped by software on your host computer (something like that after translation in English) How can I manage this exception ?
@rahul-java-dev3 жыл бұрын
Thank you Sir ❤❤
@juro8049 ай бұрын
Is providing video streaming with WebFlux appropriate? Wouldn't the performance suffer due to the ioWorkerThread being parked during I/O operations?
@simoneric3 жыл бұрын
Awesome Content!
@SanjeevGhosh Жыл бұрын
I would have really appreciated if you had shown where did you mention the 'range' header in the index.html file.
@Javatechie Жыл бұрын
Please check in the script method call
@ridhamsood178411 ай бұрын
instead of storing videos locally can we store it in any cloud like aws s3 and does it same work by getting data in chunks rather then downloading whole video?
@Javatechie11 ай бұрын
Yes absolutely it will work with the same approach
@ridhamsood178411 ай бұрын
can you explain that i am trying to implement but unable to do that
@parthipanmurali44513 жыл бұрын
Nice topic
@topfactland212011 ай бұрын
how does get request to 8080 returning index.html page do you have another controller ?
@Javatechie11 ай бұрын
Source code link share on description please check the code
@tiejeevan3 жыл бұрын
I would appreciate you, if u could do more about this in detail like 1 hr video
@aadiraj61263 жыл бұрын
Good one. But plz start spring, Oauth/jwt, spring boot, Microservices, etc interview qsn ...those are pending from ur side🙏
@Javatechie3 жыл бұрын
Jwt and oauth 2 already I covered please checkout in my channel
@hemoonegi6363 Жыл бұрын
what if i have multiple videos on my single tab? or multiple images?
@AshishRohillax2 жыл бұрын
How is the range value used ? You never called the rest endpoint as well then how it got executed ?
@Javatechie2 жыл бұрын
In javascript I called this range please checkout my source code
@rssaini013 жыл бұрын
What is the use of Range request header?
@Javatechie3 жыл бұрын
Client will send byte range to Server using it
@rssaini013 жыл бұрын
@@Javatechie how?? And if client can send the byte range to server then how server will handle this?
@anisam1232 жыл бұрын
sir you did not use rage to load the video, so how was the video getting loaded using chunks?
@Javatechie2 жыл бұрын
Yes range will pass as part of headers
@thedragoncorpse64032 жыл бұрын
Hello SIr , i have my videos stored in my google cloud firestore , and i have a url for that video , how can i play that video directly in my spring boot application ,with the same functionalitiues that you have shown in the video, plz help
@sleepysquirlz7715 Жыл бұрын
this is a great video, but im trying to do this on an existing project i already have in intellij, and im trying to see if i can just insert this code into my already existing project. Would this work if i did that? because i got this video tutorial working but i can get it to work when i try to slide this code into my existing project?
@asam09973 жыл бұрын
Sir, any idea how to change video quality while Playing just like in KZbin we do?
@Javatechie3 жыл бұрын
Need to check Anmol . will update
@mohammadnayeemetp3 жыл бұрын
Yes saga design patterns sir
@egi-og9ed2 жыл бұрын
Great, i have question how to integrate with reactjs? and is this possible to create live streaming video?
@mohammadsajeed370 Жыл бұрын
but isn't it progressive downloading supported by browser's video tag by default?
@elasingh31513 жыл бұрын
I'm getting "no video with supported format and mime type found". Is this a browser issue? I tried on both Chrome and Firefox.
@Javatechie3 жыл бұрын
Did you specify produces and also make sure that in index.html you specified valid path to your video
@elasingh31513 жыл бұрын
@@Javatechie Thanks. It worked :)
@_ravi_kumar_gupta3 жыл бұрын
Great great video. Can you please make a video on saga design pattern for microservice.
@Javatechie3 жыл бұрын
Yes I will do that
@kameshganeshan28943 жыл бұрын
Also mention why the app runs on netty and not on tomcat. I know the reason but the crowd watching your tech blog would be keen to know.
@ashishsengar872 жыл бұрын
Thanks! Nice video. Can you please tell what changes will be required in this demo to fetch the video from a video streaming link instead of local?
@simplifyvms2152 жыл бұрын
Can i know the request Header that you have used while doing the request
@m3jh3 жыл бұрын
what would be the proper way for big audio files speaking of 500mb - 1gb of like 2-3 hours of audio files mp3 for instance to be streamed from some s3 or something? thanks.
@sandipmane39413 жыл бұрын
Good.. Can we have same kind of thing.. If we have indexed large file on cloud... That I want to stream it... How we. Can approach this one.....
@Javatechie3 жыл бұрын
Get the content from cloud and render it in ui
@sandipmane39413 жыл бұрын
@@Javatechie will this work to down load large image file on cloud.... Down load in chunks only..
@Javatechie3 жыл бұрын
It won't download entire content as I mentioned in video based on byte range it will get connect
@sovrinfo2 жыл бұрын
Big thanks
@loknathkumar23693 жыл бұрын
Sir how can we add tag name filter in s3 bucket like giving specific tag name particular file in s3 must be fetched
@preethamumarani73633 жыл бұрын
tried this example of java 11, it works. just curious, is there any specific reason you used java 8 ?
@Javatechie3 жыл бұрын
No it will work on any version of java . I am more comfortable with jdk 8
@preethamumarani73633 жыл бұрын
@@Javatechie great thank you. Also, just a generic query, why many companies still have java 8 ? any specific benefits or just the migration concerns ?
@Javatechie3 жыл бұрын
@@preethamumarani7363 java 8 release change the world by supporting functional style coding and which is available in free called ooenjdk 8 but 11 is paid .
@zakariadaoudi17293 жыл бұрын
Thanks man A+++
@AVSOFT-fq1qm8 ай бұрын
WHERE U CALLED THI API IN HTML PAGE
@sbshshendkar3 жыл бұрын
Java 8 stream is working like this?
@Javatechie3 жыл бұрын
This is reactive programming
@ning64342 жыл бұрын
Nice video, Do you know how can we play the video if the endpoint is secured by jwt? Thanks in advance
@Javatechie2 жыл бұрын
On top of this api you could add jwt validation
@ning64342 жыл бұрын
@@Javatechie But as we use the video tag in frontend how can we add the Bearer token to it?
@sivapriya39242 жыл бұрын
Is there any possible way to stream video from s3 directly without downloading
@Javatechie2 жыл бұрын
Yes we can do that
@sivapriya39242 жыл бұрын
@@Javatechie Any sample video
@angulardesign74123 жыл бұрын
i am working on e-learning web app but thing is that user should not able to download video from my server how to prevent downloading ? Thanks for your video?
@codedestiny69553 жыл бұрын
Thanks bro, how to do with resolutions bro ??
@exact-itacademy12823 жыл бұрын
how to load videos from C driver ?
@Javatechie3 жыл бұрын
Give the absolute path of your file in index.html
@chiragmatta91713 жыл бұрын
Can you please make tutorial on reactive programing with Kafka and ActiveMQ
@sui2490 Жыл бұрын
why is java 8 used?
@sbshshendkar3 жыл бұрын
waiting for SAGA design patterns with messaging.
@Javatechie3 жыл бұрын
Will start buddy , parallely with kuhernetes
@sbshshendkar3 жыл бұрын
@@Javatechie thank you❤️
@tadurirk3 жыл бұрын
Super
@sreenureddy9943 жыл бұрын
its amazing
@CaptainDriftwood10 ай бұрын
thank you saar
@GameXplorers463 жыл бұрын
Is it not possible without web flux or reactive programming??
@Javatechie3 жыл бұрын
Possible but not asynchronous
@muhammadsabirqadri8659 Жыл бұрын
please some one explain me how to add video inside videos folder. please help me.
@abinthomas129143 жыл бұрын
Awesome
@sneak94072 жыл бұрын
How about the video that gets the video from an actual database? You never released the video anymore.
@sneak94072 жыл бұрын
Also I have a problem with my ranges. I can't seem to skip to a point in the video.
@sripriyanagaraju70193 жыл бұрын
please write the code for live streaming/online streaming/broadcasting
@tadurirk3 жыл бұрын
Start spring webflux series
@tiejeevan3 жыл бұрын
I worked in lot of companies, we are using CNET or other streaming services to get this functionality. I would really appreciate you if you could teach me more sir.