Jump to content

SoCs for multiple streams transcoding


k0los

Recommended Posts

Hello,

 

I am looking for a cheap SoC (less than 15$ per SoC) that has the most efficient HW based h.264 encoder. I want to transcode multiple 1080p (6-12 mbps bitrate source) TS streams. I will probably use couple of those SoC's.  I was reading about Allwinner V3S (~3$ per CPU) based SoCs but can't find any cheap one for sale based on that chip. Also I don't really know what kind of performance this cheap have for HW h.264 encoding.

 

Anyone have any experience with HW 1080p encoding on SoCs? Any suggestions?

Edited by k0los
Link to comment
Share on other sites

If you find it, could you reply on your post ?

What i know:

In open IT:

Amlogic not complet

exynos not complet

Rockchip is the best soc i know for transcode ( https://github.com/rockchip-linux/mpp )

Allwinner the code is in progress ( https://bootlin.com/ )

for other or not free :

(the Amlogic, an other ) and broadcom , Hisilicon ...

 

i am shure this type of box : https://fr.aliexpress.com/item/Hot-Product-H264-H-264-H-264-HDMI-Encoder-HDMI-To-IP-Streaming-Hardware-Encoder-Decoder/32692916726.html?spm=a2g0w.search0204.3.1.89db7ab8VNVxzU&ws_ab_test=searchweb0_0,searchweb201602_3_10065_10068_5016020_10843_10059_5015415_10696_100031_5015320_10084_10083_10103_451_10618_452_10304_10307_10820_5016115_10821_10302,searchweb201603_45,ppcSwitch_5_ppcChannel&algo_expid=9a785538-79e4-4c12-b96b-a54de1aa025d-0&algo_pvid=9a785538-79e4-4c12-b96b-a54de1aa025d&transAbTest=ae803_2&priceBeautifyAB=0

 

have a soc to make it, and i see some rack with a lot of card to transcode :

https://fr.aliexpress.com/item/HL-Free-Shipping-3U-Chassis-16-Channels-HDMI-Encoder-IPTV-H-265-H-264-Hardware-Encoder/32810708713.html?spm=a2g0w.search0204.3.20.341dac936Zly7c&ws_ab_test=searchweb0_0,searchweb201602_3_10065_10068_5016020_10843_10059_5015415_10696_100031_5015320_10084_10083_10103_451_10618_452_10304_10307_10820_5016115_10821_10302,searchweb201603_45,ppcSwitch_5_ppcChannel&algo_expid=ac1f2053-740c-4988-a4f8-70082972fb8e-3&algo_pvid=ac1f2053-740c-4988-a4f8-70082972fb8e&transAbTest=ae803_2&priceBeautifyAB=0

 

 

 

Link to comment
Share on other sites

hello martos, interesting links. Especially that kickstarter campaign, from what I see they need 11k euro more to start implementing h.264 encoding for Allwinner VPUs, Rockstar based android boxes look interesting and cheap, you could get board out of them, they are <15$. Wonder what kind of encoding performance do they have.

Link to comment
Share on other sites

Sorry if I hijack the thread, I hesitated with creating another one.
I am still struggling with the OrangePi RK3399 regarding the h.264 encoding of the HDMI-IN and the camera.

For the time being, I use a hardware h.264 encoder (TBS2605), but still have the project to use ARM SoCs running Armbian.

I've seen other threads on other SoCs able to do hardware encoding, so I was wondering if we could make a table with all the information regarding h.264 encoding and transcoding on various SoCs and SBCs more or less handled by Armbian.

h.264 encoding boards
Name h.264 decoding h.264 encoding h.264 transcode Tests done on Armbian
OrangePi RK3399 Y N N N (OrangePi Debian)
         

 

What do you think of my proposal?
Thanks.

Link to comment
Share on other sites

9 hours ago, gounthar said:

so I was wondering if we could make a table with all the information regarding h.264 encoding and transcoding on various SoCs and SBCs more or less handled by Armbian.


That is a good idea but I comes with the burden of the maintenance. :)


Alternative option is that we add three badges H264D H264E H264T under "Specifications" at download pages and give you access that you can do that?

Link to comment
Share on other sites

On 10/20/2019 at 10:16 PM, gounthar said:

make a table with all the information regarding h.264 encoding and transcoding on various SoCs

On imx6q SoC there is:

v4l2-ctl --device=/dev/video0 --all

Spoiler

Driver Info:
        Driver name      : coda
        Card type        : CODA960
        Bus info         : platform:coda
        Driver version   : 5.4.0
        Capabilities     : 0x84208000
                Video Memory-to-Memory
                Streaming
                Extended Pix Format
                Device Capabilities
        Device Caps      : 0x04208000
                Video Memory-to-Memory
                Streaming
                Extended Pix Format
        Detected Stateful Encoder

Priority: 2
Format Video Capture:
        Width/Height      : 1920/1088
        Pixel Format      : 'H264' (H.264)
        Field             : None
        Bytes per Line    : 0
        Size Image        : 3133440
        Colorspace        : Rec. 709
        Transfer Function : Default (maps to Rec. 709)
        YCbCr/HSV Encoding: Default (maps to Rec. 709)
        Quantization      : Default (maps to Full Range)
        Flags             :
Format Video Output:
        Width/Height      : 1920/1088
        Pixel Format      : 'NV12' (Y/CbCr 4:2:0)
        Field             : None
        Bytes per Line    : 1920
        Size Image        : 3133440
        Colorspace        : Rec. 709
        Transfer Function : Default (maps to Rec. 709)
        YCbCr/HSV Encoding: Default (maps to Rec. 709)
        Quantization      : Default (maps to Limited Range)
        Flags             :
Selection Video Capture: compose, Left 0, Top 0, Width 1920, Height 1088, Flags:
Selection Video Capture: compose_default, Left 0, Top 0, Width 1920, Height 1088, Flags:
Selection Video Capture: compose_bounds, Left 0, Top 0, Width 1920, Height 1088, Flags:
Selection Video Capture: compose_padded, Left 0, Top 0, Width 1920, Height 1088, Flags:
Selection Video Output: crop, Left 0, Top 0, Width 1920, Height 1088, Flags:
Selection Video Output: crop_default, Left 0, Top 0, Width 1920, Height 1088, Flags:
Selection Video Output: crop_bounds, Left 0, Top 0, Width 1920, Height 1088, Flags:
Streaming Parameters Video Output:
        Capabilities     : timeperframe
        Frames per second: 30.000 (30/1)
        Write buffers    : 0
        
User Controls

                horizontal_flip 0x00980914 (bool)   : default=0 value=0
                  vertical_flip 0x00980915 (bool)   : default=0 value=0
   min_number_of_output_buffers 0x00980928 (int)    : min=1 max=1 step=1 default=1 value=1 flags=read-only
 

Codec Controls
                  
                 video_gop_size 0x009909cb (int)    : min=0 max=99 step=1 default=16 value=16
                  video_bitrate 0x009909cf (int)    : min=0 max=32767000 step=1000 default=0 value=0
    number_of_intra_refresh_mbs 0x009909d6 (int)    : min=0 max=8160 step=1 default=0 value=0
           sequence_header_mode 0x009909d8 (menu)   : min=0 max=1 default=1 value=1
                                1: Joined With 1st Frame
       maximum_bytes_in_a_slice 0x009909db (int)    : min=1 max=1073741823 step=1 default=500 value=500
       number_of_mbs_in_a_slice 0x009909dc (int)    : min=1 max=1073741823 step=1 default=1 value=1
      slice_partitioning_method 0x009909dd (menu)   : min=0 max=2 default=0 value=0
                                0: Single
                                1: Max Macroblocks
                                2: Max Bytes
                vbv_buffer_size 0x009909de (int)    : min=0 max=262144 step=1 default=0 value=0
  initial_delay_for_vbv_control 0x009909e1 (int)    : min=0 max=32767 step=1 default=0 value=0
          h264_i_frame_qp_value 0x00990a5e (int)    : min=0 max=51 step=1 default=25 value=25
          h264_p_frame_qp_value 0x00990a5f (int)    : min=0 max=51 step=1 default=25 value=25
          h264_maximum_qp_value 0x00990a62 (int)    : min=0 max=51 step=1 default=51 value=51
                     h264_level 0x00990a67 (menu)   : min=0 max=11 default=11 value=11
                                5: 2
                                8: 3
                                9: 3.1
                                10: 3.2
                                11: 4
  h264_loop_filter_alpha_offset 0x00990a68 (int)    : min=-6 max=6 step=1 default=0 value=0
   h264_loop_filter_beta_offset 0x00990a69 (int)    : min=-6 max=6 step=1 default=0 value=0
          h264_loop_filter_mode 0x00990a6a (menu)   : min=0 max=2 default=0 value=0
                                0: Enabled
                                1: Disabled
                                2: Disabled at Slice Boundary
                   h264_profile 0x00990a6b (menu)   : min=0 max=0 default=0 value=0
                                0: Baseline
    h264_constrained_intra_pred 0x00990a7f (int)    : min=0 max=1 step=1 default=0 value=0
    h264_chroma_qp_index_offset 0x00990a80 (int)    : min=-12 max=12 step=1 default=0 value=0
         mpeg4_i_frame_qp_value 0x00990a90 (int)    : min=1 max=31 step=1 default=2 value=2
         mpeg4_p_frame_qp_value 0x00990a91 (int)    : min=1 max=31 step=1 default=2 value=2
                    mpeg4_level 0x00990a95 (menu)   : min=0 max=7 default=7 value=7
                                7: 5
                  mpeg4_profile 0x00990a96 (menu)   : min=0 max=0 default=0 value=0
                                0: Simple

 v4l2-ctl --device=/dev/video1 --all

Spoiler

Driver Info:
        Driver name      : coda
        Card type        : CODA960
        Bus info         : platform:coda
        Driver version   : 5.4.0
        Capabilities     : 0x84208000
                Video Memory-to-Memory
                Streaming
                Extended Pix Format
                Device Capabilities
        Device Caps      : 0x04208000
                Video Memory-to-Memory
                Streaming
                Extended Pix Format

        Detected Stateful Decoder

Priority: 2
Format Video Capture:
        Width/Height      : 1920/1088
        Pixel Format      : 'NV12' (Y/CbCr 4:2:0)
        Field             : None
        Bytes per Line    : 1920
        Size Image        : 3133440
        Colorspace        : Rec. 709
        Transfer Function : Default (maps to Rec. 709)
        YCbCr/HSV Encoding: Default (maps to Rec. 709)
        Quantization      : Default (maps to Limited Range)
        Flags             :
Format Video Output:
        Width/Height      : 1920/1088
        Pixel Format      : 'H264' (H.264)
        Field             : None
        Bytes per Line    : 0
        Size Image        : 3133440
        Colorspace        : Rec. 709
        Transfer Function : Default (maps to Rec. 709)
        YCbCr/HSV Encoding: Default (maps to Rec. 709)
        Quantization      : Default (maps to Full Range)
        Flags             :
Selection Video Capture: compose, Left 0, Top 0, Width 1920, Height 1088, Flags:
Selection Video Capture: compose_default, Left 0, Top 0, Width 1920, Height 1088, Flags:
Selection Video Capture: compose_bounds, Left 0, Top 0, Width 1920, Height 1088, Flags:
Selection Video Capture: compose_padded, Left 0, Top 0, Width 1920, Height 1088, Flags:
Selection Video Output: crop, Left 0, Top 0, Width 1920, Height 1088, Flags:
Selection Video Output: crop_default, Left 0, Top 0, Width 1920, Height 1088, Flags:
Selection Video Output: crop_bounds, Left 0, Top 0, Width 1920, Height 1088, Flags:
Streaming Parameters Video Output:
        Capabilities     : timeperframe
        Frames per second: 30.000 (30/1)
        Write buffers    : 0

User Controls

                horizontal_flip 0x00980914 (bool)   : default=0 value=0
                  vertical_flip 0x00980915 (bool)   : default=0 value=0
  min_number_of_capture_buffers 0x00980927 (int)    : min=1 max=1 step=1 default=1 value=1 flags=read-only

 

Codec Controls
                  
                    mpeg2_level 0x00990a0e (menu)   : min=0 max=3 default=3 value=3 flags=read-only
                                0: Low
                                1: Main
                                2: High 1440
                                3: High
                  mpeg2_profile 0x00990a0f (menu)   : min=0 max=4 default=4 value=4 flags=read-only
                                0: Simple
                                1: Main
                                2: SNR Scalable
                                3: Spatially Scalable
                                4: High
                     h264_level 0x00990a67 (menu)   : min=0 max=12 default=12 value=12 flags=read-only
                                0: 1
                                1: 1b
                                2: 1.1
                                3: 1.2
                                4: 1.3
                                5: 2
                                6: 2.1
                                7: 2.2
                                8: 3
                                9: 3.1
                                10: 3.2
                                11: 4
                                12: 4.1
                   h264_profile 0x00990a6b (menu)   : min=0 max=4 default=4 value=4 flags=read-only
                                0: Baseline
                                2: Main
                                4: High
                    mpeg4_level 0x00990a95 (menu)   : min=0 max=7 default=7 value=7 flags=read-only
                                0: 0
                                1: 0b
                                2: 1
                                3: 2
                                4: 3
                                5: 3b
                                6: 4
                                7: 5
                  mpeg4_profile 0x00990a96 (menu)   : min=0 max=4 default=4 value=4 flags=read-only
                                0: Simple
                                1: Advanced Simple
                                2: Core
                                3: Simple Scalable
                                4: Advanced Coding Efficiency

v4l2-ctl --device=/dev/video10 --all

Spoiler

Driver Info:
        Driver name      : imx-media-csc-s
        Card type        : imx-media-csc-scaler
        Bus info         : platform:imx-media-csc-scaler
        Driver version   : 5.4.0
        Capabilities     : 0x84208000
                Video Memory-to-Memory
                Streaming
                Extended Pix Format
                Device Capabilities
        Device Caps      : 0x04208000
                Video Memory-to-Memory
                Streaming
                Extended Pix Format
Media Driver Info:
        Driver name      : imx-media
        Model            : imx-media
        Serial           :
        Bus info         :
        Media version    : 5.4.0
        Hardware revision: 0x00000000 (0)
        Driver version   : 5.4.0
Priority: 2
Format Video Capture:
        Width/Height      : 720/576
        Pixel Format      : 'YU12' (Planar YUV 4:2:0)
        Field             : None
        Bytes per Line    : 720
        Size Image        : 622080
        Colorspace        : sRGB
        Transfer Function : Default (maps to sRGB)
        YCbCr/HSV Encoding: Default (maps to ITU-R 601)
        Quantization      : Default (maps to Limited Range)
        Flags             :
Format Video Output:
        Width/Height      : 720/576
        Pixel Format      : 'YU12' (Planar YUV 4:2:0)
        Field             : None
        Bytes per Line    : 720
        Size Image        : 622080
        Colorspace        : sRGB
        Transfer Function : Default (maps to sRGB)
        YCbCr/HSV Encoding: Default (maps to ITU-R 601)
        Quantization      : Default (maps to Limited Range)
        Flags             :
Selection Video Capture: compose, Left 0, Top 0, Width 720, Height 576, Flags:
Selection Video Capture: compose_default, Left 0, Top 0, Width 720, Height 576, Flags:
Selection Video Capture: compose_bounds, Left 0, Top 0, Width 720, Height 576, Flags:
Selection Video Output: crop, Left 0, Top 0, Width 720, Height 576, Flags:
Selection Video Output: crop_default, Left 0, Top 0, Width 720, Height 576, Flags:
Selection Video Output: crop_bounds, Left 0, Top 0, Width 720, Height 576, Flags:

User Controls

                horizontal_flip 0x00980914 (bool)   : default=0 value=0
                  vertical_flip 0x00980915 (bool)   : default=0 value=0
                         rotate 0x00980922 (int)    : min=0 max=270 step=90 default=0 value=0 flags=modify-layout

/dev/video10 requires at least kernel 5.4.0-rc1 to work out of the box.
                  
gst-inspect-1.0 exposes:

Quote

video4linux2:  v4l2h264enc: V4L2 H.264 Encoder
video4linux2:  v4l2mpeg4enc: V4L2 MPEG4 Encoder
video4linux2:  v4l2mpeg4dec: V4L2 MPEG4 Decoder
video4linux2:  v4l2mpeg2dec: V4L2 MPEG2 Decoder
video4linux2:  v4l2h264dec: V4L2 H264 Decoder
video4linux2:  v4l2convert: V4L2 Video Converter

So hardware accelerated video pipelines can be composed in all flavors.

Link to comment
Share on other sites

On 10/25/2019 at 10:53 PM, martos said:

What is the device with imx6q SoC ?

As the mentioned features are properties of the SoC it does not realy matter at which device the i.MX6 resides. Chose what fits your needs.

 

On 10/25/2019 at 10:53 PM, martos said:

what is your linux ?

As already stated to have all features out the box you need at least kernel 5.4.0-rc1. The rootfs distribution does not really matter as long as it provides software of the latest mainline releases.

I tinker with cubox-i and hummingboard and as I wanted all bells and whistles I chose the quad variant with 2GB ram for me.
This is working for me since round about fedora 26. OK, in the early days many of early adopter patches were required.
But nowadays only proper configuration is necessary.

Link to comment
Share on other sites

Hello

this device :

https://www.ebay.fr/itm/HummingBoard-i2-i-MX6-Dual-Lite-1GHz-64bit-1Gb-RAM/182913801267?hash=item2a96831c33:g:fW4AAOSwCcZaEuT2

i.MX6 Dual Lite 1GHz

3D GPU GC880 OpenGL ES1.1,2.0

64bit 1Gb RAM

Standard micro USB connector 5V as a DC power

HDMI CEC 1080p

10/100Mbps Ethernet Connector

Powered 2xUSB 2.0 host ports

MIPI 2 Lane CSI-2

26 pin header compatible with the Raspberry pi header

Analog audio out (PWM based)

Coax SPDIF out for digital audio

LEDs

8 pin header for FlexCAN, system reset and 5V / GND pins

micro SD interface (for OS image and user data)

 

the transcode h264 HD to H264 low resolution could works ? (only one dual core and only 1gb )

Link to comment
Share on other sites

On 10/29/2019 at 11:31 AM, martos said:

the transcode h264 HD to H264 low resolution could works ?

If I looked this up correctly from the i.MX 6Solo/6DualLite Applications Processor Reference Manual the VPU has this specs:
HW Decoder: H.264 Profile: BP/CBP/MP/HP Resolution: 1080 i/p, 30 fps Bitrate: 50 Mbps
HW Encoder: H.264 Profile: BP/CBP       Resolution: 1080p, 30 fps    Bitrate: 14 Mbps

On 10/29/2019 at 11:31 AM, martos said:

(only one dual core and only 1gb )

As the VPU is a dedicated IP the number of CPU cores does not matter for the codec performance and 1gb should suffice to provide the required buffer allocations for the intermediate frames.

 

Just composed my first transcode pipeline, see transcode-pipeline.pdf for reference. I do not really know what I am doing (google was my friend) and there are so much knobs for configuration and fine tuning so YMMV.

transcode-pipeline.pdf

Link to comment
Share on other sites

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

Important Information

Terms of Use - Privacy Policy - Guidelines