Youtube videos play 3 seconds with sound then fail. Topic is solved

Users and developers helping users with generic and technical Pale Moon issues on all operating systems.

Moderator: trava90

Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
EnglishMohican

Youtube videos play 3 seconds with sound then fail.

Unread post by EnglishMohican » 2017-10-29, 15:17

If I try to play a youtube video, I get about 3 seconds of video and sound, then both sound and video freeze while the download continues (I get the rotating circle symbol). When the download is complete, the video will start playing again - but there is no sound.

This also applies to non youtube videos such as that found on http://www.bbc.co.uk/html5.

If I move the block on the video position bar, I get another few seconds of sound at that position and then it freezes again (on the bbc link at least - but I am not sure I understand what is happening, other things seem to go on as well.)

I am running Pale Moon 27.5.1 but this also happens on 27.5.0 and 27.6.0a1 (29/10/17). It does not happen on firefox or opera - they play as you would hope.

My OS is opensuse 42.3 with libavcodec57 from Pacman (and dependencies). I have tried clearing cache, a different profile, restarting without add-ons and with flash disabled (but not removed). I have played with the MSE options and the behaviour described above is with "Use MSE asynchronously" unticked and "Enable MSE for WebM video" ticked. If I untick the latter, I get continuous video but no sound at all.

I am not using pulseaudio - the sound goes straight to alsa dmix. The alsa part of the sound set up works ok with mplayer, vlc, opera etc - but that is the area of the OS that I have been playing with recently (to get rid of pulseaudio). I understand that alsa is not your problem but Pale Moon appears to be involved at least.

After you last helped me, (with libavcodec) it all seemed to work fine (though with limited testing). Various (security, important) updates to the OS have been recommended by opensuse since then and implemented

Is this a known problem? Anything to do with the MSE improvements you are working on? If not, can anybody suggest an area for me to investigate as I have run out of ideas and clues.

(Edit to correct version of unstable)

Terryphi

Re: Youtube videos play 3 seconds with sound then fail.

Unread post by Terryphi » 2017-10-29, 15:55

BBC videos and YouTube videos play as expected for me using Pale Moon default video settings. I am using the latest unstable build on Linux Mint 18.2.

User avatar
Night Wing
Knows the dark side
Knows the dark side
Posts: 5170
Joined: 2011-10-03, 10:19
Location: Piney Woods of Southeast Texas, USA

Re: Youtube videos play 3 seconds with sound then fail.

Unread post by Night Wing » 2017-10-29, 16:23

Terryphi wrote:BBC videos and YouTube videos play as expected for me using Pale Moon default video settings. I am using the latest unstable build on Linux Mint 18.2.
Plays the entire 37 second video for me as well. I'm using 64 bit linux Pale Moon (27.5.1).
Linux Mint 21.3 (Virginia) Xfce w/ Linux Pale Moon, Linux Waterfox, Linux SeaLion, Linux Firefox
MX Linux 23.2 (Libretto) Xfce w/ Linux Pale Moon, Linux Waterfox, Linux SeaLion, Linux Firefox
Linux Debian 12.5 (Bookworm) Xfce w/ Linux Pale Moon, Linux Waterfox, Linux SeaLion, Linux Firefox

EnglishMohican

Re: Youtube videos play 3 seconds with sound then fail.

Unread post by EnglishMohican » 2017-10-29, 16:54

Thank you both. That seems to prove fairly clearly that it is not an inherent fault within Pale Moon.

@TerryPhi. By "default" do you mean that "Use MSE asynchronously" can remain ticked on the latest unstable build?

I guess that moves us onto the second part of my question. What libraries or features of the kernel or whatever are used by HTML5 downloads that could have this effect?

I suppose it could be the changes I have made to remove Pulseaudio but then why would that not be common to Opera and firefox. Presumably Opera could use a totally different set of libraries but firefox is surely similar-ish.

So the question now is "If its not Pale Moon itself, then what does Pale Moon use that Opera and firefox do not that could have changed over the last few weeks?"

Walter Dnes
Astronaut
Astronaut
Posts: 652
Joined: 2015-07-30, 20:29
Location: Vaughan, ON, Canada

Re: Youtube videos play 3 seconds with sound then fail.

Unread post by Walter Dnes » 2017-10-29, 20:21

If you go to "Edit ==> Preferences ==> Content" and uncheck Enable Media Source Extensiond (MSE) does that help? This setting has been the cause of various flakiness in the past.
There's a right way
There's a wrong way
And then there's my way

EnglishMohican

Re: Youtube videos play 3 seconds with sound then fail.

Unread post by EnglishMohican » 2017-10-29, 21:02

Thanks for the suggestion.

I tried it out. On youtube, the video runs smoothly but there is no sound.

The bbc test page fails with a message that the "content cannot be loaded". If I then re-enable Media Source Extensions, the video plays - with sound for 3 seconds or so (the time seems to get shorter each time I try it until something happens to reset it back to 3 seconds (not sure what, reload the page perhaps)).

I need to correct what I said in my first post, after the 3 seconds on the BBC page, I do not get a loading circle but the bar across the bottom continues to show data being downloaded. The block that tells us where in the bar the video has reached jumps to the end at the 3 second point and the video does not start playing when fully loaded. This change is due to me not reporting correctly rather than changing the "Enable MSE" setting.

Having got the BBC report wrong, I also rechecked what youtube did. I earlier stated that it continued to load and when it reached a full load it continued to play the video without sound. There were some large pauses in the download so it took some patience. I have just tried again and the video I have just tried paused so long that I gave up. So I know what I saw earlier but it does not happen always.

I am still open for further suggestions.

Walter Dnes
Astronaut
Astronaut
Posts: 652
Joined: 2015-07-30, 20:29
Location: Vaughan, ON, Canada

Re: Youtube videos play 3 seconds with sound then fail.

Unread post by Walter Dnes » 2017-10-30, 01:27

EnglishMohican wrote:Thanks for the suggestion.

I tried it out. On youtube, the video runs smoothly but there is no sound.
We're getting somewhere. There are 3 options under "Enable Media Source Extensions (MSE)". 2^3 = 8, so you can try a "brute-force attack" to see if any of them helps. First re-enable Enable Media Source Extensions (MSE)" and then uncheck all 3 options below it. You should see
[X] Enable Media Source Extensions
[ ] Use MSE asynchronously
[ ] Enable MSE for MP4 video
[ ] Enable MSE for WebM video

Close the "preferences tab and try the video. If that doesn't work, try with
[X]
[ ]
[ ]
[X]

Close the "preferences tab and try the video. If that doesn't work, try with
[X]
[ ]
[X]
[ ]

Close the "preferences tab and try the video. If that doesn't work, try with
[X]
[ ]
[X]
[X]

Close the "preferences tab and try the video. If that doesn't work, try with
[X]
[X]
[ ]
[ ]

Close the "preferences tab and try the video. If that doesn't work, try with
[X]
[X]
[ ]
[X]

Close the "preferences tab and try the video. If that doesn't work, try with
[X]
[X]
[X]
[ ]

Close the "preferences tab and try the video. If that doesn't work, try with
[X]
[X]
[X]
[X]
There's a right way
There's a wrong way
And then there's my way

EnglishMohican

Re: Youtube videos play 3 seconds with sound then fail.

Unread post by EnglishMohican » 2017-10-30, 21:21

Thanks for pursuing this. I have just spent two hours trying the experiment and then trying it again to make sure - and still not being totally sure.

I have used the two sites:- I wonder whether they serve different versions of the videos under different conditions.

Sorry it there is too much information - but it seemed better to provide more rather than less. The "XXXX" at the start of each line are the state of the selection boxes, 1 =ticked, 0 = not ticked.

0000 - (0) bbc - Plays video perfectly - with sound!
  • (0) youtube - Plays without sound - Video stuttered at first (as if the action was under a strobe light - it did follow an advert so that maybe the cause. Maybe a slight stutter when I tried again and the video played without an advert but much less.
1000 - (8) bbc - Plays video perfectly - with sound!
  • (8) youtube - Plays well without sound.
1001 - (9) bbc - Plays video perfectly - with sound!
  • (9) youtube - Plays sound for a few seconds - then freezes etc. Play/pause control fails to do anything after a few uses.
1010 - (A) bbc - Stalls after a few seconds. Loading appears to continue, that is, the pink bar
  • continues it's progress across the screen. The bar can be stopped by pressing pause and restarted from the postion it had reached by pressing play. Nothing makes the video move or sound re-appear. When it reaches the end of the bar, it appears to loop back to the beginning and continue loading - but still it does not play. BUT - if I press pause and then move the video position block backwards into the pink section it plays another burst of 2 or 3 seconds when I tap play then freezes again while loading continues. Then if left for a few seconds, sometimes it starts playing the video again - but without any sound.
    (A) youtube - Unlike above - there is no sound at any time. But the video plays continuously. Pausing and re-starting it works Ok, at least for the several times I tried it. Moving the play position makes no difference- it does not make sound appear.
1011 - (B) bbc - Just like the bbc version of (A) above
  • (B) youtube - Similar to bbc - the pause/play button stops working after a couple of pauses and starts. I have not seen it start to play the video again - but with pause/play not working - who knows.
1100 - (C) bbc - Plays perfectly - with sound. Seems to struggle to load at the start sometimes but could be coincidence.
  • (C) youtube - First time it played very judderingly without sound. Second time the same - third time it played fine but without sound.
1101 -(D) - Not a legal combination - bit 1 is greyed out.

1110 -(E) - bbc - As A and B
  • (E) - youtube - Plays fine but without sound at all. No ad this time
1111 -(F) - Not a legal combination - bit 1 is greyed out.

I hope you can deduce something from that. It appears that the "Enable MSE for MP4 video" breaks the BBC video but the youtube conclusion is more complicated.

Walter Dnes
Astronaut
Astronaut
Posts: 652
Joined: 2015-07-30, 20:29
Location: Vaughan, ON, Canada

Re: Youtube videos play 3 seconds with sound then fail.

Unread post by Walter Dnes » 2017-10-31, 03:39

We're getting to "grasping at straws" mode. Something that shouldn't help, but often does; in "about:config" set key
general.useragent.override.youtube.com to value
Mozilla/5.0 (Linux; X11; rv:53.0) Gecko/20100101 Firefox/53.0
Create the key if it doesn't already exist.
There's a right way
There's a wrong way
And then there's my way

EnglishMohican

Re: Youtube videos play 3 seconds with sound then fail.

Unread post by EnglishMohican » 2017-10-31, 09:51

I tried the override change that you suggested and worked through all the MSE options but it did not make any difference. I seem to have the option that the video plays well but without sound or I can have video and sound for a second or two and then it stalls.

I have been looking at the Youtube video debug data from the player under both Firefox and Palemoon. It is not easy to interpret but I cannot see any difference that amounts to a smoking gun.

The player does seem to be able to restart playing under certain conditions if I kick it in some way (Move the playing point for instance). My guess is that at startup and when kicked, Palemoon is able to fill the sound buffer - which then plays but that the signal from the buffer to give it some more data is going missing or being ignored. The video then stalls because it is trying to synchronise with sound which has stopped. The fact that firefox can play the video suggests that the hardware end of my sound chain is not the cause of the problem and the fact that others can play the videos on Palemoon suggests it is not the Palemoon code itself which is to blame so that just leaves the "library" code that I assume lies in-between. My library code is presumably different to Terrphi's and Night Wings.

I have no idea how to find the culprit so will presumably have to wait until my system updates and the videos start playing. I will let you know if that happens in the near future.

Thank you for your help.

Terryphi

Re: Youtube videos play 3 seconds with sound then fail.

Unread post by Terryphi » 2017-10-31, 10:09

EnglishMohican wrote:Thank you both. That seems to prove fairly clearly that it is not an inherent fault within Pale Moon.

@TerryPhi. By "default" do you mean that "Use MSE asynchronously" can remain ticked on the latest unstable build?
I know the discussion has moved on but I will answer your question. Yes. All video options are ticked except for Enable MSE for WebM video.

One more idea..... Check the about:config setting media.autoplay.enabled is set to true. This is the default setting. I previously tried changing it to false to stop irritating autoplays and it produced problems with some sites.

Locked