You are not logged in.

#1 2013-04-17 09:12:10

Darksoul71
Member
Registered: 2010-04-12
Posts: 319

Reliable way for lossless audio extraction of Youtube (Solved)

Hi all,

I guess the title says it all ! I am looking for a reliable way to extract the audio track of a grabbed youtube video. I often grab stuff from Youtube for later listening (e.g. lectures, sessions from congresses, audio plays, etc). Previously I had hacked togehter a crude Python script with does parallel encoding of any sort of Video files to MP3 audio with ffmpeg.

This script has failed several times on videos and I ended up with incomplete audio tracks. The next step was to extract the audio tracks from Youtube downloads via ffmpeg and audio stream copy to aac files. This mostly works but sometimes the resulting aac files cause SMPlayer to crash.

My questions:
- Is there a more reliable way / tool to extract the audio track of your average youtube files (MP4 / FLV / WebM) ?
- Has anyone implemented a similar script with integrated verification of the resulting audio file ?

I would prefer a lossless extraction over lossy extraction since especially older audioplays published at Youtube sound really messy if you re-encode them.

TIA,
D$

Last edited by Darksoul71 (2013-04-27 18:34:50)


My archlinux x86_64 host:
AMD E350 (2x1.6GHz) / 8GB DDR3 RAM / GeForce 9500GT (passive) / Arch running from 16GB USB Stick

Offline

#2 2013-04-17 09:35:45

demaio
Member
From: Germany
Registered: 2012-09-02
Posts: 101
Website

Re: Reliable way for lossless audio extraction of Youtube (Solved)

I have used youtube-dl several times for extracting audio from a youtube video with the -x (--extract-audio) command line switch.

Last edited by demaio (2013-04-17 09:41:46)

Offline

#3 2013-04-17 09:48:22

Darksoul71
Member
Registered: 2010-04-12
Posts: 319

Re: Reliable way for lossless audio extraction of Youtube (Solved)

Thanks for mentioning ! I have used youtube-dl and its ability for audio encoding quite often but my current approach is rather grabbing a big pile of files and batch-covert them over night. Also for audio play there is often a cover scan as "video" which I extract as jpeg by using ffmpeg as well. Thus my way to do things is more:
1) Download bunch of files
2) Extract jpg from each file
3) Extract audio track
4) Delete source file


My archlinux x86_64 host:
AMD E350 (2x1.6GHz) / 8GB DDR3 RAM / GeForce 9500GT (passive) / Arch running from 16GB USB Stick

Offline

#4 2013-04-17 10:11:52

progandy
Member
Registered: 2012-05-17
Posts: 5,190

Re: Reliable way for lossless audio extraction of Youtube (Solved)

mplayer with -dumpaudio should work I think.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#5 2013-04-17 12:54:30

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: Reliable way for lossless audio extraction of Youtube (Solved)

demaio wrote:

I have used youtube-dl several times for extracting audio from a youtube video with the -x (--extract-audio) command line switch.

Oh my gosh, I use youtube-dl every day and had no idea it had that functionality. tongue

The one time I extracted audio from a video recently I used VLC (via the GUI). It seemed like it would be tricky to setup as a batch job.

I'm glad Darksoul71 asked this question. It really seems like there should be an easy command line tool to extract audio from a video file, something besides using a GUI application, needing to download it from YouTube, and "mplayer can probably do it". hmm

Last edited by drcouzelis (2013-04-17 12:54:46)

Offline

#6 2013-04-17 13:23:32

Darksoul71
Member
Registered: 2010-04-12
Posts: 319

Re: Reliable way for lossless audio extraction of Youtube (Solved)

@progandy: mplayer with -dumpaudio and video output disabled somewhat works but has its issues. Dumping aac audio streams directly to files resulted in non-playable files for me. Plus speeding up things often causes stability issues like not the complete audio track being written.

For now ffmpeg in streamcopy for audio seems to work reliable but I had a few "corrupted" audio files.

youtube-dl is great for converting single videos to audio (e.g. a music track). For more massive usage is simply fails for me because of one fact: Downloading youtube videos, esp. a complete channel, takes ages. I usually offload such activities to a low power-system (Raspberry Pi) which does not hurt my wallet because of power costs.

In the end youtube-dl also falls back to ffmpeg for audio conversion, so IMO you do not gain much by using it instead of youtube-dl for download and ffmpeg for audio conversion afterwards.

At least the youtube-dl help indicates this:
Post-processing Options:
    -x, --extract-audio      convert video files to audio-only files (requires ffmpeg or avconv and ffprobe or avprobe)
    --audio-format FORMAT    "best", "aac", "vorbis", "mp3", "m4a", "opus", or "wav"; best by default
    --audio-quality QUALITY  ffmpeg/avconv audio quality specification, insert a value between 0 (better) and 9 (worse) for VBR or a specific bitrate like
 
I would be perfectly fine with ffmpeg and audio copy if I find out a way to verify the integrity of the produced audio file and have some fallback method. I wouldn't even mind using a GUI tool such as AVIDemux controlled by Bash or Python if it works reliable.

Thanks so far for all replies....

Last edited by Darksoul71 (2013-04-17 13:32:51)


My archlinux x86_64 host:
AMD E350 (2x1.6GHz) / 8GB DDR3 RAM / GeForce 9500GT (passive) / Arch running from 16GB USB Stick

Offline

#7 2013-04-17 14:44:45

sl1pkn07
Member
From: Spanishtán
Registered: 2010-03-30
Posts: 371

Re: Reliable way for lossless audio extraction of Youtube (Solved)

ffmpeg -i videoyoutube.extension -acodec copy output.extension

other method if is mp4

install gpac and:

MP4Box -raw 2 video.mp4

Last edited by sl1pkn07 (2013-04-17 14:49:30)

Offline

#8 2013-04-17 16:49:33

Darksoul71
Member
Registered: 2010-04-12
Posts: 319

Re: Reliable way for lossless audio extraction of Youtube (Solved)

@sl1pkn07:
Well, thanks for the ffmpeg example but this pretty much what I use in my yt2aac script:

#!/usr/bin/python
# -*- coding: utf8 -*-

# Importiere OS Modul
import os

# Modul fuer reguläre Ausdruecke
import re

# Definition der unterstützten Dateiendungen
extensions = [ 'flv', 'mp4' ]

# Vergleichspattern "zusammenbauen"
pattern = ''

for n in extensions:
  # Trennzeichen anhängen, falls bereits pattern definiert sind
  if len(pattern) > 0: pattern += '|'
  pattern = pattern + n  + '|' + n.upper() 

# RegEx für gesuchte Dateiendungen zusammenbauen
expr = re.compile (".*\.(" + pattern  + ")$")

# Alle Dateien der aktuell bearbeiteten Verzeichnis einlesen
files = os.listdir('.')  

# Nur Mediadateien bearbeiten
for n in files:
  # Gefundene Mediadateien der Verarbeitungsqueue hinzufügen
  if expr.match (n): 
    # Nächsten Eintrag der Datei-Queue holen
    sourcefile = n

    audio_file = sourcefile[:-3] + 'aac'

    commandline = "ffmpeg -i \"" + sourcefile  +  "\" -acodec copy -vn -y \""+ audio_file + "\""
    print commandline
    os.popen (commandline) 

And as I said it does not always work reliable.....

The MP4Box command is new to me. I think I will add it to my script....

The questions still remain to me:
How to verify the integrity of the produced audio file and what to use as fallback method to extract the audio file if it was extracted not correct ?


My archlinux x86_64 host:
AMD E350 (2x1.6GHz) / 8GB DDR3 RAM / GeForce 9500GT (passive) / Arch running from 16GB USB Stick

Offline

#9 2013-04-17 16:54:22

hadrons123
Member
From: chennai
Registered: 2011-10-07
Posts: 1,249

Re: Reliable way for lossless audio extraction of Youtube (Solved)


LENOVO Y 580 IVYBRIDGE 660M NVIDIA
Unix is user-friendly. It just isn't promiscuous about which users it's friendly with. - Steven King

Offline

#10 2013-04-17 17:35:03

ajbibb
Member
Registered: 2012-02-12
Posts: 142

Re: Reliable way for lossless audio extraction of Youtube (Solved)

If you have gstreamer-1.0 installed (I do for other programs) this bash script will pull the audio out of the file you grabbed, assuming of course you got the webm version.  This does straight audio extraction, no transcoding:

#!/bin/bash
#	
#	Extract the audio stream from a webm input file using gstreamer.
#	The audio stream should already be ogg vorbis
# 
#	Argument 1 (required) - the input file
#
#	
[[ -z ${1} ]] && exit 0

# program constants
readonly ver="1.0"

#	run some tests to make sure we can decode this thing
readonly prop=`gst-discoverer-${ver} "${1}"`

if [[ -z `echo ${prop} | grep "container: WebM"` ]]; then
	echo "The input file does not appear to be a WebM file - exiting"
	exit 1
fi

if [[ -z `echo ${prop} | grep "container format: Matroska"` ]]; then
	echo "The input file does not appear to contain a Matroska container - exiting"
	exit 2
fi

if [[ -z `echo ${prop} | grep "audio codec: Vorbis"` ]]; then
	echo "The input file does not appear to contain a Vorbis audio track - exiting"
	exit 3
fi
	
#	passed all the tests, first remove any old destination files
[[ -e ${1%.*}.ogg ]] && rm -f "${1%.*}.ogg"

#	now extract the audio
gst-launch-${ver} filesrc location="\"${1}\""  ! matroskademux ! vorbisparse ! oggmux ! filesink location="\"${1%.*}.ogg\""

exit "${?}"

If you don't want the entire script the meat of the program is the gst-launch line.

Offline

#11 2013-04-18 02:14:35

sl1pkn07
Member
From: Spanishtán
Registered: 2010-03-30
Posts: 371

Re: Reliable way for lossless audio extraction of Youtube (Solved)

@Darksoul71

test video with:

ffmpeg -i video.extension -f null - 2>>log.txt

if got all messages like:

frame=31975 q=0.0 size=       0kB time=1333.6 bitrate=   0.0kbits/s
frame=32331 q=0.0 size=       0kB time=1348.5 bitrate=   0.0kbits/s
frame=32650 q=0.0 size=       0kB time=1361.8 bitrate=   0.0kbits/s
frame=32989 q=0.0 size=       0kB time=1375.9 bitrate=   0.0kbits/s

the video is OK

but if got messages like:

[mpeg4 @ 0x6913c0]ac-tex damaged at 17 10
[mpeg4 @ 0x6913c0]Error at MB: 427
[mpeg4 @ 0x6913c0]marker does not match f_code
[mpeg4 @ 0x6913c0]illegal mb_num in video packet (2047 1200)
[mpeg4 @ 0x6913c0]concealing errors

the video is broken

Offline

#12 2013-04-18 18:59:39

Darksoul71
Member
Registered: 2010-04-12
Posts: 319

Re: Reliable way for lossless audio extraction of Youtube (Solved)

@sl1pkn07: Thanks...that is a good hint...
Next time I run into an audio file which is reported as corrupted by MPlayer, I will try out if ffmpeg reports it reports it as invalid.

For audio extraction / conversion I will stick to my yt2aac script so far....

I will report back here if i find a more stable approach.


My archlinux x86_64 host:
AMD E350 (2x1.6GHz) / 8GB DDR3 RAM / GeForce 9500GT (passive) / Arch running from 16GB USB Stick

Offline

#13 2013-04-18 21:37:39

sl1pkn07
Member
From: Spanishtán
Registered: 2010-03-30
Posts: 371

Re: Reliable way for lossless audio extraction of Youtube (Solved)

i recomended if is MP3, OGG, AAC and other Lossy [1] formats, not transcode to other. keep original format. if not degrade audio quality

[1] https://en.wikipedia.org/wiki/Lossy_compression#Audio

Offline

#14 2013-04-19 06:09:42

Darksoul71
Member
Registered: 2010-04-12
Posts: 319

Re: Reliable way for lossless audio extraction of Youtube (Solved)

True, I do not disagree on this one....

Lossy to lossy has it's issues which one must understand. Then you can decide if you can live with the loss in quality or not.

For lossless extraction of any lossy format I think we both can agree on the fact that the extraction has then to be reliable smile

Also there are other reasons to convert lossy to lossy. For example when I want to listen to an audio file which is AAC but my player only support MP3.

Just as a sidenote: At least for my purposes I can hardly tell a difference between a 192 kBit MP3 generated from an AAC track extracted from Youtube. At least if the source has good quality. If the source had a bad quality (e.g. old audio play recorded from music cassette) then you will of course hear fragmentation and artifacts in the audio signal.


My archlinux x86_64 host:
AMD E350 (2x1.6GHz) / 8GB DDR3 RAM / GeForce 9500GT (passive) / Arch running from 16GB USB Stick

Offline

#15 2013-04-19 11:54:03

cookies
Member
Registered: 2013-01-17
Posts: 253

Re: Reliable way for lossless audio extraction of Youtube (Solved)

Darksoul71 wrote:

Just as a sidenote: At least for my purposes I can hardly tell a difference between a 192 kBit MP3 generated from an AAC track extracted from Youtube. At least if the source has good quality. If the source had a bad quality (e.g. old audio play recorded from music cassette) then you will of course hear fragmentation and artifacts in the audio signal.

That depends on the hardware used for output, too. I can listen to pretty much anything on my laptop and my laptop speakers will make it sound more or less like crap.

So, if you're using rather low quality hardware for output you may get away with transcoding, if you're using higher quality hardware you may hear differences.

Offline

#16 2013-04-20 09:43:28

Darksoul71
Member
Registered: 2010-04-12
Posts: 319

Re: Reliable way for lossless audio extraction of Youtube (Solved)

@cookies: True....but I mainly listen to stuff on my PC with quite good on-board sound (I consider most HD audio solutions integrated into the chipset as "ok" for my normal use) and via medium class Sony headset. Since I also watch BD stuff with DTS-HD / DTS Lossless / DTS on this box via headset I think I can judge the soundquality quite well smile

If you are listening to thing via cheap active plastic speakers, then things are looking different though wink

Last edited by Darksoul71 (2013-04-20 09:44:07)


My archlinux x86_64 host:
AMD E350 (2x1.6GHz) / 8GB DDR3 RAM / GeForce 9500GT (passive) / Arch running from 16GB USB Stick

Offline

#17 2013-04-22 18:09:35

cookies
Member
Registered: 2013-01-17
Posts: 253

Re: Reliable way for lossless audio extraction of Youtube (Solved)

Darksoul71 wrote:

@cookies: True....but I mainly listen to stuff on my PC with quite good on-board sound (I consider most HD audio solutions integrated into the chipset as "ok" for my normal use) and via medium class Sony headset. Since I also watch BD stuff with DTS-HD / DTS Lossless / DTS on this box via headset I think I can judge the soundquality quite well smile

Then you're doing better than me, because I'm using my mp3 player currently (hey, sounds better than my laptop wink ). I'm just to damn lazy to actually boot my desktop pc (no time for minecraft right now, so what's the point in booting?) and I can allways join my room mate in the living room.

If you are listening to thing via cheap active plastic speakers, then things are looking different though wink

Isn't it enough that it sounds different? There's absolutely no need for it to look strange, too, thank you very much wink

But seriously, it does not really matter how much transcoding between lossy formats degrades the audio quality, as long as you can say, "Yes, that sounds good, I'll listen to it happily.". The perceived audio quality is very subjective and can be highly biased. If you like the sound just go for it, in the end you are the judge.

Offline

#18 2013-04-23 02:29:26

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: Reliable way for lossless audio extraction of Youtube (Solved)

Next question!

So, thanks to this awesome thread, I now know how to do this:

  1. Use mplayer to play a video and look at the "Selected audio codec" line to find out what type of codec is being used.

  2. Use

    ffmpeg -i video.ext -acodec copy output.ext

    to rip the audio track.

Is there any way to have a script automatically determine the necessary file extension of the output?

Offline

#19 2013-04-23 04:59:38

Darksoul71
Member
Registered: 2010-04-12
Posts: 319

Re: Reliable way for lossless audio extraction of Youtube (Solved)

I grabbed a small Bash helper script somewhere which does this for me:

#!/bin/bash
mplayerlog="/tmp/mplayerlog.txt"

mplayer=$(which mplayer)

# Exit if mplayer is not installed
if [ -z "$mplayer" ]; then
  echo "Please install mplayer to run this script"
  read
  exit
fi


# Remove files from previous runs
if [ -e "$mplayerlog" ]; then
  rm -f $mplayerlog 
fi
 
# Run mplayer to write the video information into a text file
# md5sum is used for video output to suppress video output 
mplayer -identify -frames 10 -vo md5sum -ao null -really-quiet "$1"  &> $mplayerlog

# Clean up MD5 checksum file generated by mplayer
rm -f md5sums

# Extract video informations via mplayer log
vid_info=$(grep ID_ $mplayerlog | sed 's/ID_//')

echo $vid_info 

# Remove temporary files
if [ -e "$mplayerlog" ]; then
  rm -f $mplayerlog 
fi

I called the script getvidinfo and the commandline would be
> getvidinfo your-vid-file.ext

Output is typically something like that:

VIDEO_ID=0 AUDIO_ID=0 CLIP_INFO_NAME0=major_brand CLIP_INFO_VALUE0=mp42 CLIP_INFO_NAME1=minor_version CLIP_INFO_VALUE1=0 CLIP_INFO_NAME2=compatible_brands CLIP_INFO_VALUE2=isommp42 CLIP_INFO_NAME3=creation_time CLIP_INFO_VALUE3=2012-04-24 01:35:12 CLIP_INFO_N=4 FILENAME=Surviving Alone in Alaska.mp4 DEMUXER=lavfpref VIDEO_FORMAT=H264 VIDEO_BITRATE=4334112 VIDEO_WIDTH=1920 VIDEO_HEIGHT=1080 VIDEO_FPS=23.976 VIDEO_ASPECT=0.0000 AUDIO_FORMAT=MP4A AUDIO_BITRATE=151976 AUDIO_RATE=44100 AUDIO_NCH=2 START_TIME=0.00 LENGTH=3123.37 SEEKABLE=1 CHAPTERS=0 VIDEO_CODEC=ffh264 AUDIO_BITRATE=151976 AUDIO_RATE=44100 AUDIO_NCH=2 AUDIO_CODEC=ffaac EXIT=EOF

AUDIO_CODEC is what you want to watch out for smile

I do not have any bash code for this but typically I us a simple for loop in Python to go through the tags:

for vid_prop in vid_props:
         if vid_prop.find ('ID_LENGTH') <> -1:
           vid_length = vid_prop.split('=')[1].strip()
           # Calculate middle of video
           vid_pos = float (vid_length) / 2

A full code example in Python to get the audio codec would be something like this:

# Extract video infos from the source video via mplayer
      vid_props = os.popen ("mplayer -identify -frames 10 -vo null -ao null -really-quiet " + '"' + source + '"')
      # Loop through video properties to find out the length
      for vid_prop in vid_props:
         if vid_prop.find ('AUDIO_CODEC') <> -1:
           audio_codec = vid_prop.split('=')[1].strip()

HTH,
D$

Last edited by Darksoul71 (2013-04-23 05:00:56)


My archlinux x86_64 host:
AMD E350 (2x1.6GHz) / 8GB DDR3 RAM / GeForce 9500GT (passive) / Arch running from 16GB USB Stick

Offline

#20 2013-04-23 05:05:18

Darksoul71
Member
Registered: 2010-04-12
Posts: 319

Re: Reliable way for lossless audio extraction of Youtube (Solved)

Oh yeah, one thing I forgot to mention:
Mplayer with -dumpaudio in streamcopy did not work for me with Youtube videos. The resulting files were unplayable.


My archlinux x86_64 host:
AMD E350 (2x1.6GHz) / 8GB DDR3 RAM / GeForce 9500GT (passive) / Arch running from 16GB USB Stick

Offline

#21 2013-04-25 11:33:31

sl1pkn07
Member
From: Spanishtán
Registered: 2010-03-30
Posts: 371

Re: Reliable way for lossless audio extraction of Youtube (Solved)

about  getvidinfo...

i use mediainfo

Offline

#22 2013-04-27 16:51:28

Darksoul71
Member
Registered: 2010-04-12
Posts: 319

Re: Reliable way for lossless audio extraction of Youtube (Solved)

Nice, mediainfo seems to work better than the average ffmpeg / mplayer info and console parsing stuff...

Thanks for the hint. smile

Here is a modified version of yt2aac with integration of mediainfo (if anyone cares):

#!/usr/bin/python
# -*- coding: utf8 -*-

# Importiere OS Modul
import os

# Modul fuer reguläre Ausdruecke
import re

# Definition der unterstützten Dateiendungen
extensions = [ 'flv', 'mp4' ]

# Vergleichspattern "zusammenbauen"
pattern = ''

for n in extensions:
  # Trennzeichen anhängen, falls bereits pattern definiert sind
  if len(pattern) > 0: pattern += '|'
  pattern = pattern + n  + '|' + n.upper() 

# RegEx für gesuchte Dateiendungen zusammenbauen
expr = re.compile (".*\.(" + pattern  + ")$")

# Alle Dateien der aktuell bearbeiteten Verzeichnis einlesen
files = os.listdir('.')  

# Nur Mediadateien bearbeiten
for n in files:
  # Gefundene Mediadateien der Verarbeitungsqueue hinzufügen
  if expr.match (n): 
    # Nächsten Eintrag der Datei-Queue holen
    sourcefile = n

    # Extract video infos from the source video via mplayer
    media_infos = os.popen ('mediainfo "' + sourcefile + '"')
    
    AudioSection = 0
    
    # Loop through video properties to find out the audio codec
    for media_info in media_infos:
      if media_info.find ('Audio') <> -1 and media_info.find ('Format/Info') == -1:
        AudioSection = 1 
      if (AudioSection == 1) and media_info.find ('Format') <> -1:
         audio_codec = media_info.split(':')[1].strip()
         AudioSection = 0

    audio_file = sourcefile[:-3] + audio_codec.lower ()

    commandline = "ffmpeg -i \"" + sourcefile  +  "\" -acodec copy -vn -y \""+ audio_file + "\""
    print commandline
    os.popen (commandline) 

Last edited by Darksoul71 (2013-04-27 16:51:53)


My archlinux x86_64 host:
AMD E350 (2x1.6GHz) / 8GB DDR3 RAM / GeForce 9500GT (passive) / Arch running from 16GB USB Stick

Offline

#23 2013-04-27 18:33:34

Darksoul71
Member
Registered: 2010-04-12
Posts: 319

Re: Reliable way for lossless audio extraction of Youtube (Solved)

OK, I run into another "corrupt" AAC file again which was produced by the script above.

/usr/bin/mplayer -noquiet -nofs -nomouseinput -vc ffh264vdpau,ffmpeg12vdpau,ffwmv3vdpau,ffvc1vdpau, -sub-fuzziness 1 -identify -slave -vo vdpau -ao pulse -nokeepaspect -framedrop -nodr -double -input nodefault-bindings:conf=/dev/null -stop-xscreensaver -wid 52428835 -monitorpixelaspect 1 -noass -subfont-autoscale 1 -subfont-text-scale 5 -subcp ISO-8859-1 -subpos 100 -volume 11 -nocache -osdlevel 0 -slices -channels 2 -af scaletempo,equalizer=0:0:0:0:0:0:0:0:0:0 -softvol -softvol-max 110 /home/hb/dwhelper/Resistance D/Resistance D - 16.12.95 ( Live at Mayday ).aac

MPlayer svn r34540, built with gcc-4.6 (C) 2000-2012 MPlayer Team
mplayer: could not open config files /home/hb/.lircrc and /etc/lirc/lirc/lircrc
mplayer: No such file or directory
Failed to read LIRC config file ~/.lircrc.
Terminal type `unknown' is not defined.

Playing /home/hb/dwhelper/Resistance D/Resistance D - 16.12.95 ( Live at Mayday ).aac.
libavformat version 53.21.1 (external)
Mismatching header version 53.19.0
ID_AUDIO_ID=18
ID_VIDEO_ID=12
ID_VIDEO_ID=9
ID_AUDIO_ID=23
ID_AUDIO_ID=21
ID_AUDIO_ID=0
ID_VIDEO_ID=15
ID_VIDEO_ID=1
MPEG-PES file format detected.
MPEG: FATAL: EOF while searching for sequence header.
Video: Cannot read properties.
Load subtitles in /home/hb/dwhelper/Resistance D/
ID_FILENAME=/home/hb/dwhelper/Resistance D/Resistance D - 16.12.95 ( Live at Mayday ).aac
ID_DEMUXER=mpegpes
ID_AUDIO_FORMAT=80
ID_AUDIO_BITRATE=0
ID_AUDIO_RATE=0
ID_AUDIO_NCH=0
ID_START_TIME=unknown
ID_LENGTH=0.00
ID_SEEKABLE=1
ID_CHAPTERS=0
==========================================================================
Requested audio codec family [mpg123] (afm=mpg123) not available.
Enable it at compilation.
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
libavcodec version 53.35.0 (external)
Mismatching header version 53.32.2
[mp2float @ 0x7f6af6887380]Header missing
[mp2float @ 0x7f6af6887380]Header missing
[mp2float @ 0x7f6af6887380]Header missing
[mp2float @ 0x7f6af6887380]Header missing
[mp2float @ 0x7f6af6887380]Header missing
[mp2float @ 0x7f6af6887380]Header missing
Unknown/missing audio format -> no sound
ADecoder init failed :(
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
[mp2 @ 0x7f6af6887380]Header missing
[mp2 @ 0x7f6af6887380]Header missing
[mp2 @ 0x7f6af6887380]Header missing
[mp2 @ 0x7f6af6887380]Header missing
[mp2 @ 0x7f6af6887380]Header missing
[mp2 @ 0x7f6af6887380]Header missing
Unknown/missing audio format -> no sound
ADecoder init failed :(
Requested audio codec family [mad] (afm=libmad) not available.
Enable it at compilation.
Opening audio decoder: [hwmpa] MPEG audio pass-through (fake decoder)
AUDIO: 48000 Hz, 2 ch, mpeg2, 160.0 kbit/10.42% (ratio: 20000->192000)
ID_AUDIO_BITRATE=160000
ID_AUDIO_RATE=48000
ID_AUDIO_NCH=2
Selected audio codec: [hwmpa] afm: hwmpa (MPEG audio pass-through for hardware MPEG decoders)
==========================================================================
[format] Sample format big-endian MPEG-2 not yet supported 
Error at audio filter chain pre-init!

Exiting... (Fatal error)
ID_EXIT=ERROR

ffmpeg -i shows no error for the audio track...and it shurely is not MPEG2 smile

As it seems SMPlayer (or MPlayer to be more specific). Anyhow...I guess I simply need to switch over to another player for AAC files.

Thanks again for all the help....


My archlinux x86_64 host:
AMD E350 (2x1.6GHz) / 8GB DDR3 RAM / GeForce 9500GT (passive) / Arch running from 16GB USB Stick

Offline

#24 2013-05-02 17:50:22

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Reliable way for lossless audio extraction of Youtube (Solved)

Darksoul71 wrote:

Oh yeah, one thing I forgot to mention:
Mplayer with -dumpaudio in streamcopy did not work for me with Youtube videos. The resulting files were unplayable.

Maybe because

man mplayer wrote:

--dumpaudio
              Dumps raw compressed audio stream to ./stream.dump (useful with MPEG/AC-3, in most other cases the resulting file will not be playable).

Offline

Board footer

Powered by FluxBB