Viewing a multicast video stream on the imx53 Quick Start Board

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Viewing a multicast video stream on the imx53 Quick Start Board

25,773 次查看
MaximAnisimov
Contributor I

Hi, I want to play multicast video stream on the imx53 Quick Start Board (Ubuntu 10.04 L2.6.35_11.09.01). But the device can not play it correctly for reasons unknown to me. My network scheme is following:494-NetworkScheme.png

To play a multicast video on the device, I did the following:

1) Network buffer of the device was increased and IGMP setted to v2

echo 204800 > /proc/sys/net/core/rmem_max

echo 2 > /proc/sys/net/ipv4/conf/all/force_igmp_version

echo 2 > /proc/sys/net/ipv4/conf/default/force_igmp_version

2) imx53 Quick Start Board getting network settings from DHCP service.

3) for playing udp stream to network I used notebook with VLC player running. To run VLC I made the following:

a) Tools->Preferences(Show settings - switch to all)->Stream Output->Access Output. Set "Multicast output interface" and "IPv4 multicast output interface address" to my ip address of notebook network interface.

b) We can play video using next steps. Open "Media" menu, next "Streaming", add video file to list, press button "Stream", press button "Next" on the new opened dialog, select "New destination" to UDP (legacy), press button "Add", set address to 239.0.0.1 and port to 1234, uncheck "Activate transcoding", then press "Stream" button to start streaming video.

4) On the device I try to use the following commands:

gst-launch udpsrc multicast-group=239.0.0.1 auto-multicast=true port=1234 buffer-size=1000000 ! decodebin2 use-buffering=true max-size-buffers=32 max-size-bytes=1000000 ! mfw_v4lsink

gst-launch udpsrc multicast-group=239.0.0.1 auto-multicast=true port=1234 ! decodebin2 ! mfw_v4lsink

 

The log of commands:

MFW_GST_V4LSINK_PLUGIN 2.0.3 build on Nov 12 2011 10:13:27.
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Aiur: 2.0.3
Core: BLN_MAD-MMLAYER_MPG2PARSER_ARM11_04.00.05 build on Sep 22 2011 11:18:22
mime: video/mpeg, mpegversion=(int)[1,2]; video/mpegts,
systemstream=true; video/x-cdxa
file: lib_mpg2_parser_arm11_elinux.3.0.so.4.00.04
Content Info:
Seekable : No
Size(byte): -1

Mpeg2CreateParser:parser created successfully
Movie Info:
Seekable : No
Live : Yes
Duration : 0:00:00.000000000
ReadMode : File
AutoRetimestamp: 2000ms
Track : 2

Track 00[Audio]: Enabled
Duration: 0:00:00.000000000
Language:
Mime:
audio/mpeg, mpegversion=(int)1, parsed=(boolean)true,
channels=(int)2, rate=(int
)48000, bitrate=(int)384
BLN_MAD-MMCODECS_MP3D_ARM_02.10.00_CORTEX-A8 build on Jul 7 2011 11:02:16.
MFW_GST_MP3_DECODER_PLUGIN 2.0.3 build on Nov 12 2011 10:13:37.
Track 01[Video]: Enabled
Duration: 0:00:00.000000000
Language:
Mime:
video/x-h264, parsed=(boolean)true, width=(int)1920,
height=(int)1088, framerate
=(fraction)30/1
[INFO] Product Info: i.MX53
VPU Version: firmware 13.4.41; libvpu: 5.3.2
MFW_GST_VPU_DECODER_PLUGIN 2.0.3 build on Nov 12 2011 10:13:04.

 

On log it is clear that the video was detected, but we could not see anything on the screen. Also tried to reproduce the flow through the totem video player (see the screenshots in the enclosure), but also no success.

 

Could Somebody help with this problem?

Someone tried to play the video using multicast UDP streaming?

标记 (1)
0 项奖励
回复
18 回复数

21,273 次查看
MaximAnisimov
Contributor I

Yes, RTP/RTSP works. But I have not tested it with 1080p video stream.
 
Lukasz Pulka said:

I think somebody already solved this, there is no limitation to play mpeg-ts stream vs stream from NFS.

As for 1080p stream it may be impossible to play high bandwidth stream because some hardware bug, or chip limitation 

I got some UDP checksum errors, when playing files from NFS root, see http://forums.freescale.com/t5/i-MX-Microprocessors/imx53qsb-gst-la....

Do RTP streams work for you?

0 项奖励
回复

21,273 次查看
LukaszPulka
Contributor I

I think somebody already solved this, there is no limitation to play mpeg-ts stream vs stream from NFS.

As for 1080p stream it may be impossible to play high bandwidth stream because some hardware bug, or chip limitation 

I got some UDP checksum errors, when playing files from NFS root, see http://forums.freescale.com/t5/i-MX-Microprocessors/imx53qsb-gst-la....

Do RTP streams work for you?

0 项奖励
回复

21,273 次查看
MaximAnisimov
Contributor I

Thank you for the information. I hope freescale will solve this issue.

Lukasz Pulka said:

Few months ago I have had lots of problem with MPEG-TS multicast stream playback. I have used BSP 11.05.

Low bandwidth stream (3500kbit/s) was not played correctly when received from udpsrc, however the same stream played from NFS mounted root filesystem worked like a charm.

Unfortunatelly I got no luck with playing 1080p stream from NFS drive or udp multicast stream.

Finally I got response from Freescale Support that they do not support this mode and they do not known any opensource solution which allows playing MPEG-TS multicast streams with iMX5.3, as I can notice from above posts nothing has changed yet. Unfortunately.

  

0 项奖励
回复

21,273 次查看
LukaszPulka
Contributor I

Few months ago I have had lots of problem with MPEG-TS multicast stream playback. I have used BSP 11.05.

Low bandwidth stream (3500kbit/s) was not played correctly when received from udpsrc, however the same stream played from NFS mounted root filesystem worked like a charm.

Unfortunatelly I got no luck with playing 1080p stream from NFS drive or udp multicast stream.

Finally I got response from Freescale Support that they do not support this mode and they do not known any opensource solution which allows playing MPEG-TS multicast streams with iMX5.3, as I can notice from above posts nothing has changed yet. Unfortunately.

0 项奖励
回复

21,273 次查看
MaximAnisimov
Contributor I

Unfortunately, the result is not changed. Here are the logs of commands


Log1:

lucid@lucid-desktop:~$ gst-launch playbin2 uri=udp://239.0.0.77:1234 video-sink="mfw_v4lsink sync=false"
MFW_GST_V4LSINK_PLUGIN 1.9.7-1 build on Jan 28 2011 13:35:23.
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock

(gst-launch-0.10:5843): GStreamer-CRITICAL **: gst_debug_log_valist: assertion `category != NULL' failed

(gst-launch-0.10:5843): GStreamer-CRITICAL **: gst_debug_log_valist: assertion `category != NULL' failed
duration=-1 0
Aiur Core Info:
mime: video/mpeg, mpegversion=(int)[1,2]; video/mpegts, systemstream=true; video/x-cdxa
file: lib_mpg2_parser_arm11_elinux.3.0.so
ver : BLN_MAD-MMLAYER_MPG2PARSER_ARM11_03.50.02 build on Dec 30 2010 02:33:35
goto jail
try seek 0

Log2:

lucid@lucid-desktop:~$ export GST_DEBUG=2,mfw_vpudecoder:4
lucid@lucid-desktop:~$ gst-launch playbin2 uri=udp://239.0.0.77:1234 video-sink="mfw_v4lsink sync=false"
MFW_GST_V4LSINK_PLUGIN 1.9.7-1 build on Jan 28 2011 13:35:23.
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock

(gst-launch-0.10:6129): GStreamer-CRITICAL **: gst_debug_log_valist: assertion `category != NULL' failed

(gst-launch-0.10:6129): GStreamer-CRITICAL **: gst_debug_log_valist: assertion `category != NULL' failed
duration=-1 0
Aiur Core Info:
mime: video/mpeg, mpegversion=(int)[1,2]; video/mpegts, systemstream=true; video/x-cdxa
file: lib_mpg2_parser_arm11_elinux.3.0.so
ver : BLN_MAD-MMLAYER_MPG2PARSER_ARM11_03.50.02 build on Dec 30 2010 02:33:35
Mpeg2CreateParser:parser created successfully
0:00:02.594919729 6129 0xfba68 WARN aiurdemux aiurdemux.c:2650:aiurdemux_parse_tracks: Warning: API[getLanguage] not implement!

BLN_MAD-MMCODECS_AACD_ARM_03.05.00 build on Nov 25 2009 15:02:24.
MFW_GST_AAC_PLUGIN 1.9.7-1 build on Jan 28 2011 13:36:06.
Movie Info:
Seekable: No
Live: Yes
Duration: 0:00:00.000000000
ReadMode: File

Total Track: 1
Track 00[Audio]:
Duration: 0:00:00.000000000
Language: 
Mime:
audio/mpeg, mpegversion=(int)4, channels=(int)2, rate=(int)48000, bitrate=(int)2
88375


Ji Jian Feng said:

Could you play the video on i.MX53 board with playbin2 command?

0 项奖励
回复

21,273 次查看
JiJianFeng
Contributor I

Could you play the video on i.MX53 board with playbin2 command?

0 项奖励
回复

21,273 次查看
MaximAnisimov
Contributor I

It is a pity that you cannot use my files. I think the freezes are due to transcoding options in vlc. Try use a file with the appropriate content(h264+aac) without transcoding option.


Ji Jian Feng said:

The video is not smoothly even in my powerful Ubuntu PC.

0 项奖励
回复

21,273 次查看
JiJianFeng
Contributor I

I could not use your cap files but now I can run vlc to test this udp streaming.

My steps:

VLC server:
1. VLC: Select Media->Streaming, first add file then click "stream" button.
2. Next to select Destination to UDP select 239.0.0.1, port: 1234. also transcode to H264+AAC format.

MX53 client:
1. gst-launch playbin2 uri=udp://239.0.0.1:1234 video-sink="mfw_v4lsink sync=false"

The video is not smoothly even in my powerful Ubuntu PC. I am not sure what's wrong but it could be timestamp related issue. need more investigation.

0 项奖励
回复

21,273 次查看
MaximAnisimov
Contributor I

My PC network settings:

netspider@netspider-nb:~$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:24:54:87:3d:36
inet addr:192.168.1.103 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::224:54ff:fe87:3d36/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:620 errors:0 dropped:0 overruns:0 frame:0
TX packets:4156 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:896845 (896.8 KB) TX bytes:5098576 (5.0 MB)
Interrupt:19

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

netspider@netspider-nb:~$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default phoenix 0.0.0.0 UG 0 0 0 eth0
link-local * 255.255.0.0 U 1000 0 0 eth0
192.168.1.0 * 255.255.255.0 U 1 0 0 eth0

 

For streaming on the network interface eth0 (maybe you have another interface name?) just run command like this:

netspider@netspider-nb:~$ sudo tcpreplay -i eth0 /mnt/d/10/fashiontv_77.cap
[sudo] password for netspider:
sending out eth0
processing file: /mnt/d/10/fashiontv_77.cap
^C
Actual: 6495 packets (8820210 bytes) sent in 9.43 seconds
Rated: 935335.1 bps, 7.14 Mbps, 688.76 pps
netspider@netspider-nb:~$

 

Network settings on the client: 

lucid@lucid-desktop:~$ ifconfig
eth13 Link encap:Ethernet HWaddr 00:04:9f:01:c9:28
inet addr:192.168.1.105 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:165 errors:0 dropped:0 overruns:0 frame:0
TX packets:119 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:16434 (16.4 KB) TX bytes:14694 (14.6 KB)
Base address:0x6000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:108 errors:0 dropped:0 overruns:0 frame:0
TX packets:108 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:5560 (5.5 KB) TX bytes:5560 (5.5 KB)

lucid@lucid-desktop:~$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 * 255.255.255.0 U 1 0 0 eth13
link-local * 255.255.0.0 U 1000 0 0 eth13
default phoenix 0.0.0.0 UG 0 0 0 eth13
lucid@lucid-desktop:~$

 

I think next problems can take place in this case:
1) tcpreplay command not installed on the host
sudo apt-get install tcpreplay
2) Problems with routes on the host or client. You could use this command on client and pc:
route add -p 239.0.0.0 mask 255.0.0.0 dev eth0
3) Network interface configured without multicast support.

 

I hope this helps you.
Thanks

0 项奖励
回复

21,273 次查看
JiJianFeng
Contributor I

Could you provide more detail information about how to run it.

I tried to run it in Linux Oneiric PC but failed:

sudo tcpreplay -i eth0 fashiontv_77.cap

gst-launch udpsrc multicast-group=239.0.0.77 auto-multicast=true port=1234 buffer-size=100000 ! decodebin2 use-buffering=true max-size-buffers=32 max-size-bytes=1000000 ! xvimagesink sync=fals

 

but I could not receive any packets, what's wrong with my environment or command?

Thanks.

0 项奖励
回复

21,272 次查看
MaximAnisimov
Contributor I

http://howfile.com/file/2b3d1de5/2c987793/

http://howfile.com/file/2b3d1de5/547f37ac/



Ji Jian Feng said:

From your log, I did not find the vpu decoder plugin which is a little weired. Also I could not connect to rapidshare website, could you upload it to another place or just send me via attachment. my email account : dexter.ji@freescale.com

0 项奖励
回复

21,273 次查看
VicCiv
Contributor I

Hi, Max!

Your idea nice. Sorry, then not possible help you. 

But I see, you make Linux 11.09 from Freescale.

Please, if possible, give this version in .img format.

0 项奖励
回复

21,273 次查看
JiJianFeng
Contributor I

From your log, I did not find the vpu decoder plugin which is a little weired. Also I could not connect to rapidshare website, could you upload it to another place or just send me via attachment. my email account : dexter.ji@freescale.com

0 项奖励
回复

21,273 次查看
MaximAnisimov
Contributor I

https://rapidshare.com/files/2525803715/myzentv_83.cap     - udp stream dump from iptv network (udp://239.0.0.83:1234)

 

sudo tcpreplay -i eth0 fashiontv_77.cap

sudo tcpreplay -i eth0 myzentv_83.cap

0 项奖励
回复

21,273 次查看
MaximAnisimov
Contributor I

https://rapidshare.com/files/1096730931/fashiontv_77.cap    - udp stream dump from iptv provider network (udp://239.0.0.77:1234)

0 项奖励
回复

21,273 次查看
MaximAnisimov
Contributor I

Log1:

MFW_GST_V4LSINK_PLUGIN 1.9.7-1 build on Jan 28 2011 13:35:23

Setting pipeline to PAUSED ...

Pipeline is live and does not need PREROLL ...

Setting pipeline to PLAYING ...

0:00:00.115181238  6217    0x16050 WARN                     bin gstbin.c:2312:gst_bin_do_latency_func:<pipeline0> failed to query latencyNew clock: GstSystemClock
(gst-launch-0.10:6217): GStreamer-CRITICAL **: gst_debug_log_valist: assertion `category != NULL' failed
(gst-launch-0.10:6217): GStreamer-CRITICAL **: gst_debug_log_valist: assertion `category != NULL' failedduration=-1 0

Aiur Core Info: 

mime: video/mpeg, mpegversion=(int)[1,2]; video/mpegts, systemstream=true; video/x-cdxa 

file: lib_mpg2_parser_arm11_elinux.3.0.so 

ver : BLN_MAD-MMLAYER_MPG2PARSER_ARM11_03.50.02  build on Dec 30 2010 02:33:35

goto jailtry

seek 0

 

Log2:

MFW_GST_V4LSINK_PLUGIN 1.9.7-1 build on Jan 28 2011 13:35:23.
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
0:00:00.115382741 6474 0x16050 WARN bin gstbin.c:2312:gst_bin_do_latency_func:<pipeline0> failed to query latency
New clock: GstSystemClock

(gst-launch-0.10:6474): GStreamer-CRITICAL **: gst_debug_log_valist: assertion `category != NULL' failed

(gst-launch-0.10:6474): GStreamer-CRITICAL **: gst_debug_log_valist: assertion `category != NULL' failed
duration=-1 0
Aiur Core Info:
mime: video/mpeg, mpegversion=(int)[1,2]; video/mpegts, systemstream=true; video/x-cdxa
file: lib_mpg2_parser_arm11_elinux.3.0.so
ver : BLN_MAD-MMLAYER_MPG2PARSER_ARM11_03.50.02 build on Dec 30 2010 02:33:35
Mpeg2CreateParser:parser created successfully
0:00:02.709026952 6474 0x44d50 WARN aiurdemux aiurdemux.c:2650:aiurdemux_parse_tracks: Warning: API[getLanguage] not implement!

BLNUnhandled fault: external abort on non-linefetch (0x1018) at 0x2cd69054
_MAD-MMCODECS_AACD_ARM_03.05.00 build on Nov 25 2009 15:02:24.
MFW_GST_AAC_PLUGIN 1.9.7-1 build on Jan 28 2011 13:36:06.
Movie Info:
Seekable: No
Live: Yes
Duration: 0:00:00.000000000
ReadMode: File

Total Track: 1
Track 00[Audio]:
Duration: 0:00:00.000000000
Language:
Mime:
audio/mpeg, mpegversion=(int)4, channels=(int)2, rate=(int)44100, bitrate=(int)1
04737

 

Log3:

MFW_GST_V4LSINK_PLUGIN 1.9.7-1 build on Jan 28 2011 13:35:23.
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
0:00:00.114614607 6666 0x16050 WARN bin gstbin.c:2312:gst_bin_do_latency_func:<pipeline0> failed to query latency
New clock: GstSystemClock

(gst-launch-0.10:6666): GStreamer-CRITICAL **: gst_debug_log_valist: assertion `category != NULL' failed

(gst-launch-0.10:6666): GStreamer-CRITICAL **: gst_debug_log_valist: assertion `category != NULL' failed
duration=-1 0
Aiur Core Info:
mime: video/mpeg, mpegversion=(int)[1,2]; video/mpegts, systemstream=true; video/x-cdxa
file: lib_mpg2_parser_arm11_elinux.3.0.so
ver : BLN_MAD-MMLAYER_MPG2PARSER_ARM11_03.50.02 build on Dec 30 2010 02:33:35
Mpeg2CreateParser:parser created successfully
0:00:02.986118586 6666 0xf3888 WARN aiurdemux aiurdemux.c:2650:aiurdemux_parse_tracks: WarninUnhandled fault: external abort on non-linefetch (0x1018) at 0x2c4f7054
g: API[getLanguage] not implement!

BLN_MAD-MMCODECS_AACD_ARM_03.05.00 build on Nov 25 2009 15:02:24.
MFW_GST_AAC_PLUGIN 1.9.7-1 build on Jan 28 2011 13:36:06.
Movie Info:
Seekable: No
Live: Yes
Duration: 0:00:00.000000000
ReadMode: File

Total Track: 1
Track 00[Audio]:
Duration: 0:00:00.000000000
Language:
Mime:
audio/mpeg, mpegversion=(int)4, channels=(int)2, rate=(int)48000, bitrate=(int)1
08000

 

 

Any ideas?

0 项奖励
回复

21,273 次查看
MaximAnisimov
Contributor I

Thank you very much for quick reply. RTSP and RTP streaming works well.

In my case I used different scheme.

There is an iptv provider which produces tv in own network. I order to watch it on device I perform the following steps:

1) The device sends an IGMP request to subscribe for multicast stream (usualy it's 239.0.0.x, for example 239.0.0.77) to provider equipment

2) Active equipment of provider in response to a request begins to send multicast packages on the device port. 

3) The device detects the stream and start playing.

4) The device sends an IGMP request to unsubscribe from a multicast stream when the user stops watching the video

 

In the near time I will provide more information using GST_DEBUG = 2, mfw_vpudecoder: 4

I can also provide a dump of the stream from the iptv provider. It can be played using the command tcpreplay -i eth0 stream.cap

0 项奖励
回复

21,273 次查看
JiJianFeng
Contributor I

Could you export GST_DEBUG=2,mfw_vpudecoder:4 to get more information,

One example for udp streaming:

mx53 client:

gst-launch-0.10 -v udpsrc port=5434 caps="application/x-rtp, media=(string)video,  clock-rate=(int)90000,encoding-name=(string)MP4V-ES,  profile-level-id=(string)4,config=(string)000001b004000001b59113000001000000012000c888800f514043c14103" ! rtpmp4vdepay ! mfw_vpudecoder codec-type=std_mpeg4 loopback=false min_latency=true !  mfw_v4lsink

x86 server & usb camera:
gst-launch v4l2src ! 'video/x-raw-yuv, format=(fourcc)YUY2,width=640, height=480' ! ffmpegcolorspace ! ffenc_mpeg4 ! rtpmp4vpay send-config=true ! udpsink host=10.192.241.129 port=3000 max-lateness=100000000

0 项奖励
回复