How do I extract audio from video?
Pulls the audio track out of a video, copying it without re-encoding when the format allows.
Pulls the audio track out of a video, copying it without re-encoding when the format allows.
ffmpeg -i https://cdn.rendobar.com/assets/examples/sample.mp4 -vn -c:a copy out.m4ajob_02d6b802c13b4e53
-c:a copy extracts the existing audio stream byte for byte, so it is lossless and near-instant. It only works if the container you are writing to accepts that codec: AAC goes into .m4a, not .mp3. Reaching for MP3 forces a re-encode you did not need.
Re-encoding to MP3 loses quality and takes longer, when the source audio could have been copied out untouched.
ffmpeg -i https://cdn.rendobar.com/assets/examples/sample.mp4 -vn -c:a libmp3lame -b:a 192k out.mp3It did not error. It produced 118.7 KB against the correct command's 60.5 KB, a 2.0x larger file. A pipeline would accept this silently.
job_8937fd28df5342d6
Pulls the audio track out of a video, copying it without re-encoding when the format allows.
-c:a copy extracts the existing audio stream byte for byte, so it is lossless and near-instant. It only works if the container you are writing to accepts that codec: AAC goes into .m4a, not .mp3. Reaching for MP3 forces a re-encode you did not need.
We ran the naive version too. It did not error. It produced 118.7 KB against the correct command's 60.5 KB, a 2.0x larger file. A pipeline would accept this silently.
Not with Rendobar. The command on this page ran through the API against a URL, with no local FFmpeg and no server. The job id below it is the job that produced these numbers.
This exact command ran through the API against a URL.