Make ffmpeg_wrapper "audio-friendly"
michi20 - November 1, 2009 - 16:42
| Project: | FFmpeg Wrapper |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | active |
Description
I think it should be possible to process audio-only files with ffmpeg_wrapper. For example, ffmpeg_wrapper_can_decode should return true for a mp3 file. I have attached a patch which makes ffmpeg_wrapper work better with audio-only files.
| Attachment | Size |
|---|---|
| audio.patch | 2.34 KB |

#1
I have created an improved patch. In addition to the first path, it adds an option 'Audio only preset' to the ffmpeg_wrapper_configuration_form. This flag can then be passed to the ffmpeg_wrapper_can_decode function as a second parameter. In case this is true, it is checked whether the audio part of the file can be decoded by ffmpeg_wrapper or not.
Background for this patch:
I wanted to create an audio sample gallery with the modules ffmpeg_wrapper/ffmpeg_converter. I then realized that several errors occured for audio only files (without video), e.g. division by zero in the _padded_size function. With my patch, these errors can be avoided.