Unable to select format types

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Unable to select format types

jack81964
I am encoding a 10-bit 4:2:2 video in H.265.  According to: https://gstreamer.freedesktop.org/data/doc/gstreamer/head/pwg/html/section-types-definitions.html
I should be able to use Y42B as "format=(string)Y42B" but when I enter this, I get "erroneous pipeline: could not link queue0 to omxh265enc-omxh265enc0".  It's odd though because I know for a fact the video is 4:2:2 but I can use 'I420' and get a compression.  With I420 I get two errors "Could not write to resource" and "Interal data overflow" but when I look at the new video's properties it has been compressed.  I have had trouble getting video to display in VLC, and I think this may be the root of it.  How do I correct the Y42B issue?  Or what is the best format for me to use? Here is my code:

gst-launch-1.0 filesrc location=/home/ubuntu/user/Videos/raw_vid.yuv blocksize 4147200 ! capsfilter caps='video/x-raw, framerate=(fraction)30/1, width=(int)1920, height=(int)1080, format=(string)Y42B' ! queue ! omxh265enc ! filesink location=/home/ubuntu/user/Videos/new_vid.h265 -e
Reply | Threaded
Open this post in threaded view
|

Re: Unable to select format types

Peter Maersk-Moller-2
Hi Jack.

Using omxh265enc suggests you are using some sort of ARM based SoC system or alike. I don't believe there exist an ARM based system that can encode H.265 (or H.264) using YUV 4:2:2 (Y42B) as input except in software using libx264 (here x264enc).

I've been searching around for such systems for our Live streaming system for rocket launches (for COpenhagen Suborbitals), but so far I have come up empty handed. I took a look at Nvidia Tegra based Jetson family, but they are very vague on which codec profiles and levels they support. So far all multimedia coding examples suggest they can only support I420 as input (they convert Y42B to I420 before encoding).

So, what kind of hardware are you running on? It could also be the case that your omxh265enc version simply only supports, even in the perhaps unlikely case that your hardware can actually encode YUV 4:2:2.

I did find a company that can deliver libraries for ARM/FPGA systems that can encode H.264 and possibly H.265 taking YUV 4:2:2 and YUV 4:4:4 as input, but that gonna require a healthy and wealthy budget.

What you need is a hardware solution that will support one of the following codec profiles for H.265 : Main 4:2:2 10, Main 4:2:2 12, Main 4:4:4 (only 8 bit), Main 4:4:4 10, Main 4:4:4 12, Main 4:4:4 16 Intra. So far I can't find an ARM based (or OpenMAX) solution, that will support these profiles.

For H.264, only the profiles Hi422P and Hi444PP supports 4:2:2 Chroma subsampling. As for for H.265, so far I can't find an ARM based (or OpenMAX) solution (widely available), that will support these profiles.

What kind of hardware do you have access to?

Best regards
Peter Maersk-Moller
Live Streaming - Copenhagen Suborbitals

On Mon, Jul 11, 2016 at 10:14 PM, jack81964 <[hidden email]> wrote:
I am encoding a 10-bit 4:2:2 video in H.265.  According to:
https://gstreamer.freedesktop.org/data/doc/gstreamer/head/pwg/html/section-types-definitions.html
I should be able to use Y42B as "format=(string)Y42B" but when I enter this,
I get "erroneous pipeline: could not link queue0 to omxh265enc-omxh265enc0".
It's odd though because I know for a fact the video is 4:2:2 but I can use
'I420' and get a compression.  With I420 I get two errors "Could not write
to resource" and "Interal data overflow" but when I look at the new video's
properties it has been compressed.  I have had trouble getting video to
display in VLC, and I think this may be the root of it.  How do I correct
the Y42B issue?  Or what is the best format for me to use? Here is my code:

gst-launch-1.0 filesrc location=/home/ubuntu/user/Videos/raw_vid.yuv
blocksize 4147200 ! capsfilter caps='video/x-raw, framerate=(fraction)30/1,
width=(int)1920, height=(int)1080, format=(string)Y42B' ! queue ! omxh265enc
! filesink location=/home/ubuntu/user/Videos/new_vid.h265 -e



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Unable-to-select-format-types-tp4678606.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Unable to select format types

jack81964
You almost describe my situation perfectly, which makes the problems I'm having make a lot of sense.  I'm using an Nvidia Jetson TX1, and used a 10 bit 4:2:2 recorder to create my videos.  I know that the TX1 has a built-in H.265 processor, but I do not know if that means it can take YUV 4:2:2...
Reply | Threaded
Open this post in threaded view
|

Re: Unable to select format types

Peter Maersk-Moller-2
Hi.

I think you can only do encoding of YUV 4:2:0 on the Jetsons. But I still miss a list of valid encoding profiles it can encode. Its a bit odd bordering suspect that Nvidia hasn't made a list available with supported encoding profiles. Maybe there is a list on their site that requires registration. If you have access, look for enoding profiles. To encode 4:2:2, it need to support at least one of the profiles I listed in previous mail. Please drop a note if you find it.

If you have access to the description of the API, you can probably write a program, that query the encoder module for supported profiles. I think the OpenMAX describes a method for querying for encoder settings, profiles included. Maybe there is already code in omxh265enc that does this for you, where you could add a fprintf() to print out supported profiles or maybe there even exist a debug mode that will do that for you for omxh265enc.

But again, I don't think 4:2:2 is support. Would like to be proven wrong.

Best regards



On Tue, Jul 12, 2016 at 2:24 PM, jack81964 <[hidden email]> wrote:
You almost describe my situation perfectly, which makes the problems I'm
having make a lot of sense.  I'm using an Nvidia Jetson TX1, and used a 10
bit 4:2:2 recorder to create my videos.  I know that the TX1 has a built-in
H.265 processor, but I do not know if that means it can take YUV 4:2:2...



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Unable-to-select-format-types-tp4678606p4678635.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel