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

  • SEARCH
  • Home
  • 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 9267873
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T14:39:41+00:00 2026-06-18T14:39:41+00:00

I need to stream from an android camera/ file to a remote ffserver which

  • 0

I need to stream from an android camera/ file to a remote ffserver which will broadcast my video. I can do this on the desktop in ubuntu by issuing a command like:

ffmpeg -f video4linux2 -s 640x480 -r 25 -i /dev/video0 http://192.168.0.20:8090/cam1.ffm

or stream a file like this:

ffmpeg -i /home/kev/share/movie.mp4 http://192.168.0.20:8090/cam1.ffm

So basically i want to be able to do the above from android. After several searches this is what i’ve done so far – i came across this link http://bambuser.com/opensource from which i downloaded the ffmpeg source and built it. The build outputs several things:
1. shared libs [libavcodec, libavcore, libavdevice, libavfilter,libavformat,libavutil,libswscale]
2. executables [ffmpeg,ffprobe]

Not sure how to plug my functionality with these resources this is what i’ve tried so far:
1. loaded the libs in my Activity using System.loadLibrary() then copied the ffmpeg executable to the assets folder which at runtime i copied to my application’s “files” directory i then set permissions for the executable using Runtime.getRuntime().exec(). then the last step was to execute it in java with the following statement:

Runtime.getRuntime().exec("ffmpeg -i file:///android_asset/movie.mp4http://<server>:8090/cam1.ffm");

2. copied ffmpeg.c,the shared libraries and the “include” folder that was generated by the build to my jni folder and added a jni function that wraps around the main() function in ffmpeg.c. With this approach i’ve found myself having to copy several header files from the ffmpeg source for the ndk-build to succeed and i highly doubt if this is the way to go.

The above two approaches havnt worked for me, i’m not sure where i’m going wrong, so any help on how to do a simple ffmpeg streaming like an mp4 file from android would be highly appreciated.

  • 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-06-18T14:39:43+00:00Added an answer on June 18, 2026 at 2:39 pm

    I got it working by using apporach 2, this is what i did.
    1. copied ffmpeg.c,the “include” folder and the shared libraries to my project’s jni folder.

    1. modified ffmpeg.c with reference to this blog post http://demo860.blogspot.com/2010/07/android-ffmpeg-dynamic-module-jni.html

    2. there were several errors while building with ndk so i just added the missing dependencies until finally the build succeeded.

    At first the app would start and then immediately exit, this was due to a couple of things i forgot to do so make sure you’ve done the following to save yourself some hours and hair loss:
    – set internet permission on manifest(if media file is in sdcard, set write external storage permission and make sure the sdcard is mounted)
    – make sure the remote ffserver is running and configured correctly. you can confirm by streaming from a desktop
    – make sure you have the correct params passed

    Now i can stream from an mp4 file in my sdcard to a remote ffserver, havnt tried streaming from the device camera yet.

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

Sidebar

Related Questions

I need to split mpeg4 video stream (actually from android video camera) to send
I want to live stream video from android device. I found out that ffserver
I am trying to stream video from android camera through local unix socket and
I need to read in an expression from a file using a string stream
I need to stream an audio file which is saved on my server. Is
I need to get the mjpeg stream from an IP camera, anyone know the
I need to learn how to buffer audio stream from a remote server in
I need to create an application/driver in Windows that captures the video stream from
I'm using the AVFoundation classes to capture the live video stream from the camera
We need to integrate some C file functions from java android code. Each c

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.