I seem to have a very strange problem- I have a Dell Latitude E6320 Laptop. This machine seems to be supported very well by Ubuntu. The problem that I am running into occurs with specific MP4 video files. All of my video files play fine through the laptop's speakers (using VLC), however, a handful of these files do not produce audio (only video) when using HDMI. I don't think that this is a configuration problem because I have several video files that do play fine through HDMI. All other audio plays fine through HDMI as well. So I think that this may be a codec problem but I can detect no differences between the particular files. I have installed the restricted extras and have even attempted to convert one of these problematic MP4 files to AVI via Handbrake- but still no audio over HDMI. Again all the video files play audio and video just fine when using the laptop's internal speakers. For the life of me, I can't understand why some MP4 files have no audio when switching the playback device to HDMI. Any thoughts?
EXACTLY Same here, the case would be worse if I use my usb-c hub to connect HDMI cable (ThinkPad E580 - Ubuntu 18.04)
It seems the problem is not the Files, But randomly the player changes the output profile!
You can Install
pavucontrol and in Playback Tab make sure that the player uses appropriate output profile (in your case HDMI output).