[Libav-user] [libavcodec][C] convert audio files

sbwn * at sbwn.fr
Wed Sep 24 10:42:45 CEST 2014


Hello,
I'm trying to make a C++ program that convert music files, but it doesn't work.

main.cpp : http://pastebin.com/kTN45Fn1
functions.cpp : http://pastebin.com/aRwdHxy7
Makefile : http://pastebin.com/BzBEBicH
Program output :
[mp3 @ 0x21eb200] max_analyze_duration reached
Input #0, mp3, from 'test.mp3':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : 2013-11-29 03:30:21
    encoder         : Lavf53.21.1
  Duration: 00:03:58.15, start: 0.000000, bitrate: 192 kb/s
    Stream #0.0: Audio: mp3, 44100 Hz, stereo, s16, 192 kb/s
Output #0, mp4, to 'out.mp4':
    Stream #0.0: Audio: libvorbis, 44100 Hz, stereo, s16, 192 kb/s
[mp4 @ 0x21ee5c0] Codec for stream 0 does not use global headers but container
format requires global headers
audio encode error-22 Invalid argument

avcodec_encode_audio2 returns -22 and the error string is "Invalid argument", I
don't know more about the error

Thank you to help me  [:)]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20140924/97a2e3ae/attachment.html>


More information about the Libav-user mailing list