This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Mpeg4 and Mpeg2 pipeline in DM8168 (G-streamer)

Hi,

I am using DM8168 processor with EZSDK version of 5_05_02_00. I am trying to stream Mpeg4 and Mpeg2 video using G-streamer application.

I have tried the below pipeline command to stream the MPEG-2 codec video format. I can able to play a video, but I couldn't get any audio from it.

gst-launch -v filesrc location=codec_test/video_sample/MPEG-2.vob typefind=true ! ffdemux_mpeg name=demux demux.video_00 ! mpegvideoparse ! omx_mpeg2dec ! omx_scaler ! 'video/x-raw-yuv,width=(int)800,height=(int)480' ! v4l2sink device="/dev/video1"

I want to know proper pipeline to stream MPEG-2 and MPEG-4 video format with audio.

Thanks in advance.

Regards,
Salih

  • Hello,

    gst-launch --gst-debug=3 --verbose filesrc location=xxxx !  qtdemux name=demux demux.audio_00 ! queue ! faad ! alsasink device="plughw:0,1" demux.video_00 ! queue ! mpegvideoparse ! omx_mpeg2dec ! omx_scaler ! omx_ctrl display-mode=OMX_DC_MODE_1080P_60 ! gstperf ! omx_videosink

    But you should enable TI81XX HDMI Audio Support.

    Follow this user guide:

    ezsdk/board-support/docs

    TI81XX_HDMI_User_Guide.pdf

    You should change the demuxer in the exmaple pipeline which I post.

    Let me know the result.

    Best Regards,

    Margarita

  • Hi,

    If I want to stream the MPEG-4 video, will the above pipeline will work with it?.

    Thanks in advance.

    Regards,
    Salih
  • Hello Salih,

    Sure it will but you must change the parser, the decoder and demuxer.
    Please provide me the file name which you will decode I could build you the pipeline. Is it .VOB?

    Best Regards,
    Margarita
  • Hi,

    Can you please provide the G-streamer pipeline to run the H.263 video codecs?...


    Thanks in advance,

    Regards,
    Salih

  • Hello,

    gst-launch filesrc location=BP_H263.mp4 ! qtdemux ! ffdec_h263 ! ffmpegcolorspace ! omx_scaler ! omx_ctrl display-mode=OMX_DC_MODE_1080P_60 ! ! omx_videosink

    Best Regards,
    Margarita
  • Hello,

    As you can see in gstomx.c this line is commented :

    // { "omx_h263dec", "libOMX_Core.so", "OMX.TI.DUCATI.VIDDEC", "", GST_RANK_PRIMARY, gst_omx_h263dec_get_type },

    If you remove the comment you will see the omx_h263dec with gst-inspect. But there is another problem, in gstreamer plugin there is no h263parser (check with gst-inspect). I posted a pipeline where ffdec_263 is used. The main difference is that the ffdec_h263 element itself has a parser which parses proper data (one frame data) and feeds it to decoder(that is why in the pipeline there is no parser). But if I remember right if you try to decode( with omx_h263dec) a h263 stream with resolution 176x144 or less it was fine but for greater it will fail, since you do not have a parser.
    With OMX decode_display demo we could decode a h263 elementary stream but as you could see there is a simple h263parser in es_parser.c file.

    Best Regards,
    Margarita

  • Thank you very much Margarita for your prompt reply. Is there any pipeline available to stream a DivX format video and also how to display JPEG image using G-streamer pipeline.

    Thanks in advance.

    Regards,
    Salih

  • Hello,

    In EZSDK we  have a MJPEG decoder so in this case you could use  jpegdec,  pngdec, omx_mjpegdec:

    Here is the pipeline example:

    gst-launch --gst-debug=3 filesrc location=1.png ! pngdec ! queue ! ffmpegcolorspace  ! imagefreeze ! omx_ctrl display-mode=OMX_DC_MODE_1080P_60 ! gstperf ! omx_videosink

    gst-launch -v filesrc location=1.jpg  ! jpegdec ! queue ! ffmpegcolorspace  ! imagefreeze ! omx_ctrl display-mode=OMX_DC_MODE_1080P_60 ! gstperf ! omx_videosink

    gst-launch -v filesrc location=1280x720.jpg  ! typefind ! jpegparse ! omx_mjpegdec ! omx_scaler !  imagefreeze  !  omx_ctrl display-mode=OMX_DC_MODE_1080P_60 ! gstperf ! omx_videosink

    Imagefreeze element will generates a still frame stream from an image.

    Muhammad Salih said:
    Is there any pipeline available to stream a DivX format

    Provide more information about the video container etc. How you want to stream it : udp, tcp ?

    Best Regards,

    Margarita

  • Hi,

    Once again Thank you very much for your support. The video stream is MPEG-4 visual and audio stream is mp3.

    I want to play video in the LCD.

    Thanks in advance.

    Regards,
    Salih

  • Hello,

    Muhammad Salih said:
    I want to play video in the LCD.

    If you want to play it on LCD you shall have:

    ....! omx_scaler ! omx_ctrl display-mode=OMX_DC_MODE_1080P_60 display-device=LCD ! gstperf !   'video/x-raw-yuv,width=(int)800,height=(int)480'   ! omx_videosink sync=false display-device=LCD

    Probably you shall add omx_scaler element and to pass a capsfilter ('video/x-raw-yuv,width=(int)800,height=(int)480') where width and height are equal(or less) to the Display width and height if you wish to see it on full screen. The display-device property shall be set as LCD. By default it is set to HDMI so that is why it is not set in the previous pipelines.

    Muhammad Salih said:
    . The video stream is MPEG-4 visual

    You could try :

     gst-launch -v filesrc location=XXX ! /add the demuxer here/ !   omx_mpeg4dec ! omx_scaler ! omx_ctrl display-mode=OMX_DC_MODE_1080P_60 ! gstperf ! omx_videosink   

    You shall add a mpeg4videoparse between demuxer and omx_mpeg4dec. 

    Best Regards,

    Margarita