'How can I embed Ffmpeg extension into Exoplayer under windows?
For some reasons I have to work under windows 10 OS with Android-Studio as IDE. My problem is that, exoplayer uses software and hardware decoders of Android-TV device to decode video streams. Apparently, most of the Android-TV devices have no built-in decoder for decoding mpeg-2 sounds and therefore, the sound of the mpeg-2 streams are mute however, mpeg-2 videos are playing well. In order to solve such problems, I believe that I have to embed Ffmpeg extension into exoplayer. To do this, I followed the instruction of here under Windows PowerShell as recommended, but there are some problems.
First: What should be the value of HOST_PLATFORM variable for windows when using PowerShell? Second: For unknown reasons I am receiving the following messages when executing Shell script "build_ffmpeg.sh".
What I receive when I execute shell script
Now, how can I embed ffmpeg extension for exoplayer (under windows 10 OS), enable it for decoding and solve these problems? My programming language is java. Thanks.
Note: Please tell me if you have any other (Other than embedding Ffmpeg into exoplayer) suggestions to solve my problem.
Solution 1:[1]
To build FFmpeg for ExoPlayer under Windows, you can use Git Bash for Windows to perform the building process.
All commands are almost the same (we'll get to the differences in a minute). Please note that NDK_PATH is the path of your NDK's folder (it's usually the version number, you can find it in default cases in YourAndroidSDK\ndk\yourNDKversion
).
As for the differences, it's only for HOST_PLATFORM
, you should use windows-x86_64
, by inspecting the build_ffmpeg.sh
, there is a line that says:
TOOLCHAIN_PREFIX="${NDK_PATH}/toolchains/llvm/prebuilt/${HOST_PLATFORM}/bin"
The variable HOST_PLATFORM is only utilized to get the correct NDK tools for Windows. If you go and check the above path, you'll find a folder named windows-x86_64
under 'prebuilt'. That's what goes in HOST_PLATFORM.
If you get the NDK path correctly, HOST_PLATFORM correctly, FFMPEG_MODULE_PATH correctly, and last but not least the ENABLED_DECODERS, you should be able to build FFmpeg very easily.
If you don't want to go through setting the variables all over again, just edit the build_ffmpeg.sh
file using Notepad, and edit the variable to make 'em be as you want without having to do it in the PowerShell terminal all over again.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Mark Rotteveel |