Question about how to start making a "simple" framegrabber

Discussion in 'General Electronics Chat' started by papajo, Jun 21, 2015.

  1. papajo

    Thread Starter New Member

    Jun 21, 2015
    12
    0
    Well I dont know if this is the right subtopic.. I would like to post this on the "pojects" one but guyz seem to discuss there already working projects or ones that are in progress...

    I just had an idea and would like some (or a lot) help on resources i need to study, links, chip recommendations etc for that idea...

    Well here it is: I have a compact camera with hdmi out, and I would like this camera to be used as a webcam (in other words i would like windows or programs like skype to see the device im thinking of as a video adapter/webcam ) lots of cameras have built in such capabilities but my doesnt, also I know there is softweare that can do this with some DSLRs/compact cameras with hdmi out but that software doesnt work with my camera (nikon coolpix s6600) And I know that there are some encoders that have hdmi in and usb out... like some avermedia products but I just choose to ignore them so that I can try to make this project happen :p


    I didnt do much research on it (and I am not an electronics engineer etc... I am a mathematician and know lots of electronics theory... have done some basic arduino stuff and soldering and reballing, I also know some programming languages to an extent.. have basic logic gates knowledge etc but nothing more than that. )

    And I havent done it because frankly i dont know were to start or how to built the corpus of my research in order just to learn the material I need for this project..

    I dont aim to become an HDMI specialist or a programmer specialized in usb stacks/driver in general... I need to learn just the bids and parts of the theory relevant to make this project happen.

    So according to my premature thought about that I need some sort of FPGA chip a usb 3.0 shield and a nand chip to act as a buffer for the data the FPGA chip and reading source for the usb shield in order to push the video signal to my pc as a webcame device (or whatever does the trick like video adapter device in order to work as a source for programs like skype)

    To put it more simple I want to grab the HMDI out signal from my camera (that is already compatible for a tV to project it) and without encoding it or altering it (atleast if thats not mandatory for what I am trying to achieve) "push it through" usb in order for me to use that signal as a webcam feed for chating online with people using my camera instead of a webcam...


    So were do i need to start with ?? also give me whatever advise,links hardware/devkit you think would be best suited for my venture :)

    I thank you in advance.
     
    Last edited: Jun 21, 2015
  2. Brownout

    Well-Known Member

    Jan 10, 2012
    2,375
    998
    You really have your work cut out for you. Why not just buy a webcam? I got a gently used on from Amazon for like 12 bucks, and I'm using it with free software as a security cam.
     
    nsaspook likes this.
  3. papajo

    Thread Starter New Member

    Jun 21, 2015
    12
    0
    I have already a webcam and actually the best there is... the c930e.. but its not about money its about making that project happen...
    And its not just for the lolz compact cameras/camcoders/DSLRs have so much better quality,boke,field of view dynamic range etc than any webcam even if we compare compact cameras with the same price range as top webcams (100$ ish)

    And I can use google to purchase something for my needs I already mentioned that... I would not make such a long post and in this forum if I wanted advice on buying a capturing device or webcam.. thank you for your time but your post doesnt help me.
     
  4. nsaspook

    AAC Fanatic!

    Aug 27, 2009
    2,907
    2,166
    You are asking about a very specialized skill on very specialized hardware on the order of what a 'Blackmagic' board can do. I don't think you have an idea of the scope of work that's needed to build something like that from scratch. The upfront design cost of something like that is very high.
    https://www.blackmagicdesign.com/products/intensity
     
  5. papajo

    Thread Starter New Member

    Jun 21, 2015
    12
    0
    well yes except I dont want half of the stuff the black magic does I dont want to compress or decompress the input signal just grab it and feed it to the buffer nor do I want to do analog/digital conversion (and besides that I think this is cheaper and better http://gamerzone.avermedia.com/game_capture/live_gamer_extreme)

    And yes I know what lies before me thats why I am asking for help on a forum with electronics experts .... I never said it would be a "plug this into that and paste that generic code" kind of deal.... and to be honest i dont know were you got that impression.
     
  6. nsaspook

    AAC Fanatic!

    Aug 27, 2009
    2,907
    2,166
  7. papajo

    Thread Starter New Member

    Jun 21, 2015
    12
    0
    The ADV7619 chip seems nice and more than enough for what I need (1080p @30/60Hz) and cheap around 18$ but I dont think I could make a board on my own around it (especially without guidance) and I didnt find any devboards with it except this one https://parts.arrow.com/item/detail/analog-devices/eval-adv7619-7511#bV5L but Still I need some guidance on how to make the USB part work like were do find usb stacks for windows that are used in webcams or whatnot etc.


    Essential what you gave me in resources is how that chip works and a link for HDMI standarts which is nice and thank you.

    But I need more resources than that actually someone to describe me the entire process in general (like how he would think to design such a think) and live links or book recommendations for details on how to achieve anything in between.
     
  8. Brownout

    Well-Known Member

    Jan 10, 2012
    2,375
    998
    Easiest way is to use a computer with an HDMI port and write the code for the capture. I am not convinced you're aware of the magnitude of the project you're proposing, else you wouldn't need someone to describe the entire process. You're looking at two years of development time if you want to use an FPGA, given you have no experience.
     
  9. papajo

    Thread Starter New Member

    Jun 21, 2015
    12
    0
    I am not in search for convenience in the way you put it... I am a little egoistic so I doubt that, given the right guidance, It would take me more than a year and even if it does its ok... its just something that I want to do... others may like to learn how to paint or how make a barn... I chose this.

    And I am not an engineer as I said though my background is not totally irrelevant as well I have a degree in applied mathematics and (through some courses during the university and self teaching I know quite a bit of code in languages such as C++ and python and some things in assembly)

    I also know the physics of electronics because I know physics... I have also read some books about logic gates.

    I also have some experience in electronics though (some arduino projects, made a radio and other small things like that )

    I dont aim to become an engineer or learn everything about circuitry design and manufacturing.. I dont aim to become proficient in every aspect of signal manipulation and all that.


    I just want to know whats needed for this particual project.. and I asking some expert to describe me by general steps on how he would approach this while giving me resources for the details so that I could see the big picture and research on the specifics I need.


    For example I am a mathematician... if someone asks me to teach him "math" in general I would need like 4 years easily to just give him a solid base...

    If he "just" wanted me to teach him the field of probability I would need 1,2 years again just for a solid base...


    But if he asked me to teach him how to solve some specific problems for his company logistics I probably wouldnt need more than 6 months to a year to do that...


    Same way here I just need someone that knows that stuff to "connect some dots" for me and give me guidance on were to research and what in particular to look at and/or what to ignore from a specific book/resource. for example I doubt that I need to know EVERYTHING about FPGAs and EVERYTHING about USB protocols and EVERYTHING about circuity and EVERYTHING about HDMI in order to just do the task I described in the OP

    Will i need to research trial and error a LOT of stuff? Yes, but still its not the same thing as were if I need to totally master those sub fields as I said I just want to achieve that and not become an self taught engineer... (at least not for now :p )

    And if anybody who reads this cant help me but knows someone here that could I would appreciate if you link to that someone this topic so that if he has time and desire to help to do so :p thanks again.
     
    Last edited: Jun 22, 2015
  10. papajo

    Thread Starter New Member

    Jun 21, 2015
    12
    0
    well my post has some typos that I didnt notice (and I already edited it once to fix the ones that got my eye :p ) I cant edit it again.. but I think its readable. :p
     
  11. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    Well first things first, you said you don´t need the full 1080p at 30fps, then you need to find out if you can convince your camera to actually output anything less than that, and decide what that should be. Even 720p at 30 fps is quite a lot of data to process and transfer (over 80MBps).

    Then you need to decide how will you decode and store the frames in some RAM, and then you need a way of interfacing that to a PC. That decoding chip seems like a way to go, but there probably are many more that could do an equivalent job and some other might be better. After that you need a way to store the parallel data in a buffer, and then send it out over usb. However I think that transferring the data to pc without compression will be a tough job.
     
  12. nsaspook

    AAC Fanatic!

    Aug 27, 2009
    2,907
    2,166
    You are a baby in high-speed mixed design and trying to tell you how to 'paint by the numbers' is just about impossible. Can you take the time and effort to get the proper background to complete this task? Sure you can and we are giving you a warning about the road head as you can't design by numbers.
    high-speed-digital-design-paper.pdf
    These are the typical requirements for a job like that:
    https://www1.recruitingcenter.net/c...ntroller.cfm?jbaction=JobProfile&Job_Id=10975
     
    Last edited: Jun 22, 2015
    papajo likes this.
  13. papajo

    Thread Starter New Member

    Jun 21, 2015
    12
    0
    Thats Exactly the help I need again thnx man...

    I dont want someone to explain high speed design... I just need someone to say i need to know that and point me to that source like you did... though a more complete approach to what i need would be even better like a diagram oh the phases in order for me to get a better idea for what to look on the web etc also a devkit recommendation would be welcome as well :)
     
  14. papajo

    Thread Starter New Member

    Jun 21, 2015
    12
    0
    well I didnt said I dont need 1080p 30fps and I know how to set a camera to output different resolutions if that said camera supports them. Maybe you got confused when I told to nsaspook that the ADV7619 is "more than enough" for what I need and thats because according to the datasheet it can do 4k at 8bit (so roughly ~20 Gbps) and for 1080p @60 even at 16bit I need less than 9Gbps throughput.


    Why would I need to decode the signal? its coming from an HDMI compliant source

    and why you use the phrase "interfacing -the signal- to a pc" while after that you say store that parralel (? parralel in respect to what?) data to a buffer (also why a 2nd buffer? ) and then to usb? wouldn't everything that is relevant to interfacing be done in the code of the USB stack? do I need to manipulate the data prior to that point again? why? any sources to learn more about that?

    And the HDMI signal is already compressed by the camera internally and it feeds that smaller bandwith signal to the hdmi out (for watching your footage on TV for example) but even if it was clean why should it be a problem since usb3.0 is like 5Gbps? if im not wrong

    And generally as you can see in the OP I could figure the very very general idea (hdmi input>FPGA>Buffer>USBout) on my own but now with your description you confused me even more :p except if you didnt understand something or I didnt.
     
    Last edited: Jun 22, 2015
  15. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    Ok it seems I have misunderstood you with the required resolution.
    Decoding and parallel data: What I meant was that the HDMI stream is quite complex and that the chip basically converts the serial data and H/V sync and audio and all the other things to a parallel bus, which will effectively have much slower frequency and will be more manageable for processing and storing in some buffer memory. 3Gbps is a lot of data, and I am not even sure if such a throughput is achievable on an FPGA that would feed some DRAM memory. That memory bus needs to have enough bandwidth to keep storing the incoming stream, while also providing that data to the usb stack. And because the incoming stream won´t wait, and you need to switch between reads and writes, you will still need some small buffer to store the stream and write and read in bursts anyway.

    Now let´s say that you achieve all of the above, and that the claimed 5Gbps speed of USB3.0 will hold in such application (I have little exprience with usb, but likely the actual throughput will be lower than the theoretical maximum).
    What will you do with the data next? Even the 3Gbps will fill the whole RAM of a computer in just a few seconds, and there is no way to stream such amounts of data into internet, well maybe an SSD could keep up.
    You would end up with ludicrous amounts of data and not enough processing power to compress them or do anything useful once they are in PC.

    I could understand such an approach for recording raw camera data say for a professional movie camera storage system that would get processed later, but I don´t see why you would need to go through such complications to get nicer pictures for a webcam chat.
     
  16. papajo

    Thread Starter New Member

    Jun 21, 2015
    12
    0

    Well... lol yup I didnt think of uploading the data.. streaming it to my pc didnt seem to be the problem since i have 32 GB ram @2400Mhz and also an SSD but I just didnt thought about my uploading speed which is only 5Mbps..

    But I think that the HDMI out of my camera is compressed I doubt a 300$ compact camera would have clean hdmi out so maybe there is a change there but if its not the case then what do I need to encode the signal ?
     
  17. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    As far as I know in HDMI the video can only be raw and uncompressed, only the audio can be compressed. It might be coming from a lower quality video inside the camera (repeating/interploated frames, upscaling...), but it is in rough terms "pixel for pixel" when it goes over the wire.

    As for the encoding, you would have to choose some codec and have enough computing power to do it on the fly. There might be some specialized ASIC for that but it could be a bit hard to get to. Also, if I remember correctly a full-hd encoding is quite demanding and I don´t think that even a modern CPU (imagine I7 or similar) can reliably do it in real time.
     
  18. papajo

    Thread Starter New Member

    Jun 21, 2015
    12
    0
    well if you are right then how does stuff like this work? http://gamerzone.avermedia.com/game_capture/live_gamer_extreme which feeds uncompressed 1080p@60fps from a source to the computer with only 50ms of delay (and it costs like 100$ )
     
  19. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    Looking at this video it seems that everything is done in the FPGA
    Now I don´t think much of processing is happening in that fpga, but I may be wrong. Also, read the comments below.
     
Loading...