pbill
Posts: 31
Joined: Fri Oct 26, 2012 12:01 pm

[Q] Multiple Resolution Encoding Simultaneously

Wed Dec 18, 2013 6:41 pm

Have seen lots of work around the encoding pipeline recently; very excited to test many of these. One question I have is around multiple simultaneous encodes of the camera. My understanding is that 1080p30 @ 25Mbit is the max bandwidth for the encoder... so, what about something like the following:

1080p30 @ 16Mbit
720p30 @ 6Mbit
480p30 @ 1Mbit
240p10 @ .2Mbit

Could this be done with an RPi at stock speeds? If not, what if it were overclocked slightly? Is this a potential?

Or, if using VBR rather than CBR, would it make a difference?

I would love to try something like this... are there any tools around that allow simultaneous encodes of the camera input?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26454
Joined: Sat Jul 30, 2011 7:41 pm

Re: [Q] Multiple Resolution Encoding Simultaneously

Wed Dec 18, 2013 9:07 pm

You can instantiate more than one encoder component, I think. Use a splitter component to split the stream and pass it in to multiple encoders.

I have no idea whether that will work, but its theoretically possible.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

pbill
Posts: 31
Joined: Fri Oct 26, 2012 12:01 pm

Re: [Q] Multiple Resolution Encoding Simultaneously

Wed Dec 18, 2013 9:56 pm

Interesting. Are you aware of any examples of use of the MMAL splitter component?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26454
Joined: Sat Jul 30, 2011 7:41 pm

Re: [Q] Multiple Resolution Encoding Simultaneously

Thu Dec 19, 2013 9:05 am

pbill wrote:Interesting. Are you aware of any examples of use of the MMAL splitter component?
Nope.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

lagurus
Posts: 48
Joined: Wed Aug 07, 2013 8:02 am

Re: [Q] Multiple Resolution Encoding Simultaneously

Thu Dec 19, 2013 11:32 am

pbill wrote:Interesting. Are you aware of any examples of use of the MMAL splitter component?
I think wibble82 use splitter in his C++ api http://www.raspberrypi.org/phpBB3/viewt ... 90#p442790
Try also his blog http://robotblogging.blogspot.co.uk/201 ... age-4.html

But anyway I don't think that RPi is capable of creating 4 multiple H264 streams at 30fps simultaneously. You can expect lower
fps.

Generally: Is possible to create multiple H264 streams with different fps? For example one at 25fps and second at 5fps?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26454
Joined: Sat Jul 30, 2011 7:41 pm

Re: [Q] Multiple Resolution Encoding Simultaneously

Thu Dec 19, 2013 2:02 pm

lagurus wrote:
pbill wrote:Interesting. Are you aware of any examples of use of the MMAL splitter component?
I think wibble82 use splitter in his C++ api http://www.raspberrypi.org/phpBB3/viewt ... 90#p442790
Try also his blog http://robotblogging.blogspot.co.uk/201 ... age-4.html

But anyway I don't think that RPi is capable of creating 4 multiple H264 streams at 30fps simultaneously. You can expect lower
fps.

Generally: Is possible to create multiple H264 streams with different fps? For example one at 25fps and second at 5fps?
I think the limitation is the max bitrate, rather than the framerate, so you could choose appropriate numbers to stay within the maximum bitrate. But I'll check with the people who know to see if I am right.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

lagurus
Posts: 48
Joined: Wed Aug 07, 2013 8:02 am

Re: [Q] Multiple Resolution Encoding Simultaneously

Thu Dec 19, 2013 4:20 pm

jamesh wrote: I think the limitation is the max bitrate, rather than the framerate, so you could choose appropriate numbers to stay within the maximum bitrate. But I'll check with the people who know to see if I am right.
I think that bigger limitation in pbill solution can be using of resizer to get required resolutions. He wants to get 4 resolutions
(1080p30,720p30,480p30,240p10). In my opinion is needed to use splitter and then 3 resizers, which were in my tests
slow. Or exists any more effective solution?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26454
Joined: Sat Jul 30, 2011 7:41 pm

Re: [Q] Multiple Resolution Encoding Simultaneously

Thu Dec 19, 2013 4:56 pm

lagurus wrote:
jamesh wrote: I think the limitation is the max bitrate, rather than the framerate, so you could choose appropriate numbers to stay within the maximum bitrate. But I'll check with the people who know to see if I am right.
I think that bigger limitation in pbill solution can be using of resizer to get required resolutions. He wants to get 4 resolutions
(1080p30,720p30,480p30,240p10). In my opinion is needed to use splitter and then 3 resizers, which were in my tests
slow. Or exists any more effective solution?
Lots of resize will certainly saturate the resizers and also probably the SDRAM bandwidth. Good point.

Although having spoken to someone who knows, my comment above is a load of old cobblers. The maximum is related to the amount of macroblocks that can be processed in the frame time, not the max bit rate. Since 1080p30 is pretty much the upper limit of macroblock processing, you will need to reduce frame rate or frame size to encode more than one stream at a time.

My mistake was confusing the 3D performance with the encoder performance. Soz.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

Return to “Camera board”