Does anyone know if it is possible to get pixels from an mpeg2ts stream to use within OF? This is now week #6 of my excruciating attempt to get pixels from my dvb-t receiver for my university final project.
I’ve invested too much time into this, any help would be extremely appreciated! If someone can help me to get this sorted I’ll send them chocolates.
So far I have tried using:
gstreamers ‘dvbsrc’ to tune and demux straight from source.
tzap to tune the receiver and ffmpeg to convert the receiver mpegts file to an mp4 file, using gstreamers playbin to play the container file.
i receive: “couldn’t get sample caps”
ffmpeg to convert the receivers mpegts file and send over UDP back to myself to pickup with gstUtils playbin.
i receive: “unsupported format xxxxx”
many other combinations of the above
Thanks in advance,
William.
no idea about this specific device but one thing that usually helps is to get it running from the command line using gst-launch, then it’s usually a matter of removing the final sink and let OF add it’s own. Sometimes you need to add an extra element like a videorate to get things working with OF’s own videosink though
Thank you very much for your reply, I’ll keep trying the different pipelines. I’ve been having trouble with missing gst plug-ins, some appear to load in OF but not calling directly from terminal. Does OF use the same gst library/directory as if I were to call gst-launch/ inspect from terminal?
if you are in linux the plugins path should be the same. as i said no idea about this specific device but it’s usually something related to incompatible videoformats, try adding a videoconvert after the device grabber, or timming issues which usually get solved by using a videorate somewhere in the pipeline but in general try to get things working on a terminal with gst-launch and then port it to work in OF
It appears to play fine but I can never get a window to open using within terminal, I hope I can get this working soon gstreamer looks packed full of mad plug-ins!
Setting pipeline to PAUSED …
Pipeline is PREROLLING …
Got context from element ‘autovideosink0’: gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"(GstGLDisplayX11)\ gldisplayx11-0";
Pipeline is PREROLLED …
Setting pipeline to PLAYING …
New clock: GstSystemClock
I’m wondering if my machine i just cursed for this sort of thing, will try out my rPi this afternoon.
Again, thanks!
The dvbsrc route was the first thing I tried, but can’t seem to get it running with my device. I get this bizzare error:
gst-launch-1.0 dvbsrc adapter=0 frequency=10719000 pids=163:92 polarity=v symbol-rate=27500 ! tsdemux ! mpeg2dec ! autovideosink
Setting pipeline to PAUSED …
ERROR: Pipeline doesn’t want to pause.
Got context from element ‘autovideosink0’: gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"(GstGLDisplayX11)\ gldisplayx11-0";
ERROR: from element /GstPipeline:pipeline0/GstDvbSrc:dvbsrc0: GStreamer error: state change failed and some element failed to post a proper error message with the reason for the failure.
Additional debug info:
gstbasesrc.c(3354): gst_base_src_start (): /GstPipeline:pipeline0/GstDvbSrc:dvbsrc0:
Failed to start
Setting pipeline to NULL …
Freeing pipeline …
I save the stream to a file using Tzap (to tune the receiver) and this ffmpeg command:
ffmpeg -i /dev/dvb/adapter0/dvr0 out.mp4
This builds a file I can view absolutely fine and dandy after I have stopped ffmpeg working its magic. I can also view this file in OF using ofGstVideoPlayer. Do you think there would be a way of viewing the mp4 file as a stream live within OF?
I think you should keep trying with dvbsrc or v4l2src rather than trying to read directly from the device file but no idea really. have never worked with a dvb device so can’t tell for sure though.
you can call:
GST_DEBUG=4 gst-launch...
to get more info, the output is quite verbose but usually has information about what elements are failing and why
however when removing autovideosink for use within gstUtils I receive: [ error ] ofGstUtils: setPipelineWithSink(): couldn't create pipeline: could not link videorate0 to ofappsink
(the trouble i was having with dvbsrc was solved looking into GST_DEBUG=4 mode, i swapped my dvb receiver for my other realtek2838 which worked fine (after removing modprobe.d rules which I had previously been messing around with for SDR radio, learn’t my lesson!)).
Feeling very close to the solution I have been dancing around these past weeks!
Setting pipeline to PAUSED …
ERROR: Pipeline doesn’t want to pause.
ERROR: from element /GstPipeline:pipeline0/GstDvbSrc:dvbsrc0: GStreamer error: state change failed and some element failed to post a proper error message with the reason for the failure.
Additional debug info:
gstbasesrc.c(3356): gst_base_src_start (): /GstPipeline:pipeline0/GstDvbSrc:dvbsrc0:
Failed to start
Setting pipeline to NULL …
Freeing pipeline …
It’s not to do the tuning which i want from this DVB-S2 card and not to understand what to do after that, please help me out and completely stocked here.
Thanks for reply,
no i am not getting DVB-T also may my card TBS5927 supports only DVB-S2 and i spend too much time in this but still not succeeded…
is it work proper with DVB-T using listed command-
It does work using a DVB-T from here in London UK, if you are using linux you might want to check out the tzap and dvbtools for linux to create a ‘.config file’ which includes a list of all the receptions you can pick up in your area.
It’s also worth buying a cheap RTL dongle, as I found that I was going round and round in circles as the GStreamer wouldn’t tune my ‘huappage’ dongle. Let me know how you get on I’ll be more than happy to assist where I can