Hi,
we try the gstreamer mosaic example on our demo board 816x/389x EVM.
gstreamer pipeline:
gst-launch omx_videomixer port-index=0 name=mix ! v4l2sink userpointer=true filesrc location=sample_1.h264 ! 'video/x-h264' ! h264parse access-unit=true ! omx_h264dec ! mix. filesrc location=sample_2.h264 ! 'video/x-h264' ! h264parse access-unit=true ! omx_h264dec ! mix. filesrc location=sample_3.h264 ! 'video/x-h264' ! h264parse access-unit=true ! omx_h264dec ! mix. filesrc location=sample_4.h264 ! 'video/x-h264' ! h264parse access-unit=true ! omx_h264dec ! mix.
The result is
request pad!!creating pad with name:sink_00pad class init!!Setting sink pad:0request pad done ret!!request pad!!creating pad with name:sink_01Setting sink pad:1request pad done ret!!request pad!!creating pad with name:sink_02Setting sink pad:2request pad done ret!!request pad!!creating pad with name:sink_03Setting sink pad:3request pad done ret!!Setting pipeline to PAUSED ...ERROR: Pipeline doesn't want to pause.ERROR: from element /GstPipeline:pipeline0/GstV4l2Sink:v4l2sink0: Cannot identify device '/dev/video1'.Additional debug info:v4l2_calls.c(493): gst_v4l2_open (): /GstPipeline:pipeline0/GstV4l2Sink:v4l2sink0:system error: No such file or directorySetting pipeline to NULL ...Freeing pipeline ...
Does anyone know why /dev/video1 is missing?
BrFrank
Frank,
Please provide the stream resolution for the sample streams and EZSDK version used in your test setup
Please mark this post as answered via the Verify Answer button below if you think it answers your question. Thanks!
Ansari,
the EZSDK version is 05_04_00_11
The stream resolution is 1280x720@24
FYI Each 720p H.264 decoder instance needs approx 7.5 MB internal memory which is allocated from the memory segment VIDEO_M3_INT_HEAP_CACHED (pls refer to the firmware loader file $(EXSDK)/board-support/media-controller-utils_2_05_00_17/src/firmware_loader/memsegdef_default.c). The default size of this segment is 24 MB, which can support upto three 720p decoder instances. With the default memory setup you will be able to run upto three 720p instances.You have to increase the memory VIDEO_M3_INT_HEAP_CACHED to approx 30 MB to run 4 channel 720p h264 streams
You need to modify the memsegdef_default.c. The default EZSDK memory map is given in this wiki http://processors.wiki.ti.com/index.php/EZSDK_Memory_Map . The memory sections given in green colour in the wiki can be modified via firmware loader module and the pre-built firmware binaries can be used as it is. I've attached a sample modified firmware loader memsegdef_default.c file where I've reduced the CMEM and DSP_ALG_HEAP segment sizes and increased the VIDEO_M3_INT_HEAP_CACHED size from 24 MB to 30 MB. Following are the steps
Regards
Ansari
thanks for your answer.
After doing all your steps there is another error message.
gst-launch omx_videomixer port-index=0 name=mix ! v4l2sink userpointer=true filesrc location=sample_1.h264 ! 'video/x-h264' ! h264parse access-unit=true ! omx_h264dec ! mix. filesrc location=sample_2.h264 ! 'video/x-h264' ! h264parse access-unit=true ! omx_h264dec ! mix. filesrc location=sample_3.h264 ! 'video/x-h264' ! h264parse access-unit=true ! omx_h264dec ! mix. filesrc location=sample_4.h264 ! 'video/x-h264' ! h264parse access-unit=true ! omx_h264dec ! mix.request pad!!creating pad with name:sink_00pad class init!!Setting sink pad:0request pad done ret!!request pad!!creating pad with name:sink_01Setting sink pad:1request pad done ret!!request pad!!creating pad with name:sink_02Setting sink pad:2request pad done ret!!request pad!!creating pad with name:sink_03Setting sink pad:3request pad done ret!!Setting pipeline to PAUSED ...ERROR: Pipeline doesn't want to pause.ERROR: from element /GstPipeline:pipeline0/GstV4l2Sink:v4l2sink0: Cannot identify device '/dev/video1'.Additional debug info:v4l2_calls.c(493): gst_v4l2_open (): /GstPipeline:pipeline0/GstV4l2Sink:v4l2sink0:system error: No such file or directorySetting pipeline to NULL ...Freeing pipeline ...
Huber,
Are you able to run a single channel with the command
"gst-launch omx_videomixer port-index=0 name=mix ! v4l2sink userpointer=true filesrc location=sample_1.h264 ! 'video/x-h264' ! h264parse access-unit=true ! omx_h264dec ! mix."
Looks like V4l2 in not enabled in your setup. Please try the following commands
The detailed steps are available in DM816x_EZ_Software_Developers_Guide.pdf under "docs" section Look for the sections "How to change from OMX to V4L2 firmware for capture/display"
After your recommended steps there is a mosaic visible.But only the first frame of the videos. The videos are not playing (looks like paused).
Same when I start one video only.
the printouts are now:
gst-launch omx_videomixer port-index=0 name=mix ! v4l2sink userpointer=true filesrc location=sample_1.h264 ! 'video/x-h264' ! h264parse access-unit=true ! omx_h264dec ! mix. filesrc location=sample_2.h264 ! 'video/x-h264' ! h264parse access-unit=true ! omx_h264dec ! mix. filesrc location=sample_3.h264 ! 'video/x-h264' ! h264parse access-unit=true ! omx_h264dec ! mix. filesrc location=sample_4.h264 ! 'video/x-h264' ! h264parse access-unit=true ! omx_h264dec ! mix.request pad!!creating pad with name:sink_00pad class init!!Setting sink pad:0request pad done ret!!request pad!!creating pad with name:sink_01Setting sink pad:1request pad done ret!!request pad!!creating pad with name:sink_02Setting sink pad:2request pad done ret!!request pad!!creating pad with name:sink_03Setting sink pad:3request pad done ret!!Setting pipeline to PAUSED ...** (gst-launch-0.10:1395): CRITICAL **: gst_v4l2sink_sync_rotation: assertion `v4l2_ioctl (fd, VIDIOC_S_CTRL, &control) >= 0' failed** (gst-launch-0.10:1395): CRITICAL **: gst_v4l2sink_sync_rotation: assertion `v4l2_ioctl (fd, VIDIOC_S_CTRL, &control) >= 0' failed** (gst-launch-0.10:1395): CRITICAL **: gst_v4l2sink_sync_flip: assertion `v4l2_ioctl (fd, VIDIOC_S_CTRL, &control) >= 0' failedVideo mixer activate push!!Pipeline is PREROLLING ...In sink set caps:video/x-raw-yuv-strided, width=(int)1280, height=(int)720, format=(fourcc)NV12, rowstride=(int)1408, framerate=(fraction)24000/1001, interlaced=(boolean)falseip width:1280, ip height: 720, ip stride:1408Starting input thread...num sink pads:4ip zorder - starting from lowest: 0, 1, 2, 3In sink set caps:video/x-raw-yuv-strided, width=(int)1280, height=(int)720, format=(fourcc)NV12, rowstride=(int)1408, framerate=(fraction)24000/1001, interlaced=(boolean)falseip width:1280, ip height: 720, ip stride:1408In sink set caps:video/x-raw-yuv-strided, width=(int)1280, height=(int)720, format=(fourcc)NV12, rowstride=(int)1408, framerate=(fraction)24000/1001, interlaced=(boolean)falseip width:1280, ip height: 720, ip stride:1408In sink set caps:video/x-raw-yuv-strided, width=(int)1280, height=(int)720, format=(fourcc)NV12, rowstride=(int)1408, framerate=(fraction)24000/1001, interlaced=(boolean)falseip width:1280, ip height: 720, ip stride:1408created output caps:video/x-raw-yuv, width=(int)1280, height=(int)720, format=(fourcc)YUY2, framerate=(fraction)15/1In src set caps:video/x-raw-yuv, width=(int)1280, height=(int)720, format=(fourcc)YUY2, framerate=(fraction)15/1set src_setcaps height:720, width:1280Pipeline is PREROLLED ...Setting pipeline to PLAYING ...New clock: GstSystemClock
Br
Frank
I've tried a sample 720 H.264 stream with the above pipe line and the play quality looked fine. It could be a stream specific issue.Please let me know the stream name and its online availability. Also try with a different stream
the stream is available in my dropbox.
https://www.dropbox.com/sh/ukd1py4htgb3wb6/qURx8oiNvX
Let me know when you downloaded it.
one more question.
During boot there are two i2c messages:
Usage : firmware_loader <Processor Id> <Location of Firmware> <start|stop> [-mmap <memory_map_file>] [-i2c <0|1>]
Are this messages a normal behavior?
See attached log.
5127.netra-boot-log.txt
Hello Ansari,
I do get the same messages when starting the load-hd-v4l2-firmware.sh at startup.
I tried to add the -mmap /usr/share/ti/ti-media-controller-utils/mm_dm81xxbm.bin, the the firmware loader will load but the load fails (tvp7002 i2c error messages cause the system to loop forever).
The default /etc/init.d/load-hd-firmware.sh specifies a mmap file that is not present (missing underscore) and the load-hd-v4l2-firmware.sh (in /usr/share/ti/ti-media-controller-utils/) does not work when copied to /etc/init.d/load-hd-firmware.
Regards,
Lo
I've downloaded the stream.
The i2c message is normal, the firmwares are getting loaded into two cores one after another
are there any news?
Could you test the downloaded stream?
Here the situation is still the same. Starting one or four streams, the first frame is showed only.
Here are the printouts when I start one stream. Maybe you can see a hint....
gst-launch omx_videomixer port-index=0 name=mix ! v4l2sink userpointer=true filesrc location=sample_1.h264 ! 'video/x-h264' ! h264parse access-unit=true ! omx_h264dec ! mix.request pad!!creating pad with name:sink_00pad class init!!Setting sink pad:0request pad done ret!!Setting pipeline to PAUSED ...** (gst-launch-0.10:1388): CRITICAL **: gst_v4l2sink_sync_rotation: assertion `v4l2_ioctl (fd, VIDIOC_S_CTRL, &control) >= 0' failed** (gst-launch-0.10:1388): CRITICAL **: gst_v4l2sink_sync_rotation: assertion `v4l2_ioctl (fd, VIDIOC_S_CTRL, &control) >= 0' failed** (gst-launch-0.10:1388): CRITICAL **: gst_v4l2sink_sync_flip: assertion `v4l2_ioctl (fd, VIDIOC_S_CTRL, &control) >= 0' failedVideo mixer activate push!!Pipeline is PREROLLING ...In sink set caps:video/x-raw-yuv-strided, width=(int)1280, height=(int)720, format=(fourcc)NV12, rowstride=(int)1408, framerate=(fraction)24000/1001, interlaced=(boolean)falseip width:1280, ip height: 720, ip stride:1408Starting input thread...num sink pads:1ip zorder - starting from lowest: 0created output caps:video/x-raw-yuv, width=(int)1280, height=(int)720, format=(fourcc)YUY2, framerate=(fraction)15/1In src set caps:video/x-raw-yuv, width=(int)1280, height=(int)720, format=(fourcc)YUY2, framerate=(fraction)15/1set src_setcaps height:720, width:1280Pipeline is PREROLLED ...Setting pipeline to PLAYING ...New clock: GstSystemClockCaught interrupt -- handling interrupt.Interrupt: Stopping pipeline ...Execution ended after 1599904096963 ns.Setting pipeline to PAUSED ...Setting pipeline to READY ...---------------------------pressing control C after some minutes---------------------------!!!!!!!!!unreference all the remaining buffers!!!!!!!!!Video mixer activate push!!paused to ready!!setting EOS to trueWaiting for ip thread to exit..semup!!goto leave!!paused to ready...done!!Setting pipelinet81xx_vidout t81xx_vidout: VIDOUT0: invalid dequeue to NULL ...calling g_omx_core_deinitFreeing pipeline ...root@dm816x-evm:~/karnww01/frhu/netra/gst/ex80-play264#
I've downloaded the stream and able to recreate the hang issue with single stream. The stream profile shows its main profile 5.1 stream with num_ref_frame is set to 5.
The decoder needs 2*num_ref_frames + 1 to decode the stream. So if the number of output buffers for omx_h264dec is set to 11, then the pipeline is working. We are still looking into this issue.
In the mosaic chain, the h264dec optimal buffer requirements is 11 ( 2*num_ref_frames + 1). num_ref_frames value can be obtained from the stream SPS param. For 720p streams, the out buffer requirement ranges from 8 to 15, depending on the profile. I've made the changes to support different h264 output buffer count and attached the patch. The following chain is verified with this patch
gst-launch -v omx_videomixer name=mix ! v4l2sink userpointer=true filesrc location=sample_1.h264 ! gstperf! 'video/x-h264' ! h264parse access-unit=true ! omx_h264dec output-buffers=8 ! mix. filesrc location=sample_2.h264 ! 'video/x-h264' ! h264parse access-unit=true ! omx_h264dec ! mix. filesrc location=sample_3.h264 ! 'video/x-h264' ! h264parse access-unit=true ! omx_h264dec ! mix.
It is suggested always to check the "num_ref_frames" for the test streams, if its more than 5, then the h264dec output buffer count has to be updated. For ex if the num_ref_frames for a given stream is 6, then the h264dec output buffer can be updated to 12 with the following command
gst-launch -v omx_videomixer port-index=0 name=mix ! v4l2sink userpointer=true filesrc location=sample_1.h264 ! 'video/x-h264' ! h264parse access-unit=true ! omx_h264dec output-buffers=12 ! gstperf ! mix.
Note : We are able to run upto 3 channels, there are further omx level changes required to enable four channel decode, pls let me know if this is your requirement. I'll go ahead and send you the steps required to enabled 4 channel decoding. The following are the steps to test the patch
1. Copy the attached patch to $(EZSDK)/component-sources/gst-openmax_GST_DM81XX_00_05_00_00/patches/
2. cd to $(EZSDK)/component-sources/gst-openmax_GST_DM81XX_00_05_00_00
3. Type the command patch -p1 < patches/h264dec_outbuffer_update.patch
4. After the patch update, cd to the $(EZSDK) and type "make gstomx"
5. Copy the generated libgstomx.so ( component-sources/gst-openmax_GST_DM81XX_00_05_00_00/omx/.libs/libgstomx.so) to the target file system (target/usr/lib/gstreamer-0.10)
6. Test the mosaic usecase