-
Notifications
You must be signed in to change notification settings - Fork 10
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
hey i was writing something similar to ur code. How does ur code pushes packets to ffmpeg? #1
Comments
Hi. Yes, it does work. However, it does a VP8 -> H264 conversion which is quite CPU intensive and can be avoided; you're bound to run into problems with it eventually. You can instead require H264 video input and send that to This thread pion/example-webrtc-applications#62 should be useful. |
hi, actually my full project description and repo is at https://github.com/mohit810/streamingcdn . My main goal is "To receive the broadcast, Convert it into hls in various quality then push those to cdn to serve to the User." . I was understanding ffmpeg's documentation for basic understanding. The main thing for me is to understand how does the rtp packets will reach to ffmpeg function, because when i am adding the push opus/vp8 & ffmpeg code mine |
Also, since you're using hls, you should be able to send H264 directly to the HLS stream without doing the VP8 conversion. Depends on your use case. |
The problem is that in my code the videoKeyframe := (sample.Data[0]&0x1 == 0) and videoKeyframe is false and the code never reaches to the ffmpeg function call. I will add a dev branch to update the code with daily progress. |
Okay. Meanwhile, I just updated the repo following the style in this example. With the initial code, I also noticed that |
I have created the dev branch(https://github.com/mohit810/streamingcdn/tree/dev-branch) and have refactored the code similar to ur code. Please check it out when u have the time as after refactoring it, I am able to initiate ffmpeg. Thanks!! If u wanna work on the same , do let me know. |
I'm glad you were able to get it to work. Were you able to convert the stream to HLS? Sorry I haven't yet been able to add a readme :( would do that soon. |
Yeah I am able to convert the packets to HLS, it's working and there are some issues (there are some stream speed, quality,.. issues ), solving these issue. |
Okay great. How are you going about solving the stream quality issues? |
Currently, I am reading and understanding different examples and solution to resolve that. |
Okay. |
@grantfayvor hi, you are using ffmpeg some code like this, exec.Command("ffmpeg", ...). A ffmpeg process running, I want to know when the process will stop? So I want the ffmpeg process stop automatically when my video broadcast stop, can you give me some pointer, thanks! |
get it, may be I can use exec.CommandContext with cancel! |
Yes @lichao201626 you can use the commandcontext and cancel when done. |
Hey @grantfayvor i have given u access in the repository and @lichao201626 if u wanna join and contribute also, do let me know. |
Sure, meanwhile I updated the ffmpeg call to use exec.CommandContext just like @lichao201626 suggested, so that it can be cancelled. |
Yeah that feature is surely handy.. |
@grantfayvor i have put together the following code which runs smoothly on terminal the same code for golang is: the problem right now is the terminal version creates playlist as well as master playlist but golang version doesn' t create those. I am looking for the solution for this but if u find something that i missed, do let me know |
hi @mohit810 sadly, i do not know so much about ffmpeg commands. |
hey @grantfayvor i am still getting: |
hey @grantfayvor can u clone https://github.com/mohit810/streamingcdn and run it and let me know if hls conversion is working or not because its working on other setups other than mine. just want to confirm.. post successful run there should me 5 .m3u8 extension files as well as various .ts extension file |
@mohit810 That will be pretty cool if I can join and contribute, though I don't have much time |
@grantfayvor I have released the v3.1 in which, the code is converting webrtc -> HLS . I saw that you are setting up dynamic ports code(that's really awesome).. Once yours is complete , I will also integrate that one as well. Till then i will make my code more modular and add master playlist... |
Hi @mohit810 Yeah I added some code to the dynamic-udp-ports branch. It currently picks a random unassigned port in range of 1000 possible ports. It works but I've wondered if there's a better way to go about it. If you have a better suggestion I'm open to it. |
@grantfayvor I don't know anything about that. Even if I try to understand the basic workings on things, it would take time and right now I am working on the final steps before cdn integration of the webrtc - > HLS. Will let you know if I get free, because post complete ffmpeg integration with cdn i have to build the ui on android, ios, web. Try pion slack. There are many people in slack with experience in using pion. |
No description provided.
The text was updated successfully, but these errors were encountered: