What working command line are you using?
To extract the main audio track to an mp3 file (128K constant bitrate in this example) the following works:
Code:
ffmpeg -i "File 1.ts" -c:a mp3 -b:a 128k "File 1.mp3"
Edit:
The above command does not work with ffmpeg 0.10; you have to specify the encoder. With ffmpeg 2.8 if you specify the output type it selects the best available encoder automatically. The following works with ffmpeg 0.10 and ffmpeg 2.8:
Code:
ffmpeg -i "File 1.ts" -c:a libmp3lame -b:a 128k "File 1.mp3"
End of edit.
I presume that when Webif copies the mp2 or aac audio track from a recording with ffmpeg it then renames the resulting file to '.mp3'. To extract mp2 audio is straightforward:
Code:
ffmpeg -i "File 1.ts" -c:a copy "File 1.mp2"
Copying an aac audio track is trickier. Copying to an '.aac' file (no container) gives a file which does not play correctly on any of the players I have tried. Copying to an '.m4a' file with ffmpeg fails, even when using a bitstream filter, as it refuses to copy aac_latm into that container. The simplest solution I have found is to copy just the main audio track to a new '.m2ts' file (see below) and then rename this to '.mp3'.
Code:
ffmpeg -i "File 1.ts" -map 0:1 -c:a copy "File 1.m2ts"
Here you have to specify the stream you wish to copy or it will copy the video too. As the main audio stream is always at location '0:1', adding '-map 0:1' will work with all the examples in this post.
Edit:
I've figured out what is going on with the aac audio. It is the aac_latm stream format that is the problem with trying to extract to '.aac' without reencoding. It will work if the audio is extracted to a low overhead audio stream file (loas). This works:
Code:
ffmpeg -i "File 1.ts" -c:a copy "File 1.loas"
The '.loas' file is then renamed as '.mp3'.
Later versions of ffmpeg (e.g. 2.8) are more fussy than ffmpeg 0.10. The old version will let you copy an mp2 or aac audio stream into a new file with the mp3 extension. The later version does not. The file extension would have to be changed to '.mp3' afterwards.