2

I followed this guide and successfully compiled vlc for android.

I added my own codec "my_codec" and installed vlc with

./gradlew installVanillaX86Debug

Now I want to force vlc to use my code. on pc the command is

./vlc --codec my_codec,none sample.mp4

for android I tried both

adb shell am start -n org.videolan.vlc.debug/org.videolan.vlc.gui.video.VideoPlayerActivity -d file:///sdcard/sample.mp4 --es --codec my_codec,none 

adb shell am start -n org.videolan.vlc.debug/org.videolan.vlc.gui.video.VideoPlayerActivity -d file:///sdcard/sample.mp4 --es codec my_codec,none 

but my codec wasn't used.

dafnahaktana
  • 837
  • 7
  • 21
  • I got it working with the "-d file:///sdcard/sample.mp4" Parameter. Thanks very much for that! I'd like to play with shuffle. Do you know the switch for that? Wherefrom did you get the info about "-d"? Are there any other paramters – Christoph Dec 05 '17 at 06:55

1 Answers1

0

more a hack than a real solution, but I eventually solved it by adding the code:

if(strcmp(capability,"video decoder") == 0){
  name = "my_codec,none";
}

to the function vlc_module_load in the file vlc/src/modules/modules.c

dafnahaktana
  • 837
  • 7
  • 21