Community
cancel
Showing results for 
Search instead for 
Did you mean: 
bangjun_lei
Beginner
106 Views

Receiving MPEG4 stream from a IP camera?

Dear Sir./Madam,

We are experimenting of receiving MPEG4 video stream from a IP camera (Linksys WVC54GC). For this purpose we wrote our own data reader DataReaderHttp that can receiving data from the http server (provided by that camera). Then we do the following:

UMC::DataReaderHttp m_dataSrc;
UMC::DataReaderHttpParams m_dataSrcParams;

UMC::MP4Splitter m_videoSplitter;
UMC::SplitterInfo* m_pVideoSplitterInfo;
UMC::SplitterParams m_videoSplitterParams;

UMC::MPEG4VideoDecoder m_videoDecoder;
UMC::VideoDecoderParams m_videoDecoderParams;
UMC::VideoData m_videoInRaw;
UMC::MediaData m_videoInCompressed;

// Initialize data reader component
m_dataSrcParams.m_strPath = m_strPath;
m_dataSrcParams.m_camPort = m_camPort;
m_dataSrcParams.m_bAuthenticationNeeded = m_bAuthenticationNeeded;
m_dataSrcParams.m_strUsername = m_strUsername;
m_dataSrcParams.m_strPassword = m_strPassword;
if(m_dataSrc.Init(&m_dataSrcParams)!=UMC::UMC_OK)
{
ReportError(_T("The video source is not available!"));
return E_FAIL;
}

// Initialize splitter component
m_videoSplitterParams.m_lFlags = UMC::VIDEO_SPLITTER; // Want to extract only video
m_videoSplitterParams.m_pDataReader = &m_dataSrc;
if(m_videoSplitter.Init(m_videoSplitterParams)!=UMC::UMC_OK)
{
ReportError(_T("The video splitter is not available!"));
return E_FAIL;
}

The executing always get stucked at " if(m_videoSplitter.Init(m_videoSplitterParams)!=UMC::UMC_OK)".

Could you help to indicate to us how we can correctly do this kind of MPEG4 stream decoding?

Thank you very much!
0 Kudos
7 Replies
Sergey_O_Intel1
Employee
106 Views

Hello!

I believe that the problem is that your stream is not an MP4 container format. Spec of your cam says:

Wireless-G Internet Home Monitoring

Camera

Specifications

Model WVC54GCA

Standards IEEE 802.11g, IEEE 802.3, IEEE 802.3u

Ports Ethernet, Power

Buttons Reset

LEDs Power

Cabling Type Cat5

Number of Antennas 1 Internal

Connector Type N/A

Detachable Antenna No

UPnP able/cert UPnP Advertise

.Net Support N/A

Security Features WEP-64, WEP-128, WPA, WPA2

Image Sensor CMOS

Lens Fixed Focus

Resolution 640 x 480, 320 x 240, 160 x 128

Relative Illumination 5.1 Lux

Effective Focus 3 mm

Sensitivity 3.0V/Lux-sec

Field of View 61.48 degrees

Compression Algorithm MPEG-4 and MJPEG

Record File Format ASF

Brightness Auto/Manual Adjustment

So it seems that your stream is ASF container and not MP4 (See ISO 14496-12). Unfortunately there's no ASF splitter in UMC release yet.

Regards

-Sergey

bangjun_lei
Beginner
106 Views

Thanks!

But they do provide both asf and mp4 streams.
Sergey_O_Intel1
Employee
106 Views

Please give me a piece of stream you get from your cam.

Concerning streaming UMC MP4 splitter can only split fragmented MP4 streams (see 14496-12)

bangjun_lei
Beginner
106 Views

Sergey, thanks! Please find attached one segment of the video stream!
Sergey_O_Intel1
Employee
106 Views

Your stream is ASF stream with one MS MPEG-4 v3 video stream inside.

So you need ASF splitter anyway. I hope it will be present in the next version of UMC.

But unfortunately UMC mpeg4 decoder is unable to decode MS MPEG-4 v3. This standard is closed. Our decoder supports ISO mpeg4 video (ISO 14496-12) only.

Can you choose the output stream format in your cam?

bangjun_lei
Beginner
106 Views

Sergey,

Thank you very much for this!

Unfortunately I cannot change the video format. Strangely enough that I can use VLC to play the video stream. Do you know by chance how they did it?

Thanks again!
Sergey_O_Intel1
Employee
106 Views

I failed to play your stream by VLC (Maybe you play streamingandI just opened your file)

Anyway closed standard only makes peopleuse theirdll to decode it.

Reply