0

When I run command:

raspivid -t 15000 -o > test_vid.h264

Raspicam's red light stays on, but I only get file test_vid.h264 which size is 0 bytes.

Ras Pi still works fine.

I have googled that raspivid doesn't work properly on Raspberry Pi B+.

Should I get raspivid to work or are there any other programs for Rasbian jessie that I might use to test if my raspicam can record video?

  • Your mistake here is combining -o with redirection (>). – goldilocks Nov 4 '15 at 22:38
  • Look at my comment to Linus answer. – Redex Nov 5 '15 at 10:17
  • It would be an easy thing to get confused about if you are not familiar with orthodox CLI practices (e.g., the use of switches such as -o) and how POSIX shells such as bash redirect output. Linus does a decent job of explaining that in this case. WRT switches, aka. options, most CLI's have a "man page" explaining them that can be accessed with, e.g., man whatever. The raspicam apps don't have these, but they do have "help" messages that can be invoked with -h. Note that > is a shell feature, not the app's. – goldilocks Nov 5 '15 at 10:32
1

The -o option for raspivid is used to set the output path where you want to record a video but you never set it to anything and instead you try to redirect the stdout stream to a file.

If you want really want to use stdout and pipe it into a file you can use the -o option with a dash. From the documentation:

    --output,   -o      Output filename <filename>.

Specify the output filename. If not specified, no file is saved. If the filename is '-', then all output is sent to stdout.

raspivid -t 15000 -o - > test_vid.h264

That should work to record a simple video. However the simplest and most recommended way is to use the command below.

raspivid -t 15000 -o test_vid.h264
  • Thank you all. Command and attributes I used to record video with raspivid was from the book "The Internet of Things Do-It-Yourself at Home Projects for Arduino, Raspberry Pi, and BeagleBone Black". You pointed out that there is a mistake in book. – Redex Nov 5 '15 at 10:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.