[mythtv-users] USB Soundcard, Tinny on just some media

Mark markhsa at shaw.ca
Mon Dec 15 23:04:43 UTC 2008


Rod Smith wrote:
> On Monday 15 December 2008 04:54:43 pm Mark wrote:
>   
>> Hello,
>> I have not been able to find anything in the archives on this.
>>
>> USB soundcard give occasional tinny sound.
>>
>> Fedora 10, HD-PVR, Trunk. Pulse Audio.
>> I am using an external Creative USB sound card. (
>> http://sg.creative.com/products/product.asp?category=209&subcategory=668&pr
>> oduct=15913 )
>>
>> When I use the build in sound on the MB ( Intel HD ) all is well, though
>> the volume is rather low even when maxed.
>> The USB sound is excellent on some media ( some mpg and avi ) but on
>> most it is tinny sounding.  All of the HD-PVR recordings give this tinny
>> sound.
>>     
>
> It could be that your USB sound "card" is capable of playing back sounds 
> recorded at certain sample rates (such as 48Kbps) but not at others (such as 
> 44.1Kbps). (Note that I'm talking about the sample rate, which is distinct 
> from the bitrate.) I suggest you try identifying the recording sample rate 
> (and other audio recording details, such as the codec used) for a sampling of 
> both good and bad files and look for a correlation. The midentify script, 
> which is installed on some systems but not others, will do this:
>
> $ midentify 4061_20081212205800.mpg
> ID_VIDEO_ID=0
> ID_AUDIO_ID=0
> ID_FILENAME=4061_20081212205800.mpg
> ID_DEMUXER=mpegps
> ID_VIDEO_FORMAT=0x10000002
> ID_VIDEO_BITRATE=8000000
> ID_VIDEO_WIDTH=720
> ID_VIDEO_HEIGHT=480
> ID_VIDEO_FPS=29.970
> ID_VIDEO_ASPECT=0.0000
> ID_AUDIO_FORMAT=80
> ID_LENGTH=2580.58
> ID_VIDEO_CODEC=mpegpes
> ID_AUDIO_BITRATE=384000
> ID_AUDIO_RATE=48000
> ID_AUDIO_NCH=2
> ID_AUDIO_CODEC=mad
>
> Note the ID_AUDIO_RATE value, which is "48000" above. It's conceivable that 
> the audio codec or other factors, such as the number of channels (which 
> midentify seems to get wrong when there are other than two channels, at least 
> for me) could be the culprit, so I recommend you take notes on anything with 
> AUDIO in the identifying name.
>
> In case your system doesn't have midentify, here it is:
>
> ------------- begin midentify ----------
> #!/bin/sh
> #
> # This is a wrapper around the -identify functionality.
> # It is supposed to escape the output properly, so it can be easily
> # used in shellscripts by 'eval'ing the output of this script.
> #
> # Written by Tobias Diedrich <ranma+mplayer at tdiedrich.de>
> # Licensed under GNU GPL.
>
> if [ -z "$1" ]; then
>         echo "Usage: midentify <file> [<file> ...]"
> 	exit 1
> fi
>
> mplayer -vo null -ao null -frames 0 -identify "$@" 2>/dev/null |
>         sed -ne '/^ID_/ {
> 	                  s/[]()|&;<>'"'"'\\!$" []/\\&/g;p
> 		         }'
> ------------- end midentify ----------
>
> If this hypothesis is correct, you may be able to adjust the audio sample rate 
> for analog encoding cards. The audio sample rate in digital TV signals is 
> harder to change, though; you'd need to transcode, or at least write a custom 
> script that demuxes the audio and video, re-encodes the audio, and remuxes it 
> back together again. Likewise for files obtained from the Internet or other 
> sources. In the long run it'd be easier to replace the USB sound "card," or 
> at least upgrade its drivers (if such an upgrade is available), if you need 
> to play many such files.
>
> Of course, my hypothesis may be wrong, in which case adjusting the recording 
> sample rate may not do any good.
>
>   

Interesting.  Here is what I get from files that have tinny sound:
ID_AUDIO_ID=4352
ID_FILENAME=/video2/1225_20081207233000.mpg
ID_DEMUXER=mpegts
ID_VIDEO_FORMAT=0x10000005
ID_VIDEO_BITRATE=0
ID_VIDEO_WIDTH=0
ID_VIDEO_HEIGHT=0
ID_VIDEO_FPS=59.940
ID_VIDEO_ASPECT=0.0000
ID_AUDIO_FORMAT=MP4A
ID_AUDIO_BITRATE=0
ID_AUDIO_RATE=0
ID_AUDIO_NCH=0
ID_LENGTH=0.00
ID_SEEKABLE=1
ID_VIDEO_CODEC=ffh264
ID_AUDIO_BITRATE=128000
ID_AUDIO_RATE=48000
ID_AUDIO_NCH=2
ID_AUDIO_CODEC=faad


And here is one that works:

ID_VIDEO_ID=0
ID_AUDIO_ID=1
ID_CLIP_INFO_NAME0=Software
ID_CLIP_INFO_VALUE0=VirtualDubMod\ 1.5.10.1\ \(build\ 2439/release\)
ID_CLIP_INFO_N=1
ID_FILENAME=Top\ Gear\ -\ 03x01\ -\ 2003.10.26.avi
ID_DEMUXER=avi
ID_VIDEO_FORMAT=XVID
ID_VIDEO_BITRATE=804608
ID_VIDEO_WIDTH=512
ID_VIDEO_HEIGHT=328
ID_VIDEO_FPS=25.000
ID_VIDEO_ASPECT=0.0000
ID_AUDIO_FORMAT=85
ID_AUDIO_BITRATE=102504
ID_AUDIO_RATE=0
ID_AUDIO_NCH=0
ID_LENGTH=3217.28
ID_SEEKABLE=1
ID_VIDEO_CODEC=ffodivx
ID_AUDIO_BITRATE=128000
ID_AUDIO_RATE=32000
ID_AUDIO_NCH=2
ID_AUDIO_CODEC=mp3


does that shed any light at all?


More information about the mythtv-users mailing list