Mediatavio
YouTube to MP3PriceBlogPrivacy

Audio conversion

YouTube to MP3: Audio Extraction, Encoding and Downloads

Follow a video link from source-audio preparation to a playable file, and understand what the selected format and bitrate actually change.

By Mediatavio Engineering

Start with one permitted video

YouTube to MP3 accepts one video link. Sign in, paste the link, select MP3, AAC or WAV, choose a bitrate for compressed audio and start conversion. Keep the page open and in the foreground until the file finishes downloading.

Use videos you own or have permission to download and process, and follow YouTube's terms and applicable law. This workflow is not a way to bypass private-video access, paywalls or DRM.

The URL validator accepts recognized YouTube watch, short-link, Shorts and embed forms and normalizes a valid 11-character video ID to a watch URL. Unrecognized hosts and malformed IDs are rejected. Playlists and active live streams are not supported; a valid URL does not guarantee that the video is accessible.

Separate extraction from final encoding

The download task uses yt-dlp to select the best available audio-only stream rather than fetching video frames. The source may arrive in a container such as WebM or M4A; its extension is not a promise that it is already MP3.

The backend prepares that source audio and exposes it to the export step. FFmpeg then decodes the source and encodes the selected destination format. The server's source-ready status is therefore not the same as a completed MP3 download.

Source preparation, transfer, encoding and saving are distinct stages. The progress bar combines these stages and should not be read as an exact elapsed-time forecast. These descriptions are based on the implementation, not a measured speed benchmark.

Video URL
  -> validated single-video task
  -> yt-dlp audio-only source
  -> source transfer
  -> FFmpeg audio encoding
  -> downloadable MP3, AAC or WAV

Choose the actual output encoding

Formats implemented by the export step
Audio formatEncoder and containerPractical distinction
MP3libmp3lame encoder; MP3 containerLossy compressed audio with broad player support; selectable 128, 192 or 320 kbps
AACAAC encoder; ADTS container with an .aac extensionLossy compressed audio; this output is not an M4A file
WAVpcm_s16le encoder; WAV containerUncompressed 16-bit PCM; the compressed-audio bitrate selector is hidden

The export command removes video output and explicitly selects the audio encoder and container. It does not explicitly force a sample rate or channel count, so do not promise every result is 44.1 kHz stereo. Check the completed file when those properties matter.

ffmpeg -i input.webm -vn -codec:a libmp3lame -b:a 192k -f mp3 output.mp3
ffmpeg -i input.webm -vn -codec:a aac -b:a 192k -f adts output.aac
ffmpeg -i input.webm -vn -codec:a pcm_s16le -f wav output.wav

These commands illustrate the configured export arguments with an example input name. They are not a separate command-line download service. For audio files you already have, use Audio Converter; for extracting a soundtrack from a video file, use Video to Audio.

Bitrate changes size, not the source recording

Choosing 320 kbps does not restore details already absent from the source. A lossy source re-encoded as MP3 or AAC undergoes another lossy encoding step. WAV avoids that additional lossy codec but cannot reconstruct the original studio recording.

For compressed audio, approximate payload size is bitrate multiplied by duration, divided by eight. A ten-minute passage at 192 kbps is about 14.4 MB before container overhead, using decimal megabytes. This is a size estimate, not a quality or timing measurement.

Compressed payload bytes ~= bitrate_bits_per_second * duration_seconds / 8
192000 * 600 / 8 = 14400000 bytes = 14.4 MB

16-bit PCM payload bytes ~= sample_rate * channels * 2 * duration_seconds
48000 * 2 * 2 * 600 = 115200000 bytes = 115.2 MB

The WAV example assumes 48 kHz stereo only to illustrate the calculation; it is not an output guarantee. Container headers and actual encoding behavior can change file size. Choose a format for the destination player or editing workflow, not because a larger file must sound better.

Task states, access and expiry

Creating a task requires an authenticated account. Status, heartbeat, source retrieval, completion and cancellation endpoints check task ownership; a task ID alone is not permission to download somebody else's result.

POST /api/jobs                  create an authenticated task (202)
POST /api/jobs/{id}/heartbeat   keep the task active and read status
GET  /api/jobs/{id}/source      retrieve source audio when ready
POST /api/jobs/{id}/complete    report successful export
POST /api/jobs/{id}/cancel      cancel the task

The source task can be queued, downloading, recovering, uploading, done or error. Some stages depend on deployment settings. Optional object storage changes source delivery, not the selected output codec. The source endpoint returns either a source-file route or an expiring storage URL.

The configured source-result lifetime is one hour after the backend task finishes. Download promptly; expiry can occur before a long export finishes. Source expiry and a successfully saved final file are different things. Session restoration does not guarantee that a previous in-memory export or download link survives a refresh.

Limits and common failures

The downloader is configured for videos up to 7,200 seconds and a maximum source download size of 250M. These are source-task limits, not a promise that every two-hour video will succeed or that the final WAV will fit that size. Download attempts also have a 1,800-second timeout.

A full queue or low server resources can delay or reject a task. A removed, restricted or unavailable video, platform verification, network failure, source expiry or an encoding error can also prevent completion. A valid URL and a visible progress bar do not establish that the entire pipeline succeeded.

If encoding fails after source preparation, the interface can offer an original-audio download. That file retains the source format and is not a fallback MP3. Verify its extension and player support before using it. Try a shorter permitted video, keep the page in the foreground and retry only after checking the reported error.