pedroSG94 / vlc-example-streamplayer

Example code how to play a stream with VLC
GNU General Public License v3.0
227 stars 93 forks source link

Support for streamed video recording #46

Open pranishres opened 3 years ago

pranishres commented 3 years ago

Hello, I tried this library and works pretty well for rtsp videos. Is there any option for recording the streaming video from the library itself? Thanks

pedroSG94 commented 3 years ago

No. I think that VLC doesn't support record in Android. Anyway you can ask in VLC forums: https://forum.videolan.org/viewforum.php?f=31&sid=0fb733068256c3928fd1e6df4f9df94f

This proyect only compile VLC for Android and create a simple wrapper using it

pranishres commented 3 years ago

No. I think that VLC doesn't support record in Android. Anyway you can ask in VLC forums: https://forum.videolan.org/viewforum.php?f=31&sid=0fb733068256c3928fd1e6df4f9df94f

This proyect only compile VLC for Android and create a simple wrapper using it

Is there a way I could do it using your library?

pedroSG94 commented 3 years ago

You haven't access to audio so you need modify VLC library to get it. You can capture video but it is difficult and you need modify all my library code

pranishres commented 3 years ago

You haven't access to audio so you need modify VLC library to get it. You can capture video but it is difficult and you need modify all my library code

I won't need audio, basically I am streaming IPCamera view via rtsp stream using your app and that is working great. Just need to record the video in the app.

pedroSG94 commented 3 years ago

In that case you can render a surface provided by MediaCodec class instead of surface provided by SurfaceView and you can use that surface to encode video. To record in a MP4 file using H264 buffer provided by MediaCodec, you can use MediaMuxer class

pranishres commented 3 years ago

So you mean I should use the exoplayer library?

pedroSG94 commented 3 years ago

You can try that way too

pranishres commented 3 years ago

You can try that way too

Finally after trying different techniques for a week, I am finally successful in achieving my goal. I was able to stream and record the video via the vlc-android sdk from vlc themselves. Thank you for the support from your side too.

penmatsa commented 3 years ago

@pranishres

Hi pranishres,

please provide details for recording video via the vlc-android sdk.

thanks