curl-library
Issue with playback of video captured by libcurl
Date: Thu, 29 Jun 2017 13:01:27 +0530
Hi All,
I am facing an issue with regards to the playback of the video recorded
using libcurl command.
The usecase is I am using libcurl API to record content from a webcam.
When I try to playback that recorded content on my Windows m/c using VLC
player I observe the following
- Sometimes the video will play at high speeds, as if is being fast
forwarded.
- Sometimes it will display only 1 frame and exit.
I have set the following options
curl_easy_setopt(curl, CURLOPT_URL, record_data->url);
//URL For H264 format http://<username>:<pwd>@<ip of the
webcam>/h264.mpt
//URL for mjpg format- http://<username>:<pwd>@<ip of the
webcam>/video/mjpg.cgi
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_data_cam);
curl_easy_setopt(curl, CURLOPT_HEADER, 0L);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, cam_bodyfile);
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0L);
curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, record_progress);
curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, record_data);
res = curl_easy_perform(curl);
I am storing the content in a <filename>.avi file.
I opened the avi file generated and I am seeing the following content
other than the video data.
for mjpg
--video boundary--
Content-length: 30820
Date: 01-01-2015 12:11:59 AM IO_00000000_PT_000_000
Content-type: image/jpeg
for h264
--video boundary--
Content-length: 11184
Date: 01-01-2015 12:29:46 AM IO_00000000_PT_000_000
Content-type: video/h264
A couple of queries -
1 - Is there anything missing , that is required to record the content
properly?
2 - Is there a way to disable the above mentioned content getting added
to download content?
I am using the curl version 7.54
Thanks n Regards,
Vinod
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-06-29