8

Which is the best browser to be used for playing YouTube videos on the Pi3. I currently use the Epiphany Web Browser which was provided by the Jessie OS on installation but i find that my videos playback is very choppy when they play even though the audio seems fine.

Is there something that I can download so that the videos stream fluently? I have a good internet connection and I do not wish to install another browser on my Pi as the general feedback from the Internet is that Epiphany is quite a nice browser.

I am currently using my Pi3 headless by SSHing into through WiFi.And I have the latest Raspbian Jessie OS

8
  • As an alternative, you can try VideoLAN (a.k.a. VLC). Commented Jun 25, 2016 at 21:03
  • @IsmaelMiguel How can you play YouTube via VLC?
    – Piotr Kula
    Commented Jan 5, 2017 at 9:21
  • @ppumkin File > Open from Network (or similar) or CTRL+N (if I'm not mistaken). Commented Jan 5, 2017 at 11:00
  • And you just paste the YouTube URL in there and it will play it? :D
    – Piotr Kula
    Commented Jan 5, 2017 at 11:01
  • 1
    Yes. Most videos work. They load at 720p or less. Also, it is Media, not File. Commented Jan 5, 2017 at 11:02

7 Answers 7

2

Even though the browser support HTML 5 video streaming the actual decoding of the stream is done using CPU as there is no implementation for the browser to use the build in hardware decoders.

I think the other problem is that desktop is also software rendered? (referenced from this forum post) So its an amplified problem where everything starts to chop out of control.

If you are streaming a high quality YouTube video then you will get this choppy'ness due to CPU struggling to keep up with rendering it to screen.

Kodi and XBMC have support for direct hardware decoding (and OpenGL UI rending) that is why videos can stream from Plex and other places at acceptable rates. (POssibly even plugins like YouTube)

2

The Raspberry Pi foundation does did indeed always suggest to use their epiphany browser due to optimizations. But they did admit that no work has been done on it for quite some time now and they really thinking about abandoning epiphany. scroll down to "Updates", then "One more Thing"

They recommend using the chromium browser instead with a plugin called "h264ify" that forces youtube to stream h264 which is supposed to decode better on the Pi.

I did this, tested it. I am not sure how it was before but it does stream OK when windowed. Still for me when you go 1080p and full screen its choppy like crazy.

I also enabled experimental GL and put 256MB for GPU.

1

So I too had jitter in the form of a hickup once every 5-10 seconds of Youtube video play at 720p on full screen while running a Raspberry pi 3 B+. Though in saying that, it did kinda mostly flow fine when in the smaller window. I am running an HDMI cable to an old TV monitor that really probably only does 720p but whatever.

The real trick was that I replaced my micro SD 32 gig chip with a better one. Yep, I know that you think that your class 10 chip is good enough and that's what I thought, but nowadays not all class 10 micro SD chips are the same, I bought a Sandisk Extreme plus with a V30 written on it. This simply means that it will move data in and out of the chip at more than 3 times the speed of your cheap class 10 micro SD card... which apparently is important!?

I actually won't claim to know why this is so important since I kinda thought that the internet content was simply heading straight into the processor and not even touching my Micro SD card, but hey, what do I know. Anyways, I also noted that my startup time for My RPi 3 B+ went from a 30 second time to get to the desktop to a 17 second time, I think that this is a tell-tale that things were sluggish with the old micro SD card that I had.

Anyways, the other improvements that I did were to update my Raspbian to whatever was current, maybe that wasn't really important, and to get a power supply that didn't always have a lightning bolt showing up on the top right hand of my screen... probably not critical either.

Either way I can now watch Youtube MMA action type Videos at full screen at 720p on Chromium without hickups. No re-writing of code needed here. Hope this helps.

1

You can play HD YouTube with terminal player omxplayer.

omxplayer video.file

You will need also youtube-dl for generating youtube url of the requested video by providing the ID of the video. The -g flag stands for get url

omxplayer `youtube-dl -g https://www.youtube.com/watch?v=<Video ID>`

By default it doesn't provide with the link for the best quality. You can set it manually by providing the -f flag and the number of the quality. To get all available quality use -F (files) flag

youtube-dl -F https://www.youtube.com/watch?v=<Video ID>

This will list all files related to the video. Some of the video files does not include an audio. Usually the 1080p video files are without sound, so you will need to play them both at the same time. I have made a bash script that can play 2 videos at the same time, you can play around https://github.com/kloshar4o/omxYouTube.

4
  • Basically, you're suggesting to download the whole video and play it locally ? What if it's a 5h long 1080p video ? Commented Apr 14, 2019 at 11:49
  • @ArthurAttout Of Course not, as mentioned above, -g flag gets the video url, and omxplayer will buffer it as a regular html video. Yes you can play 5h long video instantly, usually thats the point, I dont think you are willing to execute all this trouble for 3-4 min videos. I use this approach to play 2-3 hour 1080p music videos with my raspberry pi, and it works great.
    – Alexandr
    Commented Apr 16, 2019 at 7:23
  • Ooh okay, the thing is the name of the binary was quite misleading, because even the main page of youtube-dl itself says the utilitary is mainly used to download a youtube video. -g stands for : Simulate, quiet but print URL. I don't even think youtube-dl is necessary at this point then. I would try simply giving omxplayer the youtube link Commented Apr 16, 2019 at 7:30
  • That youtube-dl thing is clearly the strangest thing I've seen. When you query for a video with -g it yields back an http link on some weird google-like domain (https://r3---sn-cxab5jvh-cg0ez.googlevideo.com) with several parameters, including your public IP. Commented Apr 20, 2019 at 14:29
1

Testing out YouTube with a Raspberry Pi 3 Model B under Raspbian using Chromium I ran into the choppy video with good audio. I went into Preferences and changed the GPU from 64 to 128 and then to 256 and found that 256 worked great.

I was using a 23" 1920x1080 monitor, full screen over HDMI. Changing from full screen to windowed and back resulted in a bit of temporary choppiness at the 256 setting. I assume that changing from full screen to windowed put additional though temporary demands on the CPU that affected the video display.

I was using WiFi at the time. I would not be surprised if using an Ethernet cable rather than WiFi would help with video by improving throughput from a video source such as YouTube or other internet provider. At least it would reduce buffering issues which cause the displayed video to halt until the video data can catch up.

2
  • I don't quite get it. Did setting GPU memory to 256 helped with the choppy video, or did the video remain choppy? And how exactly does Ethernet factor into this? Commented Nov 14, 2019 at 16:06
  • 1
    @DmitryGrigoryev changing the GPU memory to 256 did help with the choppy video however there was still some stuttering under some conditions. There seems to be two main considerations for video. The first is the throughput of the video system and how fast it can build frames and deliver the frames to the display. Increasing the GPU memory helps with that. The other is the ability to get the video stream and its speed. Wired Ethernet with PI 3 is faster than WiFi through USB adapter. Commented Nov 14, 2019 at 17:43
0

Try installing chromium browser with the RPi-youtube addon - https://www.raspberrypi.org/forums/viewtopic.php?t=121195

0

I realize this is an old post. But just incase someone is still having issues like I was with choppiness.

I ended up disabling Hardware Acceleration within Chromium, plus upping my GPU memory to 256. Running so much better.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.