mp3 - "MPEG audio header not found" error when opening with TagLib after converting with ffmpeg -
i converted wma file doing this...
ffmpeg -i song.wma -f mp3 song.mp3
i can play mp3 file in windows media player, looks conversion worked.
however, if try open file in taglib, error "mpeg audio header not found" on following line...
taglib.file tf = taglib.file.create("song.mp3");
i've tried on few wma files, it's not 1 that's @ fault.
anyone have idea did wrong? find docs ffmpeg pretty overwhelming, , complete ignoramus in field of audio encoding, haven't clue of means. i'm missing in conversion, although wouldn't explain why wmp can play taglib can't open it.
whilst not strictly answer original question, managed way of doing wanted.
please see corey's answer my question here, in shows how use naudio package convert file in code. better approach anyway, doesn't rely on running external programs, causing own problems. converted file produced package ran through taglib without issues.
Comments
Post a Comment