bravobit / FFmpeg-Android

FFMpeg/FFprobe compiled for Android
https://bravobit.nl/
MIT License
739 stars 175 forks source link

android.resource Protocol not found #54

Closed mustapha-ghlissi closed 6 years ago

mustapha-ghlissi commented 6 years ago

hello every body

I am trying to convert an audio into a video and making a poster background :

Uri imageUri = Uri.parse("android.resource://com.babymoov.babydoppler/drawable/logo"); Uri sonUri = Uri.parse("android.resource://com.babymoov.babydoppler/raw/s723"); String cmd = "-loop 1 -i "+sonUri+" -i "+imageUri+" -c:v libx264 -tune stillimage -c:a aac -b:a 192k -pix_fmt yuv420p -shortest out.mp4";

BabyFFmpeg.initializeBabyFFmpeg(mContext); BabyFFmpeg.executeCmd(cmd, sharingIntent);

I got the following error : android.resource://com.babymoov.babydoppler/drawable/logo: Protocol not found android.resource://com.babymoov.babydoppler/raw/s723: Protocol not found

How to resolve this one ?

Brianvdb commented 6 years ago

Copy the file from resources to a normal File on internal/external storage and then use the absolute path of that.