I am working with FFMPEG Library. I am capturing streams in particular compression codes to the destination file with the specified format with the following command:
ffmpeg -i rtsp://username:password@server-ip/filename -acodec adpcm_ms -t 10 -f mp3 C:\FFMPEG_Recordings\ADPCM_10.mp3
I am getting the following the error:
Could not write header for output file #0 (incorrect codec parameters ?): Error number -22 occurred
So, when I specify some other file format against '-f' option this executes normally. Such as:
ffmpeg -i rtsp://username:password@server-ip/filename -acodec adpcm_ms -t 10 -f mov C:\FFMPEG_Recordings\ADPCM_10.mp3
So, when I specified 'mov' against '-f' option It works fine and It captures the streams in media file of 'mp3' format.
I am unable to understand that why I am getting this error? and why I have to specify 'mov' against '-f' format while I want to capture streams in 'mp3' file format?