Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6384339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:45:50+00:00 2026-05-25T02:45:50+00:00

How can I send Android camera video using RTP/RTSP and play it in PC(using

  • 0

How can I send Android camera video using RTP/RTSP and play it in PC(using vlc or any other player).

I googled this and found two answers:

1) using mediarecorder (http://sipdroid.org/ using VideoCamera.java)

How to work with it i tried it but no result 🙁

2) using PreviewCallback() – onPreviewFrame(data, camera) method.

by using sipdroid’s (Rtppacket,Rtpsocket,sipdroidsocket) I am able to send Rtp Packets containing each frame as data and I am able to catch it via Wireshark.

But I am not able to play my packets in VLC 🙁

This is my code:

mCamera.setPreviewCallback(new PreviewCallback() { 

        public void  onPreviewFrame(byte[] data, Camera camera) {
            int width= 320;
            int height=240;
            eth=getInterfaces();
            Log.v("Connected to ","Ethernet"+eth);      
            if(eth!=null){
            try{                          
            InetAddress serverAddr = InetAddress.getByName("IP Address of My PC");               
            Log.v("trying to ","connect with"+serverAddr);                
            SipdroidSocket soc = new SipdroidSocket(9954);
            Log.v("trying to ","connect with Sipdroid Socket");                
            soc.connect(serverAddr, 9954);                               
            Log.v("Socket ","Connected");                               
            RtpPacket rtpp=new RtpPacket(data,height);               
            //rtpp.setPayloadType(125);                
            Log.v("RTPPacket","Created");                
            RtpSocket rtps= new RtpSocket(soc,serverAddr,9954);                    
            Log.v("RTPSocket","Created");                            
            rtps.send(rtpp);                
            Log.v("Packet","Sent");              

            }

            catch(Exception e){e.printStackTrace();Log.v(TAG, "Socket");}
            }
        }  
});

How can I play the packets? Please give some suggestions!!!

I am totally confused:( I am new to android development!! need help from experts!!!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T02:45:51+00:00Added an answer on May 25, 2026 at 2:45 am

    I think you might need to decode the stream via decodeYUV420SP since the byte[] data is in YUV format.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a program that can send text to any other program for further
I am developing an android application that can send email. This following code lets
I can send any windows application key strokes with PostMessage api. But I can't
how i can send sms from asp.net?any idea about it?or any resource through which
Is there any way I can send an email, like any frameworks or something.
How to send HTML content in email using Python? I can send simple texts.
In HTML, you can send data from one page to another using a GET
I would like to capture an image from the camera on Android, and send
According to http://learnandroid.blogspot.com/2008/01/run-android-application-from-command.html , you can send extra info to an android app with
I have a question this time around regarding the Android custom camera, NOT the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.