Quote:
I use ffplay only to watch stream.
|
Ok, is there something in posts 2 and 4 that doesn't work for you?
Edit:
When you say that you are watching the stream with ffplay, do you mean the stream from the camera, or the file after it has been downloaded to your HD? Stream means what is coming from the camera.
If you mean a file after it has already been made, and you don't like the quality, then you'll need to configure Motion to stop encoding in poor q and make a better q.
Or grab the stream coming from the camera, with v4l, or ffmpeg, and dump to file raw, then reencode to the format that you want.
Or encode to a good format on the fly.
Quote:
Stream coming from IP-camera is already compressed.
|
Does that mean that it is already encoded in to a format like x264?
Then you'll need to start there.
Looked at this
http://www.linux-projects.org/downlo...es/motion.conf
Looks like it uses v4l2 and ffmpeg.
You should be able access the cam, with v4l2 then, and encode the stream however you want.
Example:
Code:
ffmpeg -f v4l2 -s 320x240 -i /dev/video0 -c:v libx264 -b:v 300k out.avi
ffplay -f v4l2 -s 320x240 -i /dev/video0
Edit2:
Look at the man pages and docs for ffmpeg and v4l2
A better q will probably be
Code:
ffmpeg -f v4l2 -s 320x240 -i /dev/video0 -crf 18 -preset slow -s 640x480 output.mp4
Not sure if you can do that on the fly though. Depends on how good a processor that you have. You may want to dump raw then reencode later.
Edit3:
Sorry, I keep finding things in my noted that will help you out.
Code:
v4l2-ctl --list-formats-ext
v4l2-ctl --list-device
ffmpeg -f video4linux2 -list_formats all -i /dev/video0