Jump to content

Can H3 or H5 support multiple ( different) TVout and HDMI outputs?


Recommended Posts

How about H2, as in OPi 0?

 

H2, H3 and H5 all can output simultaneously to different displays (OPi Zero not of course since there's just CVBS available on the 13-pin header and no HDMI).

 

It depends on settings, with legacy kernel it's disp init configuration (look through one of the fex files with comments, eg. the one for OPi Plus). Disclaimer: Never did this myself with H3 (only on an A20 device and there combining HDMI with LCD)

Link to comment
Share on other sites

To be honest: I use those SBC more or less headless all the time so am not the best person to answer display questions. My assumptions are based on looking through settings so reality might differ.

 

BTW: R40 for example should be able to use HDMI + LCD + 2 x CVBS: https://github.com/BPI-SINOVOIP/BPI-M2U-bsp/blob/4e8b4174cabec45c775ac38696af9c7d2693f60f/sunxi-pack/allwinner/azalea-m2ultra/configs/BPI_M2U_1080P/sys_config.fex#L687-L764 (but then it depends what the device in question physically exposes).

Link to comment
Share on other sites

Thanks tkaiser :) Really appreciate your good work and If it's.

 

My question was about more than one HDMI and TVout each....so such simultaneous, different outs are possible as long as there are enough pin config?

H3 only has one hdmi output, so only one. But you can use a splitter, if the image will be the same on all tvs

Link to comment
Share on other sites

H3 only has one hdmi output, so only one.

 

If the question was about HDMI + TV Out at the same time then this should be possible (using appropriate settings). In the past Allwinner SoCs targeted tablet market and there simultaneous display output to LCD and HDMI was necessary. In the meantime they advertise solutions for automotive usage (entertainment display + rear view mirror + ...) where more than 2 displays have to be supported at the same time. OTT box SoCs (H2, H3, H5) are somewhere in between I would assume).

 

But it all depends on settings/software too and we made the experience not just once that the code drops from Allwinner are barely tested.

Link to comment
Share on other sites

OK. Want to clarify that I am asking for same time, but *different* streams, not duplicates, out of HDMI and TVout.

 

For example, can PC or PC2 do 4 different outputs: one HDMI stream, 3 different TVouts ( meaning can we add two additional TVouts )?

 

Here is an interesting idea that talks about different simultaneous outputs using VLC, but from one tuner essentially, by copying the original input stream multiple times.

https://evilshit.wordpress.com/2013/08/10/how-to-stream-multiple-tv-channels-with-a-single-dvb-t-tuner-using-vlc/

 

But really my question is multiple tuners pumping video out of HDMI and TVout pins/ connections...if possible do we need any hardware and kernel tweaks, or it should just work with enough processor and memory?

 

Will the OPi PC or PC2 have enough resources to outout one 720p HDMI and 2-3 SD TVout streams, all different?

 

Think of this as supporting multiple TV sets with remote control devices connected to the same media player PC/2 box?

Link to comment
Share on other sites

Well, it's rather easy: take any of the available SBC you want to use and count physical connectors for a display. There's one HDMI and one CVBS max (in case you have a SoC that can output more you need a device that exposes these pins).

 

If you want to implement same output on more than one display then you can use a 'mirrored' solution (no need to duplicate anything). If you want to use different display output it gets interesting since then you must target different framebuffers and I've not the slightest idea how HW accelerated video decoding works in such a scenario.

 

You might also consider that we've barely any feedback on using TV Out with H3 devices at all or dual display usage. Maybe someone a bit more familiar with display stuff joins the thread.

Link to comment
Share on other sites

Tkaiser,

 

I am certainly looking at different display outputs.

 

Then we have questions of whether HW acceleration for one 720p and 3 480/576p outputs is even necessary...if not then maybe VLC can do the job.

 

Second, is there really other HW/ kernel constraints for above.

 

So yes OPi or some other folks need to shed some light on this bit unusual question.

 

But that is what such forums are about...for now Steven @OPi hasn't said ( or understood) much. OTOH, this should be a common design issue for any number of boards... perhaps there might be a rule of thumb?

 

I appreciate your and other responses. Learned a few things from your cnxsoft comments.

Link to comment
Share on other sites

jernej,

 

Maybe the simultaneous, different video outputs are not really a HW acceleration issue ( GPU oriented), but a video software one?

 

I just saw this video, 2min ( screens show on 1: 30min), where VLC is streaming multiple, different videos on same screen:

 

https://m.youtube.com/watch?v=NKEm2QbYgck

 

My friend just told me that on his Mac, he opened 8 windows, 5 under QuickTime, 3 under VLC, and they all were running different videos. The audio sounded a garbled mix of all 8 outputs !

 

So if this is true, perhaps most HW acceleration has this capability baked in?

And diff display outputs can also be used, e.g. HDMI + TVout + USB on OPi PC Plus etc?

 

tkaiser,

 

What might legacy kernel display init do here, as you pointed above?

Link to comment
Share on other sites

jernej,

 

Maybe the simultaneous, different video outputs are not really a HW acceleration issue ( GPU oriented), but a video software one?

 

I just saw this video, 2min ( screens show on 1: 30min), where VLC is streaming multiple, different videos on same screen:

 

 

My friend just told me that on his Mac, he opened 8 windows, 5 under QuickTime, 3 under VLC, and they all were running different videos. The audio sounded a garbled mix of all 8 outputs !

 

So if this is true, perhaps most HW acceleration has this capability baked in?

And diff display outputs can also be used, e.g. HDMI + TVout + USB on OPi PC Plus etc?

 

You honestly making assumption base on completely different architecture? Making assumptions is usually bad, making them based on completely unrelated HW is even more bad. Oh, BTW, GPU doesn't do video decoding, unless you abuse shaders (not the case here).

 

Yes, you can run multiple players, but AFAIK VLC currently can't use HW acceleration for decoding, but mpv can. However, I don't think that libvdpau-sunxi can be used for multiple streams at the same time. I'm also not sure how many streams 4 ARMv7 cores are capable of decoding at the same time. I would guess two at the most, if resolution is low enough.

 

Maybe it is time to make some tests instead of making assumptions? AFAIK you are the first with such requirements. First, you can have only one HDMI and one TV out (I checked datasheets). While fex file allows you to initialize (enable) both of them, you can select only one as the output. Maybe there is some way to activate another through ioctl interface. But, unfortunatelly, there is one big issue if both outputs are enabled at the same time. HDMI output will show artifacts every 15 seconds or so. I suggest you test this first - just enable TV in fex file and watch HDMI output for a few minutes. It might be that this won't be an issue with your setup, because you don't need GPU, but anyway, test it first. Next test would be if you can actually run so many streams. I would say that you should open few different streams using mpv and see if there are any issues. If this is still ok, then you can try to find a way to have both outputs active at the same time. Based on what I saw in the driver, I doubt, but I can be wrong.

Link to comment
Share on other sites

jernej,

 

Thanks for offering your comments.

 

I am asking questions not making assumptions :)

 

To me it is strange that a quad core H3 seems so hampered with video streaming where PC and Mac seem to do fine.

 

tkaiser said starting on post#2 H2+/H3/H5 can do simultaneous outputs perhaps thru disp init configuration on legacy kernel, but he tried only on A20 with HDMI + LCD.

 

Can't be an ARM limitation since VLC does fine on ARM too?

 

I do plan on testing once I get my OPis that I ordered Dec 19.

 

What is the definition of HW decoding here? Where is it done, as I read yesterday that in ARM, unlike x86, GPU is only used for 3D ( not the case here?)

 

So GPU here is just a game processing unit? Or, can GPU help with video processing in any way? Seems a big waste otherwise.

 

I am surprised that a versatile VLC cannot be used with HW decoding here. Any reasons? Is this a kernel version issue, 3.4 v 4.9?

 

Can we also video output from USB/ WiFi besides HDMI and TVout?

 

I truly appreciate you folks' great volunteer efforts, and do believe that OPi+ Armbian is the best price/performance out there.

 

This multi-streaming problem question is a first-ask, but very interesting since PC/ Mac folks do it all the time with VLC.

 

Don't think Allwinner will respond. Steven@OPi first said yes then no. Same with Friendly ARM, whose NanoPi M1 photo and text specifically said few months ago that it supports different simultaneous outputs from HDMI and TVout, which motivated me.

 

So I am assuming that OPi and FA know something they can't share now.

Link to comment
Share on other sites

I am asking questions not making assumptions ! To me it is strange that a quad core H3 seems so hampered with video streaming that PC and Mac seem to do fine.

It's not a good idea to compare desktop systems with embedded systems, and price may be a good indication of what can be expected from ARM based SBCs (with the architecture being the other significant difference).

 

What is the definition of HW decoding here? Where is it done, as I read yesterday that in ARM, unlike x86, GPU is only used for 3D ( not the case here?)

Not in GPU, each vendor may implement a video decoding engine if needed, for Allwinner based SoC video decoding is done by the Video Engine.

 

I am surprised that a versatile VLC cannot be used with HW decoding. Any reasons?

Purely software / API reasons, any player can use video decoding on H3/H5 (in Debian/Ubuntu and we are talking about OSS stuff) as long as it works with VDPAU API. In case of VLC it may need extra configuration or recompilation, in case of mpv it works almost out of the box in Xenial and in Jessie.

 

Why cannot we also video output from USB besides HDMI and TVout?

Who said that? Anything is possible if there is a proper in-kernel support for these USB video adapters.

Link to comment
Share on other sites

zador,

 

Thanks.

 

1. So is there existing OPi0 support for USB/ WiFi video streaming, regardless of multi-streaming?

 

I am still confused about 3.4 v 4.9 kernel support due to rapid pace of work.

 

Is it true that Armbian currently only needs update WiFi driver for "full" 4.9 kernel? What else might be missing?

 

2. So for video streaming purposes Mali 400 GPU is redundant? All load is on CPU cores? Can H2+ do a total load of 1080@60fps with some processing left over with 512 MB RAM, or even 256MB?

 

3. Tried reading mpv v VLC online, including mpv Wikipedia. Not much info for comparison.

 

Looks like mpv does have extensive libraries like VLC, and is just a new open source alternative.

 

I guess VLC GUI is not a requirement, but nice to know about support via recompilation.

 

4. Basically I am looking at OPi0 as a cheap media player that can input an MPEG 4 TS ( transport stream with multiple video TV channels, EPG and control stuff), and output to one or multiple TV sets (HDMI, TVout- RCA, even via USB using MHP format like USB- HDMI or USB- RCA/ S- video. These converters look cheap on AliExpress, $2-8.)

 

TV channels on each TV set will be selected by IR remote control handsets using, e.g., LIRC. Essentially the input MPEG 4 TS stream will be decoded ( hopefully no need for CPU intensive transcoding) and TV channels output via RC as digital as-is ( HDMI ), or DAC converted for analog RCA/ S- video output via TVout or USB MHP.

 

It sounds a new idea here, but it has good price/performance potential compared with LCD or other text displays, within a LAN :)

Link to comment
Share on other sites

2. So for video streaming purposes Mali 400 GPU is redundant? All load is on CPU cores? Can H2+ do a total load of 1080@60fps with some processing left over with 512 MB RAM, or even 256MB?

 

Yes, GPU is used only for OpenGL ES, nothing else, so it doesn't help you. H3 has support for HW accelerated decoding via libvdpau-sunxi library. I'm not sure if it supports decoding multiple stream at the same time, but one thing is sure. HW accelerated rendering is supported only on native screens, e.g. HDMI or TV out, not on screens attached through USB. Everything you describe is perfectly doable if you limit yourself to 1 output and 1 stream. Everything else is just a guess until some experiments are done.

 

BTW, OPiZero has only TV out, no HDMI. TV out is limited to standard PAL or NTSC resolution. With current H3/H2+ TV out driver you can't select another resolution.

 

I'm very skeptical about your goals, but you can always prove me wrong.

 

P.S.: A20 has compeletely different video HW and driver has support for at least screen mirroring, probably even for dual display. That is not the case for H3.

Link to comment
Share on other sites

jernej,

 

So we are getting somewhere ;)

 

Yes, my questions are for OPis. OPi0 only has TVout + USBs, of course.

 

1. So you are saying it is a driver issue, not an H3 issue?

 

2. Is it possible to substitute another driver, or will H3 HW decoding only run with vdpau* ?

 

How about without HW decoding, or will video decoding get horribly slow?

 

3. What is the role of mpv here?

 

4. How does USB then output, say a 1280 x720 or 720p stream?

 

I have to wait for my OPi0x2, expansion board, OPi PC Plus, OPi Lite + camera I ordered Dec 19 from AliExpress. Tracking shows they still haven't shipped from China after customs clearance.

 

Surprisingly my CHIPs arrived within 11 days, to Toronto, shipped by Next Thing Co, Burlington, Ontario. And the solder iron set from AliExpress.

 

I plan to run Armbian OS on CHIP too, once I get some other parts including power supply, breadboard etc. Hope they have stuff working after "mainlining" in June.

Link to comment
Share on other sites

1. So you are saying it is a driver issue, not an H3 issue?

 

Which driver do you have in mind? For HW accelerated video decoding or for multiple video outputs?

 

2. Is it possible to substitute another driver, or will H3 HW decoding only run with vdpau* ?

 

How about without HW decoding, or will video decoding get horribly slow?

 

Well, there is another, Allwinner provided library for video decoding, which can't be used anywhere unless you write your own program, because it doesn't use any standard interface. Allwinner library claims that it can be used with multiple streams at the same time, but I didn't see any proofs for that. libvdpau-sunxi is the only other library, which is written by community, it's open source and uses standard interface, which means it can be used with most other programs. However, it doesn't implement interface fully, so some programs might have some issues with it. I think VLC falls into this category.

 

CPU is definetly capable of decoding one stream by CPU if resolution is not too big. I didn't make any tests for resolution or how many streams is possible to run . Currently I don't have HW at hand to test any of this.

 

3. What is the role of mpv here?

 

It is recommended program for libvdpau-sunxi. Of course you might find another one which is working fully, but this is tested the most.

 

4. How does USB then output, say a 1280 x720 or 720p stream?

 

You must know that usb 2.0 has limited throughput, around 35 MiB/s. For 1280x720 @ 60Hz in YUV420 color space (1.5 B/pixel) you need ~80 MiB/s of throughtput. A top of that, I don't know if your output USB device supports YUV420 color space. If it supports only RGB, it means 3 B/pixel, which means 2 times of YUV420 throughput. But because I don't know nothing about USB output devices, I might be completely mistaken and they found some kind of efficient compression which enables streaming such resolutions. But it might pose additional CPU load.

Link to comment
Share on other sites

jernej,

 

I meant the driver for multiple video outputs.

 

But then without HW video decoding, multiple streams might be too much for the system?

 

So sounds like Allwinner might have such a multiple stream driver. But then can Allwinner library run under Armbian OS?

 

TV should run at 25 fps, so 720p resolution should then take about 35 MiB/s on USB which should be just possible. The 60fps I thought was H3's total video throughput.

Link to comment
Share on other sites

I meant the driver for multiple video outputs.

 

It is unclear to me if this is HW or SW limitation. When Allwinner updated their driver for video, they didn't implement this option. There is also no detailed datasheet so someone would need to invest some time to figure this out. Nobody has done that as far as I know.

 

Let me be clear, this is meant only for native outputs (HDMI and TV out), extension through USB are independant.

 

But then without HW video decoding, multiple streams might be too much for the system?

 

Exactly. Depends on the codec, resolution, framerate, so there is no easy answer. Just test it when you get HW.

 

So sounds like Allwinner might have such a multiple stream driver. But then can Allwinner library run under Armbian OS?

 

Please don't confuse HW decoding and HW rendering. VDPAU supports HW decoding and HW rendering, where Allwinner library (CedarX) supports only HW decoding and no rendering at all. You can only use HW rendering on native outputs (HDMI and TV out). For USB based ones, you would need SW rendering anyway. I'm not sure if VDPAU supports decoding multiple streams at the same time. I guess it does. Just force SW rendering and you are done. But anything done in SW raises CPU load.

Yes, you can run Allwinner library under Armbian, but you can't use it with any program out of the box. Because of that it is not even present on Armbian. You have to find it by yourself on the internet and adapt wanted program to work with it. It is not worth the effort. Just test VDPAU first.

Link to comment
Share on other sites

See wiki for MHL:

 

https://en.m.wikipedia.org/wiki/Mobile_High-Definition_Link

 

The OTG micro USB to HDMI via MHL 1.0 connector is $3 on AliExpress:

 

Micro USB MHL to HDMI Cable HDTV Adapter Converter for Samsung Galaxy S5 S4 S3 Note 3 Note 2 Galaxy Tab 3, Tab S, Tab Pro MHL

http://s.aliexpress.com/MzieeUJn

 

Looks like there are MHL Linux drivers available which hopefully will work under Armbian.

 

Question: Can we draw 500 ma from USB power port into USB OTG on the SBC, and more power for SBC, if needed, via the SBC power pins?

Link to comment
Share on other sites

jernej,

 

I found this info about VDPAU and VLC. Current VLC Debian version is 2.2.x:

"

VDPAU

VDPAU is supported for decoding since VLC version 2.1.0, and for post-processing and rendering since VLC 2.2.0 (still in development as of late 2013).

VDPAU will be enabled automatically by default in VLC version 2.2.0 onward. Refer to http://www.remlab.net/op/vlc-vdpau.shtmlfor technical details.

The following video codecs are supported for decoding: MPEG-1, MPEG-2, MPEG-4 Visual (and possibly H.263), WMV3, VC-1 and H.264 (MPEG-4 AVC). Almost all video codecs are supported for post-processing and rendering."

 

The wiki further talks about GPU support:

 

https://wiki.videolan.org/VLC_GPU_Decoding/

 

1. But I guess Allwinner only uses GPU for 3D, HW decoding actually happens on H2+/H3 CPU only? Is rendering also on GPU?

 

2. So does that mean we can use VLC on OPis for both HW decoding and rendering for HDMI and TVout?

 

In any case my interest is regular TV channels streaming where h.264 decoding is needed but no rendering as for videogames.

 

Any USB video streaming (no rendering) comments?

 

3. VLC can support multiple streams in a single instance:

 

https://wiki.videolan.org/VLC_HowTo/Play_multiple_instances/

 

Hopefully this could work on OPis too with HDMI and TVout available. Maybe even on USBs...

Link to comment
Share on other sites

zador,

 

I read the wiki. If we connect an Android device with proper drivers to stream video from phone to HDMI on TV, why can't we stream from OPi to HDMI TV too?

 

What other hw do you have in mind?

 

See here:

 

Micro USB MHL to HDMI Cable HDTV Adapter Converter for Samsung Galaxy S5 S4 S3 Note 3 Note 2 Galaxy Tab 3, Tab S, Tab Pro MHL

http://s.aliexpress.com/MzieeUJn

Link to comment
Share on other sites

1. But I guess Allwinner only uses GPU for 3D, HW decoding actually happens on H2+/H3 CPU only? Is rendering also on GPU?

 

2. So does that mean we can use VLC on OPis for both HW decoding and rendering for HDMI and TVout?

 

In any case my interest is regular TV channels streaming where h.264 decoding is needed but no rendering as for videogames.

 

Any USB video streaming (no rendering) comments?

 

3. VLC can support multiple streams in a single instance:

 

https://wiki.videolan.org/VLC_HowTo/Play_multiple_instances/

 

Hopefully this could work on OPis too with HDMI and TVout available. Maybe even on USBs...

You are still asking the same questions over and over again.

1. VLC wiki talks about "generic" x86/x64 hardware. For these boards you need to check VDPAU support regardless of where the hardware decoder is and how it is implemented.

 

2,3. It's not about VLC, it's about the other end of VDPAU API - vdpau-sunxi and libcedrus. If these libraries don't work with multiple streams or if you will hit hardware limitations, it won't work regardless of VLC capabilities.

Link to comment
Share on other sites

zador,

 

I keep asking because I keep getting very different answers !

I didn't realize this would be so tough.

 

So now you are saying the VLC wiki has nothing to do with ARM, but only x86/64?

I don't see VLC saying that at all...Hence my questions.

 

So does libcedrus or vdpau-sunxi say anything about multi video-streaming support? I am only interested in HW decoding, not rendering/ 3D.

 

The other confusion is what I thought I read above: that Allwinner CedarX is a not so good alternative to Armbian VDPAU?

 

Now that USB is out as a cheap streamer to TV HDMI (need MHL HW), I will substitute for it WiFi streaming to Miracast HDMI dongles on TV sets !

Link to comment
Share on other sites

I read the wiki. If we connect an Android device with proper drivers to stream video from phone to HDMI on TV, why can't we stream from OPi to HDMI TV too?

Let me correct you. If we connect an Android device with MHL hardware support and with proper drivers...

 

What other hw do you have in mind?

I can't remember any relatively cheap hardware with multiple video outputs.

Link to comment
Share on other sites

zador,

 

Yes the hardware MHL support wasn't clear. But looks like people have ignored MHL and moved onto software supported wireless Miracast !

 

In any case, do you know if we can supply power to OPis from both OTG USB (500mA) and another source, say power pins?

Link to comment
Share on other sites

I keep asking because I keep getting very different answers !

I didn't realize this would be so tough.

I also needed some time to understand how exactly everything works. Problem here is that in PC world (x86/amd64) nobody speaks precise enough. For example, chip on graphic card is usually called GPU. However in reality it is much more. Calling it GPU is similar that calling H3 chip CPU. GPU is just graphic processor, which takes care for 3D and sometimes also for 2D. Usually it is accessed through OpenGL (ES) or DirectX API. Another part of this chip is HW unit which helps decoding video. Most of the time it has nothing to do with GPU except it is part of the same chip. Of course, you need some kind of output, for example HDMI. For that there is yet another HW unit which takes care for that independent of GPU. There could be another HW units present on the same chip, I don't have full knowledge of contemporary graphic chip design. For example, H3 has also HW composer. This takes two images and based on some rules like plane size, transparency, etc. produces output image which is at the end shown on your screen. Please educate yourself about this. There is a lot of interesting literature on the internet.

 

So now you are saying the VLC wiki has nothing to do with ARM, but only x86/64?

I don't see VLC saying that at all...Hence my questions.

 

He meant that VLC wiki is mostly x86/amd64 oriented, which is to be expected, because arm platform is rarely used for desktop.

 

So does libcedrus or vdpau-sunxi say anything about multi video-streaming support? I am only interested in HW decoding, not rendering/ 3D.

 

I'm telling you that I don't know. It is best just to try out. And of course you need rendering (which means displaying video, not some fancy 3D effects or whatever) otherwise you would not see anything. As mentioned before, using HW composer unit, rendering (displaying video) is basically for free (no CPU load), but if you use USB output or force SW rendering, then this doesn't work and CPU is definetly pretty involved.

 

The other confusion is what I thought I read above: that Allwinner CedarX is a not so good alternative to Armbian VDPAU?

 

I don't see any confusion. Because there is no program which would support CedarX out of the box there is no point of trying to use it. Unless you want to spend time to learn about this interface and modify another program to use it. VDPAU is already prepared, you just use it.

 

Maybe the biggest misunderstanding here is that VDPAU implementation for H3 is not complete. It doesn't implement VC1 codec and has incomplete MPEG4 implementation (possible issues with xvid, divx, etc.). However, MPEG1/2, H264 and H265 are pretty stable and there should not be any issues with them. This VDPAU implementation is missing some other features, which some programs might take them for granted, so they can have troubles using it. From what I read here on this forum, VLC falls in this category. I'm not really sure what problems it have.

Link to comment
Share on other sites

jernej,

 

Thanks for the detailed reply. I didn't imagine that VLC really mostly talks about desktop x86/64- always thought that ARM too was included.

 

Yes VLC doc says mpeg4 Part 2 may not be supported but h264 is fully handled-good enough.

 

OK so got to run experiments when OPis arrive.

 

I am now assuming that it is the same story with WiFi as with HDMI and TVout?

 

The alt to HDMI/ TVout is to stream to multiple TV sets that have the Miracast HDMI dongles attached. USB streaming without non existent MHL HW as zador pointed out is not possible.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines