Converting AYUV to YUV - gst-launch pipeline?

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

Converting AYUV to YUV - gst-launch pipeline?

Matt Veenstra
Hi,

I am relatively new to gstreamer but I am quite familiar with
DirectShow and QuickTime.  I am trying to diagnose a bug in our
gstreamer app we have built and it is related color space conversions
going wrong.  My first thought was to profile this in gst-launch.

I create my AYUV data with this and it works well.

gst-launch filesrc location="$perf" ! decodebin name=nDecode nDecode.
! ffmpegcolorspace !
'video/x-raw-yuv,format=(fourcc)AYUV,width=640,height=480' ! filesink
location="$perf".ayuv

My problem is then creating a pipeline to take that output and convert
it back to yuv to pass to ffmpeg and other standard tools.  I have
tried many many attempts.  Here is the basic pipeline I have been
trying.

gst-launch filesrc location="$perf".ayuv !
'video/x-raw-yuv,format=(fourcc)AYUV,width=640,height=480' !
ffmpegcolorspace ! 'video/x-raw-yuv,width=640,height=480' ! filesink
location="$perf".yuv

Thanks for any ideas and pointers.  I tried to mimic some of the ideas
on the videomixer documentation.
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good-plugins/html/gst-plugins-good-plugins-videomixer.html

Thx,
Matt

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Converting AYUV to YUV - gst-launch pipeline?

David Schleef-2
On Fri, Aug 21, 2009 at 07:41:48PM -0700, Matt Veenstra wrote:
> My problem is then creating a pipeline to take that output and convert
> it back to yuv to pass to ffmpeg and other standard tools.  I have
> tried many many attempts.  Here is the basic pipeline I have been
> trying.
>
> gst-launch filesrc location="$perf".ayuv !
> 'video/x-raw-yuv,format=(fourcc)AYUV,width=640,height=480' !
> ffmpegcolorspace ! 'video/x-raw-yuv,width=640,height=480' ! filesink
> location="$perf".yuv

You're looking for something like:

  gst-launch filesrc location=ack.ayuv ! videoparse width=640 \
    height=240 format=ayuv ! ...

Also, you'll need to set a format after ffmpegcolorspace, otherwise
it will continue to use AYUV.  You're probably looking for
format=\(fourcc\)"I420", btw.



dave...


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Converting AYUV to YUV - gst-launch pipeline?

Matt Veenstra
Thanks dave, but unfortunately videoparser does not support AYUV.  See Below.

On Fri, Aug 21, 2009 at 9:42 PM, David Schleef<[hidden email]> wrote:

> On Fri, Aug 21, 2009 at 07:41:48PM -0700, Matt Veenstra wrote:
>> My problem is then creating a pipeline to take that output and convert
>> it back to yuv to pass to ffmpeg and other standard tools.  I have
>> tried many many attempts.  Here is the basic pipeline I have been
>> trying.
>>
>> gst-launch filesrc location="$perf".ayuv !
>> 'video/x-raw-yuv,format=(fourcc)AYUV,width=640,height=480' !
>> ffmpegcolorspace ! 'video/x-raw-yuv,width=640,height=480' ! filesink
>> location="$perf".yuv
>
> You're looking for something like:
>
>  gst-launch filesrc location=ack.ayuv ! videoparse width=640 \
>    height=240 format=ayuv ! ...
>

The supported formats of rawparse/videoparse are
  GST_VIDEO_PARSE_FORMAT_I420,
  GST_VIDEO_PARSE_FORMAT_YV12,
  GST_VIDEO_PARSE_FORMAT_YUY2,
  GST_VIDEO_PARSE_FORMAT_UYVY,
  GST_VIDEO_PARSE_FORMAT_v210,
  GST_VIDEO_PARSE_FORMAT_RGB = 10,
  GST_VIDEO_PARSE_FORMAT_GRAY

Since this is only to validate output, I updated by gst-launch to do
the conversion w 2 ffmpegcolorspace elements as shown below.

This fails...where gstreamer converts first to AYUV then to I420.  The
file size is proper.  But the outputted data cannot be converted as
the single pass can do.  Is there something I am missing in the
pipeline?
________________
gst-launch filesrc location="$perf" ! decodebin name=nDecode nDecode.
! ffmpegcolorspace name=nColor1 ! \
        'video/x-raw-yuv,format=(fourcc)AYUV,width=640,height=480' !
ffmpegcolorspace name=nColor2 ! \
        'video/x-raw-yuv,format=(fourcc)I420,width=640,height=480' ! filesink
location="$perf".yuv.ffmpegcolor

ffmpeg -r 15.0 -s 640x480 -i "$perf".yuv.ffmpegcolor ...

This works...where gstreamer takes the source and converts directly to I420
________________
gst-launch filesrc location="$perf" ! decodebin name=nDecode nDecode.
! ffmpegcolorspace name=nColor1 ! \
        'video/x-raw-yuv,format=(fourcc)I420,width=640,height=480' ! filesink
location="$perf".yuv

ffmpeg -r 15.0 -s 640x480 -i "$perf".yuv \


Thanks for any other ideas.
Matt

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Converting AYUV to YUV - gst-launch pipeline?

David Schleef-2
On Sat, Aug 22, 2009 at 09:25:26AM -0700, Matt Veenstra wrote:
>
> The supported formats of rawparse/videoparse are
>   GST_VIDEO_PARSE_FORMAT_I420,
>   GST_VIDEO_PARSE_FORMAT_YV12,
>   GST_VIDEO_PARSE_FORMAT_YUY2,
>   GST_VIDEO_PARSE_FORMAT_UYVY,
>   GST_VIDEO_PARSE_FORMAT_v210,
>   GST_VIDEO_PARSE_FORMAT_RGB = 10,
>   GST_VIDEO_PARSE_FORMAT_GRAY

The -bad prerelease implements AYUV.


> This fails...where gstreamer converts first to AYUV then to I420.  The
> file size is proper.  But the outputted data cannot be converted as
> the single pass can do.  Is there something I am missing in the
> pipeline?
> ________________
> gst-launch filesrc location="$perf" ! decodebin name=nDecode nDecode.
> ! ffmpegcolorspace name=nColor1 ! \
> 'video/x-raw-yuv,format=(fourcc)AYUV,width=640,height=480' !
> ffmpegcolorspace name=nColor2 ! \
> 'video/x-raw-yuv,format=(fourcc)I420,width=640,height=480' ! filesink
> location="$perf".yuv.ffmpegcolor
>
> ffmpeg -r 15.0 -s 640x480 -i "$perf".yuv.ffmpegcolor ...

How exactly does it "fail"?  It seems to work here.



dave...


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Converting AYUV to YUV - gst-launch pipeline?

Matt Veenstra
On Sat, Aug 22, 2009 at 11:57 AM, David Schleef<[hidden email]> wrote:

> On Sat, Aug 22, 2009 at 09:25:26AM -0700, Matt Veenstra wrote:
>>
>> The supported formats of rawparse/videoparse are
>>   GST_VIDEO_PARSE_FORMAT_I420,
>>   GST_VIDEO_PARSE_FORMAT_YV12,
>>   GST_VIDEO_PARSE_FORMAT_YUY2,
>>   GST_VIDEO_PARSE_FORMAT_UYVY,
>>   GST_VIDEO_PARSE_FORMAT_v210,
>>   GST_VIDEO_PARSE_FORMAT_RGB = 10,
>>   GST_VIDEO_PARSE_FORMAT_GRAY
>
> The -bad prerelease implements AYUV.

Available on the git repository then?

>
>
>> This fails...where gstreamer converts first to AYUV then to I420.  The
>> file size is proper.  But the outputted data cannot be converted as
>> the single pass can do.  Is there something I am missing in the
>> pipeline?
>> ________________
>> gst-launch filesrc location="$perf" ! decodebin name=nDecode nDecode.
>> ! ffmpegcolorspace name=nColor1 ! \
>>       'video/x-raw-yuv,format=(fourcc)AYUV,width=640,height=480' !
>> ffmpegcolorspace name=nColor2 ! \
>>       'video/x-raw-yuv,format=(fourcc)I420,width=640,height=480' ! filesink
>> location="$perf".yuv.ffmpegcolor
>>
>> ffmpeg -r 15.0 -s 640x480 -i "$perf".yuv.ffmpegcolor ...
>
> How exactly does it "fail"?  It seems to work here.
>

It failed with ffmpeg reporting wrong format.  The problem is in my
extension!  I left it ".ffmpegcolor" and ffmpeg is using the extension
to determine the raw format.  When I changed this to .yuv all worked.
Sorry for the noise.

Thx,
Matt

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Converting AYUV to YUV - gst-launch pipeline?

David Schleef-2
On Sat, Aug 22, 2009 at 12:54:27PM -0700, Matt Veenstra wrote:

> On Sat, Aug 22, 2009 at 11:57 AM, David Schleef<[hidden email]> wrote:
> > On Sat, Aug 22, 2009 at 09:25:26AM -0700, Matt Veenstra wrote:
> >>
> >> The supported formats of rawparse/videoparse are
> >>   GST_VIDEO_PARSE_FORMAT_I420,
> >>   GST_VIDEO_PARSE_FORMAT_YV12,
> >>   GST_VIDEO_PARSE_FORMAT_YUY2,
> >>   GST_VIDEO_PARSE_FORMAT_UYVY,
> >>   GST_VIDEO_PARSE_FORMAT_v210,
> >>   GST_VIDEO_PARSE_FORMAT_RGB = 10,
> >>   GST_VIDEO_PARSE_FORMAT_GRAY
> >
> > The -bad prerelease implements AYUV.
>
> Available on the git repository then?

Or:

  http://gstreamer.freedesktop.org/src/gst-plugins-bad/pre/gst-plugins-bad-0.10.13.3.tar.bz2



dave...


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel