[SOLVED] No sound on certain video files (44100 Hz sample rate)

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Monardo

[SOLVED] No sound on certain video files (44100 Hz sample rate)

Post by Monardo »

Hello,

I am pretty new to Linux environment.
I have installed Mint 18.1, which is mostly used as HTPC (to watch movies on TV connected with HDMI cable). Everything works fine, except that it does not play sound on certain video files. When I checked these files one-by-one, I found that all problematic ones have Codec: MPEG Audio layer 3 (mp3) and Sample rate 44100 Hz, while if the file has 48000 Hz (same codec), it plays fine. The video is fine for both..

Where is the problem? Is it driver? Is it codec?

Audio: Card-1 Intel 7 Series/C210 Series Family High Definition Audio Controller
driver: snd_hda_intel bus-ID: 00:1b.0

Motherboard: ASRock H77M ----> with Realtek ALC892 audio.

Please help with the problem.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: No sound on certain video files (44100 Hz sample rate)

Post by rene »

Monardo wrote:Where is the problem? Is it driver? Is it codec?
Or the TV not accepting 44100 over HDMI. Don't recognize the problem so non-authoratively: does it help any if you in /etc/pulse/daemon.conf uncomment the ; default-sample-rate = 44100 line, change it to 48000 instead and restart pulseaudio with pulseaudio -k (or reboot)?

If it doesn't help, I'd as a first test disconnect HDMI and plug in a few analog speakers to see if things do work then. f not, you have eliminated the HDMI/TV part of the equation...
phd21
Level 20
Level 20
Posts: 10104
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: No sound on certain video files (44100 Hz sample rate)

Post by phd21 »

Hi "Monardo",

Welcome to the wonderful world of Linux Mint and its excellent forum !

I just read your post and the good replies to it. Here are my thoughts on this as well.

It would help to know more about your system setup. If you run "inxi -Fxzd" from the console terminal prompt, highlight the results, copy and paste them back here, that should provide enough information.

How are you viewing the movies, are you using a multimedia player (if so, which one?), or media server / client (Kodi, Plex, Streamio, UMS, etc...), or what?

Have you installed "ubuntu-restricted-extras" , "mencoder", from the Software Manager or Synaptic Package Manager (SPM)? If not, I recommend doing that.

Hope this helps ...
Phd21: Mint 20 Cinnamon & KDE Neon 64-bit Awesome OS's, Dell Inspiron I5 7000 (7573, quad core i5-8250U ) 2 in 1 touch screen
Monardo

Re: No sound on certain video files (44100 Hz sample rate)

Post by Monardo »

Thank you for replies...

1. Here is the inxi output:

System: Host: LJHTPC Kernel: 4.4.0-93-generic x86_64 (64 bit gcc: 5.4.0) Console: tty 1
Distro: Linux Mint 18.1 Serena
Machine: Mobo: ASRock model: H77M Bios: American Megatrends v: P1.40 date: 07/12/2013
CPU: Dual core Intel Core i3-3225 (-HT-MCP-) cache: 3072 KB
flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 13171
clock speeds: max: 3300 MHz 1: 1600 MHz 2: 1599 MHz 3: 1599 MHz 4: 1599 MHz
Graphics: Card: Intel Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller bus-ID: 00:02.0
Display Server: X.org 1.18.4 drivers: intel (unloaded: fbdev,vesa)
tty size: 134x61 Advanced Data: N/A out of X
Audio: Card Intel 7 Series/C210 Series Family High Definition Audio Controller
driver: snd_hda_intel bus-ID: 00:1b.0
Sound: Advanced Linux Sound Architecture v: k4.4.0-93-generic
Network: Card: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
driver: r8169 v: 2.3LK-NAPI port: e000 bus-ID: 02:00.0
IF: enp2s0 state: up speed: 100 Mbps duplex: full mac: <filter>
Drives: HDD Total Size: 6161.2GB (47.4% used) ID-1: /dev/sda model: FUJITSU_MHW2160B size: 160.0GB
ID-2: /dev/sdb model: Hitachi_HDT72101 size: 1000.2GB
ID-3: /dev/sdc model: WDC_WD30EFRX size: 3000.6GB
ID-4: /dev/sdd model: WDC_WD20EFRX size: 2000.4GB
Optical: No optical drives detected.
Partition: ID-1: / size: 143G used: 11G (8%) fs: ext4 dev: /dev/sda1
ID-2: swap-1 size: 3.97GB used: 0.00GB (0%) fs: swap dev: /dev/sda5
RAID: No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors: System Temperatures: cpu: 55.0C mobo: N/A
Fan Speeds (in rpm): cpu: N/A
Info: Processes: 196 Uptime: 1:10 Memory: 989.5/3648.2MB Init: systemd runlevel: 5 Gcc sys: 5.4.0
Client: Shell (bash 4.3.481) inxi: 2.2.35

2. I mostly use Kodi (Krypton) to play videos, but the same result is with default media player (Xplayer?), mpv and vlc. There is one thing with vlc: if I change Audio Device (Menu>Audio>Audio Device) to "hda intel pch hdmi 1 direct sample mixing device" the movie gets sound. Does this tell you anything?

3. I will do some tests with TV and 44100 over HDMI as recommended, but I know for sure that previously I had Windows 7 with Kodi and all files had sound. I realize this might not prove anything, though.
phd21
Level 20
Level 20
Posts: 10104
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: No sound on certain video files (44100 Hz sample rate)

Post by phd21 »

Hi "Monardo",

Please run the "inxi -Fxzd" without using sudo or as a root user, just as a normal user. You can replace the results in your last reply...

You can try installing what I suggested before & mplayer, and perhaps looking for "mp3" stuff in the "Synaptic Package Manager (SPM)".

I do not seem to have a problem playing audio in either 44 or 48 frequencies.

Hope this helps ...
Phd21: Mint 20 Cinnamon & KDE Neon 64-bit Awesome OS's, Dell Inspiron I5 7000 (7573, quad core i5-8250U ) 2 in 1 touch screen
Monardo

Re: No sound on certain video files (44100 Hz sample rate)

Post by Monardo »

Wow it worked!!!

I feel so stupid as just an hour ago I already tried

Code: Select all

default-sample-rate = 48000
(found solution somewhere googling), but did not uncomment the line.

Thanks a lot rene for being so precise in instruction.

Could you explain what it does? Will it "upsize" the sample rate? If yes, will it be heavy on CPU (or something)?
phd21
Level 20
Level 20
Posts: 10104
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: No sound on certain video files (44100 Hz sample rate)

Post by phd21 »

Hi "Monardo",

I just thought of some other things to try and or consider. FYI: I do all three of these with all my Linux Mint systems (some of the first things I do). Reboot afterwards and retry.

Update: Couldn't you just uncomment (remove the semicolon: from sudo gedit /etc/pulse/daemon.conf)?

default-sample-rate = 44100
alternate-sample-rate = 48000


1.) Update to a current "ffmpeg" version3.

How to Install FFmpeg 3.2 (or newer) via PPA in Ubuntu 16.04
http://tipsonubuntu.com/2016/11/02/inst ... ntu-16-04/
To install this using the PPA method, open a console terminal, type in, or copy & paste, each line below one by one: Click "Select All" above command, right click the highlighted command, select Copy (or Ctrl+Insert), click in the console terminal window, and right click paste (or Shift+Insert), repeat for each command.

Code: Select all

sudo add-apt-repository ppa:jonathonf/ffmpeg-3

Code: Select all

sudo apt update && sudo apt install ffmpeg libav-tools x264 x265

2.) Update VLC

Code: Select all

sudo add-apt-repository ppa:videolan/master-daily

Code: Select all

sudo apt-get update

Code: Select all

sudo apt-get install vlc vlc-plugin-*
[/color]


3.) Change the Sound Settings "phonon Backend" from VLC to GStreamer.


Hope this helps ...
SystemSettings_AudioandVideo_Phonon1.jpg
Phd21: Mint 20 Cinnamon & KDE Neon 64-bit Awesome OS's, Dell Inspiron I5 7000 (7573, quad core i5-8250U ) 2 in 1 touch screen
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: No sound on certain video files (44100 Hz sample rate)

Post by rene »

Good. Yes, that is consistent with your previous post above: that "direct sample mixing device" is ALSA's dmix device, a device that allows multiple concurrent opens by mixing mutiple input streams into one output; does so by resampling all of them to a common rate and combining them, with that common rate being 48000 by default for dmix. Windows 7 probably does the exact same.

So, yes, your audio is being upsampled from 44100 samples per second to 48000 samples per second. Fidelity-wise upsampling is a lossless process (well, mathematically) and while it does indeed take a bit of CPU it's very minimal. Definitely nothing to worry about on your Core i3.

Do wonder a bit about the TV not accepting 44100 but for all I know this might in fact be semi-standard, or you might be able to adjust something in the TV's settings. Don't know much about TV's...
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: No sound on certain video files (44100 Hz sample rate)

Post by rene »

phd21 wrote:Update: Couldn't you just uncomment (remove the semicolon: from sudo gedit /etc/pulse/daemon.conf)?

default-sample-rate = 44100
alternate-sample-rate = 48000
That wouldn't be very useful. Those are the default values, as documented by those values being commented out. Updating ffmpeg or vlc won't help any: there's no local problem; only a TV not accepting 44100 over HDMI. I also somewhat doubt that he runs KDE on his HTPC.
Monardo

Re: No sound on certain video files (44100 Hz sample rate)

Post by Monardo »

Thanks all.

I guess this can be marked solved? How to do that?
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: No sound on certain video files (44100 Hz sample rate)

Post by rene »

Monardo wrote:I guess this can be marked solved? How to do that?
Clumsily. You go back to your original post, choose to "Edit Post" and change (only) the subject to include something like [SOLVED] at start or end.
Locked

Return to “Sound”