SnowLeopard
Posts: 106
Joined: Sun Aug 18, 2013 6:10 am

raspivid --timeout 0 not working

Tue Oct 22, 2013 4:42 pm

raspivid --timeout 0 -o test.h264 no longer records indefinitely, but rather creates a 19 byte file and exists immediately.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26857
Joined: Sat Jul 30, 2011 7:41 pm

Re: raspivid --timeout 0 not working

Wed Oct 23, 2013 11:04 am

I can see the problem, mainly hadn't realised anyone would want to do that given the other options. I'll sort it out.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

towolf
Posts: 421
Joined: Fri Jan 18, 2013 2:11 pm

Re: raspivid --timeout 0 not working

Wed Oct 23, 2013 2:10 pm

This option was highly appreciated. We had a lot of talk months ago about what the maximum milliseconds are that fit into a 32-bit integer.

Then finally someone came to send a pull request (actually more than one person did) to make -t 0 indefinite operation. Now it's clobbered again.

Wasn't there something about a slow motion train wreck?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26857
Joined: Sat Jul 30, 2011 7:41 pm

Re: raspivid --timeout 0 not working

Wed Oct 23, 2013 2:14 pm

towolf wrote:This option was highly appreciated. We had a lot of talk months ago about what the maximum milliseconds are that fit into a 32-bit unsigned integer.

Then finally someone came to send a pull request (actually more than one person did) to make -t 0 indefinite operation. Now it's clobbered again.

Wasn't there something about a slow motion train wreck?
Ah, I presume you have never made a mistake in your own code. Must be great to be perfect. How do you manage to get your head through the door?

You really are a most unpleasant and ungrateful person. Note to self, if towolf puts in a change request, ignore it forever.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

towolf
Posts: 421
Joined: Fri Jan 18, 2013 2:11 pm

Re: raspivid --timeout 0 not working

Wed Oct 23, 2013 2:31 pm

Well, I'm now backtracking through git (which you called a slow motion train wreck) to find a last-known-good commit. And doing that takes a lot of time.

Meanwhile (waiting for compiles) I took the time to notify you that the recent changes had side effects, since you said you were not aware that anybody would use this feature. Now you know. But you call me ungrateful.

And anyway, ignoring the threats which we had already, I defer to Linus Torvalds (incidentally the author of git), who says that unnecessary politeness hinders technical progress on the internet.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26857
Joined: Sat Jul 30, 2011 7:41 pm

Re: raspivid --timeout 0 not working

Wed Oct 23, 2013 3:02 pm

SnowLeopard wrote:raspivid --timeout 0 -o test.h264 no longer records indefinitely, but rather creates a 19 byte file and exists immediately.
OK, have fixed the code and seems to work OK now.

I've pushed to my github, which will also include setting the max possible bitrate to 25Mbits/s to stop the hard lockup reported at higher values (no point going higher than that anyway 1080p, a since 17Mbits/s is regarded as the best compromise of size vs quality), and setting the shutter speed every frame in a multi frame capture.

Also updates the docs.

So if people can try the bug_fixes branch and give it a bit of a test that would be much appreciated.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

poing
Posts: 1132
Joined: Thu Mar 08, 2012 3:32 pm

Re: raspivid --timeout 0 not working

Wed Oct 23, 2013 4:35 pm

The images remain the same brightness now when using -tl, but I get:

Code: Select all

raspistill -t 60000 -tl 1000 -w 250 -h 250 -ss 345000 -ISO 800 -o img/test%d.jpg
mmal: Skipping frame 3 to restart at frame 4
mmal: Skipping frame 5 to restart at frame 6
mmal: Skipping frame 8 to restart at frame 9
mmal: Skipping frame 10 to restart at frame 11
mmal: Skipping frame 12 to restart at frame 13
mmal: Skipping frame 14 to restart at frame 15
mmal: Skipping frame 16 to restart at frame 17
mmal: Skipping frame 18 to restart at frame 19
In the past I never got the frame skipping IIRC, even with full res and also -tl 1000.

SnowLeopard
Posts: 106
Joined: Sun Aug 18, 2013 6:10 am

Re: raspivid --timeout 0 not working

Wed Oct 23, 2013 4:37 pm

  • 25 mbit/s fix: works. Using a higher value lowers it to 25mbit. Although I would have expected exiting with an error about using a value out of range (or at least a stderr warning). I fully expect someone to get confused by requesting >25mbit and not being warned the value is out of range, and not understanding why videos never have higher bw. The only way you see the value is overridden is running with '-v'
  • shutter speed: works. raspistill -n -v -tl 500 -ex sports -ss 1000 -o shut1000-%d.jpg gave 6 images with same exif exposure time and look all the same to the eye
  • timeout: does not work. raspivid exits gracefully after 10 seconds when "-t 0" is used. Changing the vcos_sleep(10000) to 5000 at line 1156 makes it exit after 5 seconds. Not sure what the fix is.

SnowLeopard
Posts: 106
Joined: Sun Aug 18, 2013 6:10 am

Re: raspivid --timeout 0 not working

Wed Oct 23, 2013 4:54 pm

poing wrote:In the past I never got the frame skipping IIRC, even with full res and also -tl 1000.
I've been getting these skipping frame messages since playing with the shutter speed option. If you check "vcdbg msg log" (or with -f) you'll get matching ca_process_frame_frames: metadata_image NULL messages appearing.

I am getting mmal: mmal_vll_load: could not load VLL 'videnc.vll': each time I run raspivid though. I just rebooted to be sure it was not provoked by an unclean crash or something, and the mmal message appeared right after raspivid said "Starting video capture", and a new mmal message is generated everytime raspivid is run.
The raw recorded video plays fine in vlc, so not sure what's going on there.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26857
Joined: Sat Jul 30, 2011 7:41 pm

Re: raspivid --timeout 0 not working

Wed Oct 23, 2013 4:59 pm

Consider that if you mess arund with shutter speed, but also are trying to hit 30fps (which needs a minimum shutter speed of 33ms) you may start to drop frames. They are highly interrelated.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: raspivid --timeout 0 not working

Sat Oct 26, 2013 5:50 am

hallo, a beginner question:
also for raspistill i tried the t 0 / run forever / option and -k and -l
and they not work as described in the github manual.
pls. help, what are the steps to get the new version?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26857
Joined: Sat Jul 30, 2011 7:41 pm

Re: raspivid --timeout 0 not working

Sat Oct 26, 2013 8:42 am

KLL wrote:hallo, a beginner question:
also for raspistill i tried the t 0 / run forever / option and -k and -l
and they not work as described in the github manual.
pls. help, what are the steps to get the new version?
Try

sudo rpi-update
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: raspivid --timeout 0 not working

Sun Oct 27, 2013 1:57 am

thanks very much, i did not know about that one,
the apt-get update / upgrade i did a lot.
-l , -k, -t already tested. good service!
as my system ( SD, new noobs.. ) is only a week old
looks like that is recommended with every new installation.

User avatar
mentar
Posts: 17
Joined: Wed Jul 04, 2012 11:47 am
Location: London
Contact: Website

Re: raspivid --timeout 0 not working

Thu Jan 16, 2014 12:01 pm

Thanks for putting the feature back in, it's necessary for streaming, which is working well indeed :)

Return to “Camera board”