-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
add the live stream example #68
Conversation
Thank you :) I really appreciate your help. Tomorrow I will Mavenize it. |
@sarxos glad to help~ |
Hi, I mavenized your example and tested it a little bit - really good job! Feel free to send pull requests if you would like to change anything :) |
@sarxos Thanks ,I will check it out to see how the pom.xml be wrote.I am so glad to help.I will provide some example ,If i come up with some idea:) |
Hi, Just FYI, the Eclipse supports Maven projects by default - you have to choose Import / Other / Existing Maven Project. |
My home PC run eclipse a little slow,so for simplify I just write it as an simple java project. |
hey, first of all thanks sarxos for the project and hepin1989 for the example. I need to know is it possible to use this example but using android phone as the client? how? |
Hi, unfortunately there is no possibility to use Webcam Capture on Android because it requires some of the AWT classes (especially |
For the android side,some class is missing~and please make use of the android API. |
@Rizaldi at android side,you should try ffmpeg for decoding the live stream. |
@sarxos ,in this example ,I transport the image in h264 packet not the original bufferedImage bytes,so I think for him try out this thing ,should just decode the h264 packet into bitmap just as what you just said.and by the way,thanks for you great job of the lib.:P |
@sarxos Actually I plan to use this example at the server side (webcam at the server) and then display its capture on the android device |
@Rizaldi using ffmpeg android jni binding |
@hepin1989, indeed, you are right :) By the way, I'm planning to port Webcam Capture to Android as you suggested in one of the issues, but for now I do not have enough time to do that :( |
@sarxos Hah:I am quite busy too,I am in the capital of China now,the mother company in Beijing,They are planing to make some project for codename MDM,and ask some android deverloper to write the push server...what a big joke~. by the way,Take care |
@hepin1989 Do you mean that the server side of your example doesn't need any modification anymore and I just need to decode the received h.264 packet on android using ffmpeg android into bitmap? |
@Rizaldi yeap,Your are right,and you must notice that,In the example,it's using tcp connection.and you may need to have a look at the codec of the netty pipleline. |
@hepin1989 Ok. I have read your codes and I am still not clear about some things. Why do you add LengthFieldPrepender on the server side and LengthFieldBasedFrameDecoder on the client side as channel handler? Is it to send back the information about how many bytes are sent/received? Pardon me for asking too many questions, it's my first time using xuggler and netty library, still trying to understand how your code examples work. |
@Rizaldi ,for that just for the TLV pattern of message ,which means Type Length Value.Here ,cause the Type of the message is H264 packet ,so just LV.so the L indicates the length of an complete message and the V indicates the bytes. I am not good at English for explain thing,so sorry. |
by the way,It cause the TCP is steam oriented connection. |
Hi,sarxos,this example contains an server and an client,both works fine.Them server side accept the connection and encode the video stream ,then send it inside an frame message,
the client side receive the message from the server side,and then decode it first frame decoder and then the h264 decoder.
I decode the image from the stream.and then display it on the client side window.The client side can open as many as you can ,and the stream will stop when there is no clients,and will start to stream when there at least one client connected ,the h264 encoder is not attach to the netty's channel pipeline for the performance issue .and the frame encoder can move out of the channel pipeline too.
thanks for your great project ,really thanks,feel free to modify it .