Adding duplicate sout option to libvlc_instance on Android

VLC for Android and Chrome OS specific usage questions
gregoiregentil
Blank Cone
Blank Cone
Posts: 27
Joined: 30 Jan 2013 07:48

Adding duplicate sout option to libvlc_instance on Android

Postby gregoiregentil » 13 Mar 2013 00:59

The following option:
--sout=#duplicate{dst=display,dst=standard{access=file,mux=ts,dst=go.mpg}}"
is working wel on Linux when reading an rtsp file. The stream is shown on screen and dumped on file.

I would like to do the same on Android with libvlc. I have added the same option to "libvlc_instance_t *instance = libvlc_new(sizeof(argv) / sizeof(*argv), argv);" but it doesn't work. Stream appears on screen but nothing in any file. I have tried a few variations such asdst=file:///..., dst=/sdcard/... and I have obviously android.permission.WRITE_EXTERNAL_STORAGE.

Am I doing something wrong or can't it work on Android?

Thanks in advance for any hint.

edwardw
Big Cone-huna
Big Cone-huna
Posts: 2346
Joined: 24 Jun 2012 23:36
VLC version: 3.0.0-git

Re: Adding duplicate sout option to libvlc_instance on Andro

Postby edwardw » 13 Mar 2013 22:09

Well, sout is not supported via libvlc yet. So there is nothing that can be done at this point.

gregoiregentil
Blank Cone
Blank Cone
Posts: 27
Joined: 30 Jan 2013 07:48

Re: Adding duplicate sout option to libvlc_instance on Andro

Postby gregoiregentil » 14 Mar 2013 07:47

I'm so disappointed! :-(

Note that I'm not really trying to transcode here, I just want to dump the rtsp stream that is received an played by libVLC. Is there another option (that would be supported by libVLC) which could help me? Otherwise, could you point where in the vlc tree I could simply patch to dump the rtsp stream before it's decoded? Once again, I'm not interested by all the options of sout, just to dump. Thanks in advance.

edwardw
Big Cone-huna
Big Cone-huna
Posts: 2346
Joined: 24 Jun 2012 23:36
VLC version: 3.0.0-git

Re: Adding duplicate sout option to libvlc_instance on Andro

Postby edwardw » 14 Mar 2013 12:25

This is 150% unsupported and if it doesn't work there is no warranty, but check in the logcat log to see what is blocking the --sout command.

gregoiregentil
Blank Cone
Blank Cone
Posts: 27
Joined: 30 Jan 2013 07:48

Re: Adding duplicate sout option to libvlc_instance on Andro

Postby gregoiregentil » 15 Mar 2013 09:02

Unfortunately, there is nothing in logcat about the added sout. No error message. My modification is taken into account as I tested another command line option in libvlc_instance and it was working. I do understand that it's totally unsupported but any other recommendation? Thanks in advance.

gregoiregentil
Blank Cone
Blank Cone
Posts: 27
Joined: 30 Jan 2013 07:48

Re: Adding duplicate sout option to libvlc_instance on Andro

Postby gregoiregentil » 19 Mar 2013 07:18

If anyone has the same problem, after enabling sout, the magic line in the jni code turned out to be: libvlc_media_add_option(p_md, ":sout=#stream_out_duplicate{dst=display,dst=std{access=file,mux=ts,dst=/sdcard/go.mpg}}");

qontranami
New Cone
New Cone
Posts: 4
Joined: 10 Sep 2010 01:33

Re: Adding duplicate sout option to libvlc_instance on Andro

Postby qontranami » 12 Jul 2013 23:45

Hi. I made the suggested modifications above, but I'm still unable to dump the stream onto a file. Here is what I did.

1. Enabled sout (--enable-sout) in .../android/android/configure.sh
2. Modified the jni code as gregoiregentil suggested. Write permissions were already set in the manifest xml file.
3. Ran compile.sh
4. Ran make -e
5. Installed VLC on an Android device and played a file. Playback was successful, but I was unable to obtain a dumped file.

Questions:
1) Have you been able to successfully dump a file? If so, why do you think I am not getting anything?
2) In your jni code, how does the software distinguish between sdcard1 and sdcard0?
3) How come you used "stream_out_duplicate..." instead of just "duplicate..."?

edwardw
Big Cone-huna
Big Cone-huna
Posts: 2346
Joined: 24 Jun 2012 23:36
VLC version: 3.0.0-git

Re: Adding duplicate sout option to libvlc_instance on Andro

Postby edwardw » 13 Jul 2013 17:06

It just dumps to the default /sdcard of Android.

Sout is not officially supported in VLC for Android right now. You are on your own to troubleshoot.

gregoiregentil
Blank Cone
Blank Cone
Posts: 27
Joined: 30 Jan 2013 07:48

Re: Adding duplicate sout option to libvlc_instance on Andro

Postby gregoiregentil » 13 Jul 2013 18:02

1) Yes. I don't know.
2) I don't. That's not the scope of the thread here. Just find a place you can write to file.
3) Just the magic string that works for me.
Check all your log first...


Return to “VLC for Android and Chrome OS”

Who is online

Users browsing this forum: No registered users and 13 guests