WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: gstreamer does not display jpeg/png files  (Read 13665 times)

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14815
gstreamer does not display jpeg/png files
« on: October 14, 2010, 10:05:12 AM »
Note sure if this is a gstreamer extension problem or not, but apparently works on other distros:
Code: [Select]
$ gst-launch filesrc location=file.jpg ! jpegdec ! freeze ! autovideosink Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
ERROR: from element /GstPipeline:pipeline0/GstJpegDec:jpegdec0: Failed to decode JPEG image Additional debug info:
gstjpegdec.c(1441): gst_jpeg_dec_chain (): /GstPipeline:pipeline0/GstJpegDec:jpegdec0:
Error #68: Unsupported marker type 0x03
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

$ gst-launch filesrc location=file.png ! pngdec ! freeze ! autovideosink Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
ERROR: from element /GstPipeline:pipeline0/GstPngDec:pngdec0: Internal data stream error.
Additional debug info:
gstpngdec.c(550): gst_pngdec_task (): /GstPipeline:pipeline0/GstPngDec:pngdec0:
stream stopped, reason not-negotiated
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

Could someone try on their tc setup? Note that the same sort of thing works OK for mp3 and mp4 files

Offline Arslan S.

  • Hero Member
  • *****
  • Posts: 825
Re: gstreamer does not display jpeg/png files
« Reply #1 on: October 15, 2010, 10:07:11 AM »
sorry i have no idea about command line usage of gstreamer, can you give more details please

Code: [Select]
$ gst-launch filesrc location=file.jpg ! jpegdec ! freeze ! autovideosink Setting pipeline to PAUSED ...
WARNING: erroneous pipeline: no element "Setting"

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14815
Re: gstreamer does not display jpeg/png files
« Reply #2 on: October 16, 2010, 07:33:51 AM »
I've been playing around for a while using rygel to stream media (music, video, images) and using gupnp-av-cp to check that I can view/play the various files.

You can set gupnp-av-cp to used rygel's media renderer, which in turn uses gstreamer to render the streamed files.

I couldn't figure out what extensions were required  by rygel to play videos and view images, so I hunted around for a way to use gstreamer directly and came upon the gst-launch command - this command usefully complains about what it is missing to play media files and so helped track down which extensions I needed.

As an example, this will play an mp3 music file:
Code: [Select]
$ gst-launch filesrc location=/mnt/hda2/media/music/aayw.mp3 ! mad ! autoaudiosink
I couldn't figure out the chain of command switches to play an mp4 video file, but this "shortcut" works:
Code: [Select]
gst-launch playbin uri=file:///mnt/hda2/media/video/video_test.mp4
Whether I use the command above, or a playbin shortcut for jpeg images, I get the error:
Code: [Select]
ERROR: from element /GstPipeline:pipeline0/GstJpegDec:jpegdec0: Failed to decode JPEG image
...
Error #68: Unsupported marker type 0x03

..which makes me think there may be a problem with the way gstreamer is linked to the base libjpeg.

BTW, the "playbin" approach to png images seems to work in that some kind of images flashes very quickly on the screen

Offline Arslan S.

  • Hero Member
  • *****
  • Posts: 825
Re: gstreamer does not display jpeg/png files
« Reply #3 on: October 16, 2010, 10:27:10 AM »
jpeg and png plugins are located inside gst-plugins-good, it may be a good idea to rebuild gst-plugins-good

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14815
Re: gstreamer does not display jpeg/png files
« Reply #4 on: October 16, 2010, 10:48:01 AM »
Ah-ha, I see:
Quote
jpegdec: fix markers parsing regression

..for 0.10.25, this could be it - I'll have a look

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14815
Re: gstreamer does not display jpeg/png files
« Reply #5 on: October 22, 2010, 09:20:05 AM »
..after compiling gst-plugins-good-1.0.25, this now works:
Code: [Select]
gst-launch filesrc location=/mnt/sda1/media/image/file.jpg ! jpegdec ! ffmpegcolorspace ! freeze ! autovideosink..as long as gst-plugins-bad is loaded to supply the "freeze" functionality

I'll post an updated extension