brarcher / video-transcoder

Android app for video and audio transcoder, based on FFmpeg
GNU General Public License v3.0
480 stars 57 forks source link

Wav input support #160

Open poppypundit opened 5 years ago

poppypundit commented 5 years ago

Hi, would it not be useful for the app to support audio conversions as well? eg wav to mp3/ogg?

brarcher commented 5 years ago

The app does support this use case, although the main button on the UI "Select Video" would imply otherwise. One can select an audio file, then select an output container such as mp3 or ogg. I just tried this out by loading a m4a audio file and converting it to a mp3 file.

poppypundit commented 5 years ago

Thank you...Yes! This was feature is extremely handy and I was aware of it. The problem is when the "select video" element happens to be a wav file. ( I intentionally gave wav > mp3/ogg in the OP) I was wondering why create a limitation of it being a video file if conversion is happening using the ffmpeg libraries.

brarcher commented 5 years ago

I was wondering why create a limitation of it being a video file if conversion is happening using the ffmpeg libraries.

Oh, I see what you mean. I tried with a wav file as input just now, and saw it fail. Other audio formats worked and there are tests for those (such as mp3, ogg, and opus), but wav did not occur to me to test.

The issue is likely that some of the audio file properties that are expected to be there are missing for wav, and the parsing of ffprobe's output fails. That could be improved/fixed, which would allow wav to work. Wav not working was not intentional, but more of an oversight.