Difference between revisions of "Using FFmpeg with Video API"
(9 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | + | {{en|ru=Using FFmpeg with Video API.Ru|cn=Using FFmpeg with Video API.cn}} | |
+ | |||
+ | For saving the video stream in same view, as it user see, you can use the next command: | ||
<nowiki>ffmpeg -f mjpeg -i http://192.168.0.9/mjpg/video.mjpg video.mjpg</nowiki> | <nowiki>ffmpeg -f mjpeg -i http://192.168.0.9/mjpg/video.mjpg video.mjpg</nowiki> | ||
− | + | Later you can transform this file to other format, for example: | |
− | <nowiki>ffmpeg -r 6 -i | + | <nowiki>ffmpeg -r 6 -i video.mjpg -vc copy video.avi</nowiki> |
− | + | In this case will be created the avi-file with FPS=6 and with NON-REENCODED data, i.e. simply the Jpeg-frames will be copied to the specified place as avi-file. You MUST specify the option "-r" (FPS), in other case the avi-file will be created with default FPS and this value can be very different from the original live video stream. | |
− | + | Also you can save the stream directly in specified format. In this case you can use the two commands above together at the same time: | |
<nowiki>ffmpeg -r 6 -f mjpeg -i http://192.168.0.9/mjpg/video.mjpg -vc copy video.avi</nowiki> | <nowiki>ffmpeg -r 6 -f mjpeg -i http://192.168.0.9/mjpg/video.mjpg -vc copy video.avi</nowiki> | ||
− | + | If you want to save the stream in separated JPEG-files, it is necessary to use the next command: | |
<nowiki>ffmpeg -r 6 -f mjpeg -i http://192.168.0.9/mjpg/video.mjpg -vc copy %d.jpg</nowiki> | <nowiki>ffmpeg -r 6 -f mjpeg -i http://192.168.0.9/mjpg/video.mjpg -vc copy %d.jpg</nowiki> | ||
− | + | The ffplay application is included to ffmpeg package which can play the live or recorded video: | |
<nowiki>ffplay -r 6 -f mjpeg -i http://192.168.0.9/mjpg/video.mjpg</nowiki> | <nowiki>ffplay -r 6 -f mjpeg -i http://192.168.0.9/mjpg/video.mjpg</nowiki> | ||
<nowiki>ffplay -r 6 -i video.mjpg</nowiki> | <nowiki>ffplay -r 6 -i video.mjpg</nowiki> |
Latest revision as of 13:36, 23 December 2005
in English | [[{{{de}}}|deutsch]] | [[{{{fr}}}|français]] | по-русски | автоперевод | 中文版 | 机械翻译
For saving the video stream in same view, as it user see, you can use the next command:
ffmpeg -f mjpeg -i http://192.168.0.9/mjpg/video.mjpg video.mjpg
Later you can transform this file to other format, for example:
ffmpeg -r 6 -i video.mjpg -vc copy video.avi
In this case will be created the avi-file with FPS=6 and with NON-REENCODED data, i.e. simply the Jpeg-frames will be copied to the specified place as avi-file. You MUST specify the option "-r" (FPS), in other case the avi-file will be created with default FPS and this value can be very different from the original live video stream.
Also you can save the stream directly in specified format. In this case you can use the two commands above together at the same time:
ffmpeg -r 6 -f mjpeg -i http://192.168.0.9/mjpg/video.mjpg -vc copy video.avi
If you want to save the stream in separated JPEG-files, it is necessary to use the next command:
ffmpeg -r 6 -f mjpeg -i http://192.168.0.9/mjpg/video.mjpg -vc copy %d.jpg
The ffplay application is included to ffmpeg package which can play the live or recorded video:
ffplay -r 6 -f mjpeg -i http://192.168.0.9/mjpg/video.mjpg
ffplay -r 6 -i video.mjpg