Open slobglob opened 5 years ago
Does it do the same thing with the ffplay
or the ffmpeg
program?
BTW, we can use the ffmpeg
program very easily even on Android:
http://bytedeco.org/javacpp-presets/ffmpeg/apidocs/org/bytedeco/ffmpeg/ffmpeg.html
@saudet Tried to run ffmpeg -i rtsp://192.168.1.1 -r 15 example.mp4
from my mac while connected to that camera, also nogo.
What do you think are the possible issues here? Can any ffmpeg flag fix this problem? Or it's something more complicated?
There's probably a way to get it working with some options, yes.
I'm looking at this https://ffmpeg.org/ffmpeg-protocols.html#rtsp, do you have any idea what might be the key for this?
setOption() should work.
Ok, I'm trying to attack this from ffmpeg
flags perspective, I guess this isn't related directly to this lib code.
You can leave this open and I'll update this once I'll have a solution / dead end, if it's not relevant you can close this. Thanks.
It looks like ffmpeg has some issues running RTSP with the specific model of camera that I'm using. I have to recompile it in order for it to work. I guess this can be closed as it has nothing to do with this project eventually. Thanks anyways!
We can apply the same fix for JavaCV. Could you send a pull request with the patch?
@saudet tbh, I'm looking for a different solution then recompiling ffmpeg
, if I won't find anything i might do it. If so, I'll open a PR fixing it. Thanks!
Hey,
I'm trying to run FFmpegFrameGrabber on a simple Android project. My
build.gradle
looks like this:implementation group: 'org.bytedeco', name: 'javacv-platform', version: '1.5.1'
And the rest of the code is pretty straight forward as well:
When the
.start()
command is executed it enters acatch
block with the following exception:W/System.err: org.bytedeco.javacv.FrameGrabber$Exception: avformat_open_input() error -113: Could not open input "rtsp://192.168.1.1". (Has setFormat() been called?)
The rtsp camera itself is standalone camera that I have locally here in my LAN, the setup includes:
Watching the RTSP stream from the same phone and setup using VLC works just fine! I dove in and tried to compare the network transport between VLC and and my own code, this are the results from the pcap files:
VLC
FFmpegFrameGrabber
As you can see in the FFmpegFrameGrabber pcap, for some reason it tries to setup
track1/track2
fails and doesn't try any other combination (unlike the VLC) instead of separating the tracks, and then shows 404 not found for the stream. I'm not sure why this happens or what I'm doing wrong, running the exact same code with a public rtsp (rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov
) stream over the internet worked perfect.Do you have any idea why does this happen? Any options I can set to fix this? Any help is much appreciated! Thanks.