Simulating a video camera with a file

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

Simulating a video camera with a file

katarina.balac@usi.ch

Hello,

I am trying to read raw video data from a file and then encode it using theora encoder. I would like to use standard test videos such as these:
http://media.xiph.org/video/derf/  (uncompressed YUV4MPEG, says it is the format accepted by the Theora encoder tools)
http://trace.eas.asu.edu/yuv/

I have tried with a pipeline like this: filesrc | ffmpegcolorspace | theoraenc | oggmux | filesink and the videos from the links above but I am getting the Error: not negotiated.

Everything works if I substitute the file source with the test source videotestsrc or a webcam v4l2src but this does not allow me to use standard test videos.
Is something missing in my pipeline or am I using the wrong format?
Any suggestions will be appreciated.

Thank you in advance,
Katarina

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Simulating a video camera with a file

Tristan Matthews-2
2010/2/9 [hidden email] <[hidden email]>

Hello,

I am trying to read raw video data from a file and then encode it using theora encoder. I would like to use standard test videos such as these:
http://media.xiph.org/video/derf/  (uncompressed YUV4MPEG, says it is the format accepted by the Theora encoder tools)
http://trace.eas.asu.edu/yuv/

I have tried with a pipeline like this: filesrc | ffmpegcolorspace | theoraenc | oggmux | filesink and the videos from the links above but I am getting the Error: not negotiated.


Try:
filesrc ! decodebin | ffmpegcolorspace | theoraenc | oggmux | filesink

decodebin is an element to "Autoplug and decode to raw media"

-Tristan

 
Everything works if I substitute the file source with the test source videotestsrc or a webcam v4l2src but this does not allow me to use standard test videos.
Is something missing in my pipeline or am I using the wrong format?
Any suggestions will be appreciated.

Thank you in advance,
Katarina

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



--
Tristan Matthews
email: [hidden email]
web: http://tristanswork.blogspot.com

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Simulating a video camera with a file

katarina.balac@usi.ch
In reply to this post by katarina.balac@usi.ch

Thank you very much for your answer. Unfortunately, this returns the error
ERROR: from element /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind: Could not determine type of stream
Is there anything else I can try?

Thanks,
Katarina


> Hello,
>
> I am trying to read raw video data from a file and then encode it using
> theora encoder. I would like to use standard test videos such as these:
> http://media.xiph.org/video/derf/  (uncompressed YUV4MPEG, says it is the
> format accepted by the Theora encoder tools)
> http://trace.eas.asu.edu/yuv/
>
> I have tried with a pipeline like this: filesrc | ffmpegcolorspace |
> theoraenc | oggmux | filesink and the videos from the links above but I am
> getting the Error: not negotiated.
>
>
Try:
filesrc ! decodebin | ffmpegcolorspace | theoraenc | oggmux | filesink

decodebin is an element to "Autoplug and decode to raw media"

-Tristan

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Simulating a video camera with a file

Tristan Matthews-2
2010/2/10 [hidden email] <[hidden email]>

Thank you very much for your answer. Unfortunately, this returns the error
ERROR: from element /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind: Could not determine type of stream
Is there anything else I can try?


I would focus on just trying to play it first. I tried the first file, akiyo.yuv with a few different programs to no avail. It doesn't have any header info as it appears to just be raw video data. You could try setting a capsfilter with different caps, i.e.
gst-launch -v filesrc ! video/x-raw-yuv, .... ! decodebin ! xvimagesink
but i'm not sure how this will work since I don't think the files have a fourcc.

Good luck,
Tristan
 
Thanks,
Katarina


> Hello,
>
> I am trying to read raw video data from a file and then encode it using
> theora encoder. I would like to use standard test videos such as these:
> http://media.xiph.org/video/derf/  (uncompressed YUV4MPEG, says it is the
> format accepted by the Theora encoder tools)
> http://trace.eas.asu.edu/yuv/
>
> I have tried with a pipeline like this: filesrc | ffmpegcolorspace |
> theoraenc | oggmux | filesink and the videos from the links above but I am
> getting the Error: not negotiated.
>
>
Try:
filesrc ! decodebin | ffmpegcolorspace | theoraenc | oggmux | filesink

decodebin is an element to "Autoplug and decode to raw media"

-Tristan

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



--
Tristan Matthews
email: [hidden email]
web: http://tristanswork.blogspot.com

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Simulating a video camera with a file

katarina.balac@usi.ch
In reply to this post by katarina.balac@usi.ch

Sure, this type of file can not be played. I was actually hoping that, because it is raw video data, there would be a way to connect the file directly to theora encoder without decoding it first. So this can not be done? In that case I guess I will have to use files of a different format and decode them first with decodebin, as you suggested.

Thanks a lot for your help,
Katarina



>
> Thank you very much for your answer. Unfortunately, this returns the error
> ERROR: from element
> /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind:
> Could not determine type of stream
> Is there anything else I can try?
>
>
I would focus on just trying to play it first. I tried the first file,
akiyo.yuv with a few different programs to no avail. It doesn't have any
header info as it appears to just be raw video data. You could try setting a
capsfilter with different caps, i.e.
gst-launch -v filesrc ! video/x-raw-yuv, .... ! decodebin ! xvimagesink
but i'm not sure how this will work since I don't think the files have a
fourcc.

Good luck,
Tristan


> Thanks,
> Katarina
>
>
> > Hello,
> >
> > I am trying to read raw video data from a file and then encode it using
> > theora encoder. I would like to use standard test videos such as these:
> > http://media.xiph.org/video/derf/  (uncompressed YUV4MPEG, says it is
> the
> > format accepted by the Theora encoder tools)
> > http://trace.eas.asu.edu/yuv/
> >
> > I have tried with a pipeline like this: filesrc | ffmpegcolorspace |
> > theoraenc | oggmux | filesink and the videos from the links above but I
> am
> > getting the Error: not negotiated.
> >
> >
> Try:
> filesrc ! decodebin | ffmpegcolorspace | theoraenc | oggmux | filesink
>
> decodebin is an element to "Autoplug and decode to raw media"
>
> -Tristan
>
>
> ------------------------------------------------------------------------------
> SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
> Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
> http://p.sf.net/sfu/solaris-dev2dev
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>



--
Tristan Matthews
email: [hidden email]
web: http://tristanswork.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev

------------------------------

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


End of gstreamer-devel Digest, Vol 45, Issue 16
***********************************************

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Simulating a video camera with a file

Stefan Sauer
In reply to this post by katarina.balac@usi.ch
[hidden email] wrote:
> Hello,
>
> I am trying to read raw video data from a file and then encode it using theora encoder. I would like to use standard test videos such as these:
> http://media.xiph.org/video/derf/  (uncompressed YUV4MPEG, says it is the format accepted by the Theora encoder tools)
> http://trace.eas.asu.edu/yuv/
>
> I have tried with a pipeline like this: filesrc | ffmpegcolorspace | theoraenc | oggmux | filesink and the videos from the links above but I am getting the Error: not negotiated.
>  

Use videoparse for raw files.

Stefan

> Everything works if I substitute the file source with the test source videotestsrc or a webcam v4l2src but this does not allow me to use standard test videos.
> Is something missing in my pipeline or am I using the wrong format?
> Any suggestions will be appreciated.
>
> Thank you in advance,
> Katarina
>
> ------------------------------------------------------------------------------
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>  


------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Simulating a video camera with a file

Tristan Matthews-2
2010/2/11 Stefan Kost <[hidden email]>
[hidden email] wrote:
> Hello,
>
> I am trying to read raw video data from a file and then encode it using theora encoder. I would like to use standard test videos such as these:
> http://media.xiph.org/video/derf/  (uncompressed YUV4MPEG, says it is the format accepted by the Theora encoder tools)
> http://trace.eas.asu.edu/yuv/
>
> I have tried with a pipeline like this: filesrc | ffmpegcolorspace | theoraenc | oggmux | filesink and the videos from the links above but I am getting the Error: not negotiated.
>

Use videoparse for raw files.


Great tip, I wish I'd known about that element before. Here's the working launch line:

 gst-launch -v filesrc location=akiyo_qcif.yuv ! videoparse width=176 height=144 !  xvimagesink

You can also set the format property as needed (for other colorspaces).
-Tristan

Stefan

> Everything works if I substitute the file source with the test source videotestsrc or a webcam v4l2src but this does not allow me to use standard test videos.
> Is something missing in my pipeline or am I using the wrong format?
> Any suggestions will be appreciated.
>
> Thank you in advance,
> Katarina
>
> ------------------------------------------------------------------------------
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>


------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



--
Tristan Matthews
email: [hidden email]
web: http://tristanswork.blogspot.com

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Simulating a video camera with a file

katarina.balac@usi.ch
In reply to this post by katarina.balac@usi.ch

Great! Thank you so much Stefan and Tristan!
Katarina



> [hidden email] wrote:
> > Hello,
> >
> > I am trying to read raw video data from a file and then encode it using
> theora encoder. I would like to use standard test videos such as these:
> > http://media.xiph.org/video/derf/  (uncompressed YUV4MPEG, says it is
> the format accepted by the Theora encoder tools)
> > http://trace.eas.asu.edu/yuv/
> >
> > I have tried with a pipeline like this: filesrc | ffmpegcolorspace |
> theoraenc | oggmux | filesink and the videos from the links above but I am
> getting the Error: not negotiated.
> >
>
> Use videoparse for raw files.
>
>
Great tip, I wish I'd known about that element before. Here's the working
launch line:

 gst-launch -v filesrc location=akiyo_qcif.yuv ! videoparse width=176
height=144 !  xvimagesink

You can also set the format property as needed (for other colorspaces).
-Tristan

Stefan

>
> > Everything works if I substitute the file source with the test source
> videotestsrc or a webcam v4l2src but this does not allow me to use standard
> test videos.
> > Is something missing in my pipeline or am I using the wrong format?
> > Any suggestions will be appreciated.
> >
> > Thank you in advance,
> > Katarina
> >

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Simulating a video camera with a file

Benjamin Schwartz
In reply to this post by Tristan Matthews-2
Tristan Matthews wrote:
> 2010/2/11 Stefan Kost <[hidden email]>
>> Use videoparse for raw files.
>>
>>
> Great tip, I wish I'd known about that element before. Here's the working
> launch line:
>
>  gst-launch -v filesrc location=akiyo_qcif.yuv ! videoparse width=176
> height=144 !  xvimagesink

To be clear, this works for the ".yuv" raw files, but not for the ".y4m"
YUV4MPEG2 files.  AFAIK, there is no "y4mdec" element for gstreamer (yet).

--Ben


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Simulating a video camera with a file

Tim-Philipp Müller-2
> >  gst-launch -v filesrc location=akiyo_qcif.yuv ! videoparse width=176
> > height=144 !  xvimagesink
>
> To be clear, this works for the ".yuv" raw files, but not for the ".y4m"
> YUV4MPEG2 files.  AFAIK, there is no "y4mdec" element for gstreamer (yet).

The ffdemux_yuv4mpegpipe element from gst-ffmpeg should do the trick for
those.

Cheers
 -Tim



------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel