COMPLETE OctoPrint Raspberry Pi Camera Tweaks

Discussion in 'Guides, Mods, and Upgrades' started by PsyVision, Mar 5, 2016.

  1. JohnEsc

    JohnEsc Well-Known Member

    Joined:
    Sep 4, 2015
    Messages:
    229
    Likes Received:
    144
    [​IMG]
     
  2. Alex9779

    Alex9779 Moderator
    Staff Member

    Joined:
    Sep 4, 2015
    Messages:
    2,411
    Likes Received:
    735
    The other options for the time lapse. This are the options for the webcam...
     
  3. JohnEsc

    JohnEsc Well-Known Member

    Joined:
    Sep 4, 2015
    Messages:
    229
    Likes Received:
    144
    My bad @Alex9779 ... Rough day!
    [​IMG]
     
  4. Alex9779

    Alex9779 Moderator
    Staff Member

    Joined:
    Sep 4, 2015
    Messages:
    2,411
    Likes Received:
    735
    Your FPS is way off. Try 25...
     
    JohnEsc likes this.
  5. Alex9779

    Alex9779 Moderator
    Staff Member

    Joined:
    Sep 4, 2015
    Messages:
    2,411
    Likes Received:
    735
    You can check the log on the OctoPi for errors: cat .octoprint/logs/octoprint.log
     
  6. JohnEsc

    JohnEsc Well-Known Member

    Joined:
    Sep 4, 2015
    Messages:
    229
    Likes Received:
    144
    That would explain why the quality of the 2 videos that completed processing still didn't look like 720 quality. Thanks again @Alex9779
     
  7. Henry feldman

    Henry feldman Well-Known Member

    Joined:
    Sep 5, 2015
    Messages:
    969
    Likes Received:
    391
    No the quality is the bitrate you set above, the resolution is the 720p part. 5000 is like mid 2000s cell phone quality. I have mine set to 10000 and at 720p looks pretty clear. As @Alex9779 pointed out to me to look in the logs, when mine failed when I upped the quality, I discovered that in fact you can't set just any arbitrary frame rate (yes, yes, then WTF does the menu have have choices you can't enter...) since MPEG2 only supports a few frame rates apparently... BTW, I would strongly suggest you do what I did and move the time lapses off the root file system (in my case a 128gb usb thumb drive on the pi) so that a large time lapse can't halt your pi...
     
    JohnEsc likes this.
  8. Alex9779

    Alex9779 Moderator
    Staff Member

    Joined:
    Sep 4, 2015
    Messages:
    2,411
    Likes Received:
    735
    I did some research but 60 frames should be supported. Though I dunno if that covers avconv on the RPi... So a look in the log should help to get the error.
     
  9. Spoon Unit

    Spoon Unit Well-Known Member

    Joined:
    Sep 6, 2015
    Messages:
    1,561
    Likes Received:
    483
    @JohnEsc are you sure it's just not in the middle of processing? It's going to take more time to create a more detailed video (I think).
     
  10. Alex9779

    Alex9779 Moderator
    Staff Member

    Joined:
    Sep 4, 2015
    Messages:
    2,411
    Likes Received:
    735
    That is not correct, I did not point it out to you, you posted the log yourself so you had a look in there yourself... I just made you read what was written there because it was an obvious and no ambiguous error message...
     
  11. Henry feldman

    Henry feldman Well-Known Member

    Joined:
    Sep 5, 2015
    Messages:
    969
    Likes Received:
    391
    We read but we do not see... - Sherlock Holmes
     
  12. JohnEsc

    JohnEsc Well-Known Member

    Joined:
    Sep 4, 2015
    Messages:
    229
    Likes Received:
    144
    Thanks @Henry
    Once my current print finishes I will test out making the change of the bitrate to 10000. I delete every video from the Pi after it's completed and downloaded to my Google Drive timelapse folder so i shouldn't have an issue with large files. I switched the framerate to 25 fps instead of the 60 like @Alex9779 suggested. I'll see what happens with this current timelapse vid, my current print will be done in about an hour. Thx guys
     
  13. Henry feldman

    Henry feldman Well-Known Member

    Joined:
    Sep 5, 2015
    Messages:
    969
    Likes Received:
    391
    It's not the video file that fills up the space, every Z change it takes a multi megabyte file. It's not hard to fill up a few gig in a big print job (I speak from experience - only solution is to go in via command line and clean out the time lapse temp directory). By moving that to a 128gb thumb drive mounted in the unix file system, it now can store a way bigger print than the printer is capable of...
     
  14. JohnEsc

    JohnEsc Well-Known Member

    Joined:
    Sep 4, 2015
    Messages:
    229
    Likes Received:
    144
    I've been getting great results with the following settings you guys suggested: 1280 x 720 @ 30fps and 10000 as the bitrate, also changed the FFMPEG threads to 4 based on some info from this page: http://www.akeric.com/blog/?p=3508
     
    mike01hu likes this.
  15. cez

    cez Well-Known Member

    Joined:
    Apr 4, 2016
    Messages:
    133
    Likes Received:
    23
    Me too :) thanks for the tips
     
  16. Stian Indal Haugseth

    Stian Indal Haugseth Well-Known Member

    Joined:
    Sep 11, 2015
    Messages:
    589
    Likes Received:
    100
    I did another approach. I have set maximum resolution and fps to 2. So I can see with more detail what's really happening. Smooth video would be nice but I prefer details.
     
  17. richgain

    richgain Well-Known Member

    Joined:
    Dec 18, 2015
    Messages:
    73
    Likes Received:
    35
    I finally got around to unsticking the lens on my PiCam so I could focus on the prints. Definitely worth it but I wish I had found this tool sooner!
    http://www.thingiverse.com/thing:1570865
    I think it would have made less of a mess than my pliers did.
     
    #37 richgain, Oct 17, 2016
    Last edited: Oct 31, 2016
    Ephemeris likes this.
  18. Colin

    Colin Well-Known Member

    Joined:
    Sep 4, 2015
    Messages:
    86
    Likes Received:
    20
    I haven't tried focusing the 2.1 cam yet but will the focus ring not work on the newer camera? https://www.thingiverse.com/thing:211641
     
  19. richgain

    richgain Well-Known Member

    Joined:
    Dec 18, 2015
    Messages:
    73
    Likes Received:
    35
    I didn't get my PiCam with the BigBox kit - and the lens was glued very firmly. I tried supergluing the Focus Ring tool to the front of the lens but even though it was very firmly stuck it just broke off without freeing up the lens. I found the 'Adjusting the Camera Focus' section of this article most helpful.
     
  20. richgain

    richgain Well-Known Member

    Joined:
    Dec 18, 2015
    Messages:
    73
    Likes Received:
    35
    I finally managed to get almost everything looking better thanks to all the wonderful tips here.
    Now I can share one of my own. I have been struggling with a horrible yellow cast on the pictures when filming by the light of my white LED strips. I tried setting "-awb off" instead of the default "auto" but it made my screen turn black. I then tried a few of the other settings but found they only made the yellow cast worse.
    I was about to give up when I found this post which suggested trying the "-awb flash" option for LED lighting. I tried it and the difference was dramatic.

    [​IMG][​IMG]
    [​IMG]
     
    #40 richgain, Oct 23, 2016
    Last edited: Oct 31, 2016

Share This Page