RpiName
Posts: 712
Joined: Sat Jul 06, 2013 3:14 am

UV4L No Limits! 720p HW-encoded H264 is now on the Web!

Thu Jan 14, 2016 8:42 pm

Another great win from the UV4L project http://linux-projects.org:
As promised, it's now possible to live stream hardware-encoded H264 HD video at full 30fps from the RaspberryPi 2 to any browser(*) "over the Web", with imperceptible delay and minimal CPU usage.

This is possible thanks to the WebRTC extension for UV4L. No configuration is required! No magic gstreamer sauce here! You just need a browser to see the video ...well, and speakers if you also want to get an audio stream from the Rpi ;)

Since this is WebRTC technology, experts may already know that it's always possible to build more complex scenarios on the top of UV4L! And nothing forbids us to add Full HD in the future.
Original news:
http://www.linux-projects.org/modules/n ... toryid=190

kiciek
Posts: 1
Joined: Wed Feb 03, 2016 2:57 pm

Re: UV4L No Limits! 720p HW-encoded H264 is now on the Web!

Wed Feb 03, 2016 3:11 pm

I have a problem with this feature. When I connect to WebRTC stream using Chrome or FF, using example page (http://www.linux-projects.org/downloads ... ample.html) or one hosted by Pi i can't get h.264 video. I get this output in console:

Code: Select all

 sudo uv4l -f -k --sched-fifo --mem-lock --config-file="/etc/uv4l/uv4l-raspicam.conf" --driver raspicam --driver-config-file="/etc/uv4l/uv4l-raspicam.conf" --server-option=--editable-config-file="/etc/uv4l/uv4l-raspicam.conf"
<notice> [core] Trying driver 'raspicam' from built-in drivers...
<warning> [core] Driver 'raspicam' not found
<notice> [core] Trying driver 'raspicam' from external plug-in's...
<notice> [driver] Dual Raspicam Video4Linux2 Driver v1.9.33 built Jan 17 2016
<notice> [driver] Selected format: 1280x720, encoding: h264, H264 Video Compression
<notice> [driver] Framerate max. 30 fps
<notice> [driver] ROI: 0, 0, 1, 1
<notice> [driver] H264 costant bitrate: 17000000
<notice> [core] Device detected!
<notice> [core] Trying to load the the Streaming Server plug-in...
<notice> [server] HTTP/HTTPS Streaming & WebRTC Signalling Server v1.1.44 built on Jan 23 2016
<warning> [server] SSL is not enabled. Using unsecure HTTP.
<notice> [core] Streaming Server loaded!
<notice> [core] Registering device node /dev/video0
<notice> [server] Web Streaming Server listening on port 8080
<notice> [server] WebRTC Renderer extension successfully loaded
<notice> [server] WebRTC, Signalling Server and STUN Server extensions successfully loaded
<info> [driver] Camera ready!
<info> [driver] Camera successfully initialized. Total memory available to the GPU: 256M
<notice> [core] Extension module detected!
<info> [driver] Close down completed, all components disconnected, disabled and destroyed
<info> [driver] Camera ready!
<info> [driver] Camera successfully initialized. Total memory available to the GPU: 256M
<info> [driver] Close down completed, all components disconnected, disabled and destroyed
<info> [driver] Camera ready!
<info> [driver] Camera successfully initialized. Total memory available to the GPU: 256M
<info> [driver] Close down completed, all components disconnected, disabled and destroyed
<info> [driver] Camera ready!
<info> [driver] Camera successfully initialized. Total memory available to the GPU: 256M
<info> [driver] Close down completed, all components disconnected, disabled and destroyed
<info> [driver] Camera ready!
<info> [driver] Camera successfully initialized. Total memory available to the GPU: 256M
<info> [driver] Close down completed, all components disconnected, disabled and destroyed
<info> [driver] Camera ready!
<info> [driver] Camera successfully initialized. Total memory available to the GPU: 256M
<info> [driver] Camera ready!
<info> [driver] Format changed:
        type:1
        width:640
        height:480
        sizeimage:460800
        pixelformat:842093913 YUV 4:2:0 Planar (I420)
        colorspace:0
        bytesperline:960
If I mark "force use of hardware codec and HD resolution, full framerate (min. 2000 kbps)" i get this format instead:

Code: Select all

<info> [driver] Format changed:
        type:1
        width:1280
        height:720
        sizeimage:1382400
        pixelformat:842093913 YUV 4:2:0 Planar (I420)
        colorspace:0
        bytesperline:1920
Any ideas how can I specify to stream h.264? Any idea why cam restarts many times? And why control panel has no effect?

Also, if i can get it to work, what h.264 settings are best for (WebRTC) streaming? UV4L offers few intra-refresh-mode profiles, and inline-headers.

RpiName
Posts: 712
Joined: Sat Jul 06, 2013 3:14 am

Re: UV4L No Limits! 720p HW-encoded H264 is now on the Web!

Wed Feb 03, 2016 8:09 pm

At the moment of writing only Firefox supports H264 (chrome will soon support it too). You should get the H264 stream from the Pi2 after checking the flag ""force use of hardware codec and HD resolution[...]" and clicking Start. If this does not work and you see no errors in the browser, it's hard to say what is happening, as the log seems ok. headers and intra-frames are streamed when needed (e.g. some packets are lost) periodic refreshes cannot be configured at the moment.

RpiName
Posts: 712
Joined: Sat Jul 06, 2013 3:14 am

Re: UV4L No Limits! 720p HW-encoded H264 is now on the Web!

Fri Feb 12, 2016 9:46 pm

According to http://linux-projects.org resolution selection up to Full HD in hardware-encoded H264 is now possible with UV4L:
Image

Alex19
Posts: 11
Joined: Thu Nov 19, 2015 9:28 am

Re: UV4L No Limits! 720p HW-encoded H264 is now on the Web!

Wed Mar 02, 2016 9:24 am

If it is possible a couple of questions.

1. Are there any plans for 1080p video 25fps?
2. Support for Google Chrome and work without SSL?
3. How to make it work on the tablet Android?

These are the main questions, there is also the little things.
1. If you select 720p, and click Go, codec error. When you first click Go, and then select 720p works.
2. The full window mode, the video looks like a square on a black rectangle. Who does not have access to send a photo, I try to send in the next couple of days.

Maybe I am doing something wrong.

Thanks in advance.

RpiName
Posts: 712
Joined: Sat Jul 06, 2013 3:14 am

Re: UV4L No Limits! 720p HW-encoded H264 is now on the Web!

Wed Mar 02, 2016 9:40 am

Alex19 wrote: 1. Are there any plans for 1080p video 25fps?
2. Support for Google Chrome and work without SSL?
3. How to make it work on the tablet Android?

These are the main issues, there is also the little things.
1. If you select 720p, and click Go, codec error. When you first click Go, and then select 720p works.
2. The full window mode, the video looks like a square on a black rectangle. Who does not have access to send a photo, I try to send in the next couple of days.
Answers:
1. in the future, for now 1080p is 15fps max with webrtc (lower res are 30fps). as usual mjpeg,h264 over http or anything different from webrtc is 30fps.
2. will work from the upcoming chrome v50 on. I think there are no plans to give an option to disable ssl (why would you want that?)
3. hw-encoded video should work already with Firefox at least (and chrome >v50, which is not out at the moment of writing)

1. which browser are you using? screenshot? try firefox, it should not happen.
2. yes, post a snapshot, i don't get what the problem is

Alex19
Posts: 11
Joined: Thu Nov 19, 2015 9:28 am

Re: UV4L No Limits! 720p HW-encoded H264 is now on the Web!

Wed Mar 02, 2016 10:03 am

RpiName wrote:
Alex19 wrote: 1. Are there any plans for 1080p video 25fps?
2. Support for Google Chrome and work without SSL?
3. How to make it work on the tablet Android?

These are the main issues, there is also the little things.
1. If you select 720p, and click Go, codec error. When you first click Go, and then select 720p works.
2. The full window mode, the video looks like a square on a black rectangle. Who does not have access to send a photo, I try to send in the next couple of days.
Answers:

2. will work from the upcoming chrome v50 on. I think there are no plans to give an option to disable ssl (why would you want that?)
3. hw-encoded video should work already with Firefox at least (and chrome >v50, which is not out at the moment of writing)

1. which browser are you using?
2. yes, post a snapshot, i don't get what the problem is
Thanks for the quick response.
RpiName wrote: 1. in the future, for now 1080p is 15fps max (lower res are 30fps)
I do not understand, 1080p 1920x1080 and you 1920x1072.
Image
RpiName wrote: I think there are no plans to give an option to disable ssl (why would you want that?)
I need create SSL certificate for each raspberry + load it on each computer. This is not a convenience to the user, but not critical.
RpiName wrote: 3. hw-encoded video should work already with Firefox at least (and chrome >v50, which is not out at the moment of writing)
Thank you, try will install Firefox on a tablet.
RpiName wrote: 1. which browser are you using?
2. yes, post a snapshot, i don't get what the problem is
Google 48.0.2564.116 m Win 7 64bit, photos can be done only tomorrow.

RpiName
Posts: 712
Joined: Sat Jul 06, 2013 3:14 am

Re: UV4L No Limits! 720p HW-encoded H264 is now on the Web!

Wed Mar 02, 2016 10:17 am

Alex19 wrote:I do not understand, 1080p 1920x1080 and you 1920x1072.
Yes, it's 1072 at the moment.
Alex19 wrote:Google 48.0.2564.116 m Win 7 64bit, photos can be done only tomorrow.
Is it chrome or chromium? which device? Consider h264 in chrome/chromium <= v49 unsopported essentially. I am rather surprised you could decode any h264 with v48.

Alex19
Posts: 11
Joined: Thu Nov 19, 2015 9:28 am

Re: UV4L No Limits! 720p HW-encoded H264 is now on the Web!

Wed Mar 02, 2016 10:54 am

RpiName wrote: Is it chrome or chromium?
Google Chrome - https://www.google.com/chrome/browser/desktop/
RpiName wrote: Consider h264 in chrome/chromium <= v49 unsopported essentially. I am rather surprised you could decode any h264 with v48
May be because installed expansion for H. 264 (h264ify), tried to other solutions.

Alex19
Posts: 11
Joined: Thu Nov 19, 2015 9:28 am

Re: UV4L No Limits! 720p HW-encoded H264 is now on the Web!

Thu Mar 03, 2016 8:28 am

In Mozilla Firefox.

There are no such problems
Alex19 wrote:I
1. If you select 720p, and click Go, codec error. When you first click Go, and then select 720p works.
2. The full window mode, the video looks like a square on a black rectangle. Who does not have access to send a photo, I try to send in the next couple of days.
In Google Chrome these problems they have.
Photo in attachment.
Google Chrome.jpg
Google Chrome.jpg (59.17 KiB) Viewed 27368 times
I hope you will do 1080p with 25 fps with a little lag. So far this is the best solution for me in browser. And Google Сhrome will also support this solution.

Thank you.

RpiName
Posts: 712
Joined: Sat Jul 06, 2013 3:14 am

Re: UV4L No Limits! 720p HW-encoded H264 is now on the Web!

Thu Mar 03, 2016 10:20 am

Alex19 wrote: In Google Chrome these problems they have.
That's very likely not h264 from the camera as Chrome does not support h264 yet, as I said. It probably is a 640x480 in VP8 that you made fullscreen. h264ify is for youtube streams and does not have anything to do with all this. Chrome v50 will be the first release with support for h264, so for now you should stick with firefox.

User avatar
gatherer
Posts: 14
Joined: Sat Oct 17, 2015 2:31 pm

Re: UV4L No Limits! 720p HW-encoded H264 is now on the Web!

Sat Mar 05, 2016 5:12 pm

Alex19 wrote:In Mozilla Firefox.

There are no such problems
Alex19 wrote:I
1. If you select 720p, and click Go, codec error. When you first click Go, and then select 720p works.
2. The full window mode, the video looks like a square on a black rectangle. Who does not have access to send a photo, I try to send in the next couple of days.
In Google Chrome these problems they have.
Photo in attachment.
Google Chrome.jpg
I hope you will do 1080p with 25 fps with a little lag. So far this is the best solution for me in browser. And Google Сhrome will also support this solution.

Thank you.
I have the same problem when streaming from one Pi to the other. It works best with ice weasel on the raspberry Pi, but reduces the width. This does not appear when it's streamed to a Laptop.
Any Ideas about solving the problem?

Buying Codecs for the RPI?

Special library needed?

Thank you

Alex19
Posts: 11
Joined: Thu Nov 19, 2015 9:28 am

Re: UV4L No Limits! 720p HW-encoded H264 is now on the Web!

Sun Mar 06, 2016 8:35 am

gatherer wrote:
Alex19 wrote:In Mozilla Firefox.

There are no such problems
Alex19 wrote:I
1. If you select 720p, and click Go, codec error. When you first click Go, and then select 720p works.
2. The full window mode, the video looks like a square on a black rectangle. Who does not have access to send a photo, I try to send in the next couple of days.
In Google Chrome these problems they have.
Photo in attachment.
Google Chrome.jpg
I hope you will do 1080p with 25 fps with a little lag. So far this is the best solution for me in browser. And Google Сhrome will also support this solution.

Thank you.
I have the same problem when streaming from one Pi to the other. It works best with ice weasel on the raspberry Pi, but reduces the width. This does not appear when it's streamed to a Laptop.
Any Ideas about solving the problem?

Buying Codecs for the RPI?

Special library needed?

Thank you
Try latest version Mozilla Firefox, on Raspberry I did not try, but on the laptop until it passed to him had problems.

Maybe RpiName will be able to respond more precisely. I did not buy any codecs, additional libraries are not set.

telecom
Posts: 55
Joined: Fri Feb 13, 2015 7:47 pm
Location: Toronto, Canada

Re: UV4L No Limits! 720p HW-encoded H264 is now on the Web!

Mon Apr 04, 2016 5:29 pm

Having problems installing UV4L.
Using Jessie on Raspberry PI 2.
When typing: sudo apt-get install uv4l uv4l-raspicam
getting:command not found

please help - I need no latency streaming!

telecom
Posts: 55
Joined: Fri Feb 13, 2015 7:47 pm
Location: Toronto, Canada

Re: UV4L No Limits! 720p HW-encoded H264 is now on the Web!

Mon Apr 04, 2016 5:31 pm

Never mind - working from the home directory!
Sorry!

telecom
Posts: 55
Joined: Fri Feb 13, 2015 7:47 pm
Location: Toronto, Canada

Re: UV4L No Limits! 720p HW-encoded H264 is now on the Web!

Mon Apr 04, 2016 6:17 pm

Now I've installed just about everything, I can see the server at the localhost:8080 ,
but when I click on the MJPEG/Stills stream, nothing comes out....
Please help!

wese
Posts: 6
Joined: Thu Jul 07, 2016 2:22 pm

Re: UV4L No Limits! 720p HW-encoded H264 is now on the Web!

Thu Jul 07, 2016 2:40 pm

Hi,

i'm using uv4l-uvc with usb camera and don't seem to get the hw-encoding work. Without hw-encoding the videostream from https://rpi:8090/stream/webrtc works fine but when I tap the encoding on, there's no picture. Before i had problem with preloading libuv4lext.so library and had to add option --extension-presence=1 when starting uv4l. Maybe the problem is connected to that?

Also I'm using firefox as a browser.

RpiName
Posts: 712
Joined: Sat Jul 06, 2013 3:14 am

Re: UV4L No Limits! 720p HW-encoded H264 is now on the Web!

Thu Jul 07, 2016 10:07 pm

wese wrote: i'm using uv4l-uvc with usb camera and don't seem to get the hw-encoding work. Without hw-encoding the videostream from https://rpi:8090/stream/webrtc works fine but when I tap the encoding on, there's no picture.
it depends on your specific webcam. if you can get an official rpi camera board instead, that would would be fine.

baerX63
Posts: 7
Joined: Mon Jan 23, 2017 2:48 pm

Re: UV4L No Limits! 720p HW-encoded H264 is now on the Web!

Wed Feb 15, 2017 7:14 am

I also have a comprehensive problem with encoding/decoding mechanism from the uv4l driver of the given Linux project.
I've take in the raspicam.conf for encoding h264. It is also in the command prompt written when i manually start uv4l. But when i switch while streaming (default page)to the camera control panel the format is YUV so i think the pi not really take the assisted hardware encoding h264 from the broadcom one which i want. Or isn't that correct? Normally the Browser has to decode?

Best regards
Philipp

uday3
Posts: 2
Joined: Wed Jul 19, 2017 8:25 am

Re: UV4L No Limits! 720p HW-encoded H264 is now on the Web!

Sat Jul 29, 2017 10:36 am

If i'm streaming this over Wifi and onother device is connected to same wi-fi then for streaming if i need active internet connection ection? i just want to know that if it is local streaming or thewhich i'm playing i been uploaded to cloud amd then played on another vedio? if this so the streaming speed will totally depend on the internet speed amd that may create delay!! please help

xenoglyph
Posts: 1
Joined: Tue Nov 07, 2017 8:51 pm

Re: UV4L No Limits! 720p HW-encoded H264 is now on the Web!

Tue Nov 07, 2017 8:55 pm

Where does UV4L list the copyright information for the Broadcom/Raspberry Pi code that it incorporates?

RpiName
Posts: 712
Joined: Sat Jul 06, 2013 3:14 am

Re: UV4L No Limits! 720p HW-encoded H264 is now on the Web!

Wed Nov 08, 2017 1:07 am

xenoglyph wrote:
Tue Nov 07, 2017 8:55 pm
Where does UV4L list the copyright information for the Broadcom/Raspberry Pi code that it incorporates?
Which code? There is no code copyrighted by Broadcom or Raspberry Pi "incorporated" in the UV4L packages or binaries.

Return to “Camera board”