Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Location: Apr-Oct Enderby, BC Canada Oct-Mar Somewhere warm
Distribution: Debian 6 and 7
Posts: 46
Rep:
Get image (jpg) from a Java live feed.
I have a web site that I capture an image every minute and put it on my site and then at midnight turn it into a movie.
Since the ISS is now streaming a live feed I thought it would be good to get am image from there and put it on my site and the next day could see a timelapse of the day.
Looks like a Flash stream to me. I'm thinking maybe something using rtmpdump to capture say 1 second of video then shoving that through ffmpeg to extract an image. Maybe. The stream just shows a solid blue right now so not the best to experiment with.
It occurs to me that a problem with that method is that you have to stream the video all day to get the images. That'll suck bandwidth, which may or may not be an issue for you, and there's the risk ffmpeg will crap out at some point.
Better is something you can call from cron once a minute. I'm thinking this
In theory that will grab a frame five seconds in to the stream (to give it time to get going, otherwise image is always grey) and save it as an image the name of which is a function of the current time. It seems to work. The stream is a crappy purple/black video right now though and the iss-hdev-payload is just black.
Location: Apr-Oct Enderby, BC Canada Oct-Mar Somewhere warm
Distribution: Debian 6 and 7
Posts: 46
Original Poster
Rep:
Quote:
Originally Posted by arizonagroovejet
It occurs to me that a problem with that method is that you have to stream the video all day to get the images. That'll suck bandwidth, which may or may not be an issue for you, and there's the risk ffmpeg will crap out at some point.
Better is something you can call from cron once a minute. I'm thinking this
In theory that will grab a frame five seconds in to the stream (to give it time to get going, otherwise image is always grey) and save it as an image the name of which is a function of the current time. It seems to work. The stream is a crappy purple/black video right now though and the iss-hdev-payload is just black.
That seems to work except the image is very small and there is this message in red when run on the command line.
[buffer @ 0x25cfd80] Buffering several frames is not supported. Please consume all available frames before adding a new one.
Will have to try and find a way to make the image higher quality ?? The image I am using now
is about 138325 May 19 18:12 img-1096.jpg and these ones are a lot smaller 4036 May 19 18:04 1400547844.jpg
I added -s 640x480 to the output to make it a bit bigger.
Given the quality of the source material I think trying to get ffmpeg make a better quality video is pointless. The best way to get a better quality video is to have better quality source material.
Quote:
Originally Posted by dingo-den
I also produce a mp4 from the avi later to upload to youtube and it would be good to make that a better quality as well ?
I have tried a lot of things but can;t get a nice crisp image
The obvious way to get better quality is by making the mp4 from the original source images, not from the avi. Given the quality of the source material you probably won't be able to see the difference though. You aren't going to get a nice crisp image because your source material is fuzzy blurry images.
Location: Apr-Oct Enderby, BC Canada Oct-Mar Somewhere warm
Distribution: Debian 6 and 7
Posts: 46
Original Poster
Rep:
One more thing you might help me with. I just looked at the first video of the ISS that I made and it goes really really quick. I use this command to make the video, what can I add to make it play slower.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.