[Libav-user] no 'data' tag found

Jeff Archer jeffarcher7 at gmail.com
Mon Jan 23 22:02:52 EET 2017


The file must be somewhat valid as it can be played by many android devices
and Windows Media Player.
Is it possible to inform avformat_open_input() about the header size?
How should I set the probe size?  Should I set this to the total file size
or to the 20-byte minimum header of the WAV format?


Jeff Archer
jeffarcher7 at gmail.com <jarcher7 at yahoo.com>


On Mon, Jan 23, 2017 at 2:10 PM, Anton Shekhovtsov <shekh.anton at gmail.com>
wrote:

> Hi, it seems you have an invalid file
> The simplest WAV that can be opened with ffmpeg consists of the following:
> 20-byte header ('WAVEfmt'...)
> WAVEFORMAT compatible format descriptor
> 8-byte empty data block ('data'...)
>
> or maybe you just need to increase probe size
>
> 2017-01-23 20:50 GMT+02:00 Jeff Archer <jeffarcher7 at gmail.com>:
>
>> Hello all,
>> I am attempting to use FFmpeg from JNI code of my Android app.
>> I have what I thought are .WAV files but now not so certain.  On
>> many(most) Android devices the code extracts this data and writes it to a
>> file and then gives that file to the Android MediaPlayer to play.  On some
>> devices I get the exception java.io.IOException: setDataSourceFD failed.:
>> status=0x80000000.  I believe these devices do not have an appropriate
>> codec. So, I wish to use FFmpeg API to convert the file to .mp3 or other
>> format that can work on all devices. These files can be supplied by end
>> user so cannot simply convert files ahead of time.  End user will of course
>> expect to be able to use any file that can be played on other device or
>> Windows.  Thus, I need to use FFmpeg APi to convert file just before
>> playing.
>>
>> What is happening is that during the call to avformat_open_input() the
>> following messages are coming through av_log_callback()
>> av_log: Format wav probed with size=2048 and score=99
>> av_log: no 'data' tag found
>> av_log: Statistics: 3732 bytes read, 0 seeks
>> And avformat_open_input() is returning: -1094995529[0xBEBBB1B7]
>> Which yields the following from av_strerror(): Invalid data found when
>> processing input
>>
>> It seems like I may be missing some required step or flag or something...
>>
>> Any help or suggestion is most appreciated.
>>
>> Jeff Archer
>> jeffarcher7 at gmail.com <jarcher7 at yahoo.com>
>>
>>
>> _______________________________________________
>> Libav-user mailing list
>> Libav-user at ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/libav-user
>>
>>
>
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20170123/37ad3794/attachment.html>


More information about the Libav-user mailing list