-1

1.I have interfaced Pi-camera version1.3 with raspberry pi. Problem is I am not able to get any preview with this.

  1. Following libs are added: sudo apt-get update sudo apt-get upgrade sudo apt-get install python-picamera sudo apt-get install python3-piamera sudo apt-get install omxplayer

  2. On terminal when I typed:$raspistill -p Error generated: invalid command line option (-p)

  3. I am successfully able to get image with following command: $raspistill -o image.png

  4. Though when I tried to run in python code, I don't get any preview. Although a video file is formed. But while video is recording I dont screen anything on streaming of video i.e no preview. import picamera import time

    camera = picamera.Picamera()
    camera.capture('img.png')
    
    camera.start_preview()
    camera.start_recording('vid.h264')
    time.sleep(10)
    camera.stop_recording()
    

  5. After that a video file of arounf 10MB is created on disk. But when I try to run it with omxplayer, only below message appears on terminal, no video file running $omxplayer videofile.h264

Video codec omx-h264 width 1024 height 768 profile 100 fps 25.000000 Subtitle count: 0, state: off, index: 1, delay: 000000V:PortSettingsChanged: 1024x768@25.00 interlace:0 deinterlace:0 anaglyph:0 par:1 .00 layer:0 alpha:255 have a nice day;)

  1. however I have copied file to window platform & run it in vlc media player. It runned successfully.
0

Anyhow, I have found the cause. Actually I was running it on window Desktop via VNC. However when I viewed it by monitor connected to HDMi output of Pi, it worked. Preview/video don't come oplay via vnc. Connect HDMi out for this.

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.