Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Python 3 #15

Open
siuyiuyeung opened this issue Oct 2, 2018 · 10 comments
Open

Support for Python 3 #15

siuyiuyeung opened this issue Oct 2, 2018 · 10 comments

Comments

@siuyiuyeung
Copy link

I am interested in Blackmagic device frame capturing for OpenCV processing.

Will Python 3 be supported?
Or any tips for upgrading the current version that can be compatible with Python 3?

I am really appreciate any help from you.

@siuyiuyeung siuyiuyeung changed the title When will it be supported for Python 3 Support for Python 3 Oct 2, 2018
@dzhoshkun
Copy link
Contributor

Hi @justprotato Thanks for your interest in GIFT-Grab. I'm definitely keen on supporting Python 3. Only, I've never tested GIFT-Grab with Python 3 so far.

That said, I've managed to build GIFT-Grab against Python 3 on my Ubuntu 16.04 using the following:

  1. when bootstrapping Boost.Python simply append the --with-python-version=3.5 (or your Python 3 version) option.
  2. build GIFT-Grab from source by selecting the appropriate options

With this build, python3 -c 'import pygiftgrab' seems to run fine (as a quick test).

Can you see whether you can reproduce this on your system and then give GIFT-Grab a try with your Blackmagic card?

@dzhoshkun
Copy link
Contributor

TODOs:

  • provide a Boost built against Python 3 dev libs on:
    • Adelie
    • device-specific runners
  • modify pypi CI script to support both Python versions (possibly a bash loop)
  • modify linux CI script to support both Python versions (possibly a bash loop in conj. with virtualenv for running pytest)
  • modify device-specific CI scripts in line with the above two points

@dzhoshkun
Copy link
Contributor

dzhoshkun commented Oct 26, 2018

  • how about using tox for this?

@dzhoshkun
Copy link
Contributor

@dzhoshkun
Copy link
Contributor

dzhoshkun commented Oct 28, 2018

  • strings (in test utils) should be turned into bytes (for Python 3)

@dzhoshkun dzhoshkun self-assigned this Oct 29, 2018
@dzhoshkun
Copy link
Contributor

  • remove all Python 2 specific code such as bash script headers

@aaronmswan
Copy link

Hi, I'm also interested in this. What is the status of python 3 support? Much appreciated.

@dzhoshkun
Copy link
Contributor

@aaronmswan What operating system are you using?

@aaronmswan
Copy link

Thanks for getting back to me. We were looking at using this tool on Ubuntu 18.04 and CentOS 7/8.

However, I think at this point we might use a custom solution. From a cursory glance, it looks like the focus of GIFT-grab is more for reading than writing.

If you are interested in our use case, we are trying to write video frames and KLV metadata as VANC out to a DeckLink Blackmagic device using the 10 bit YUV pixel format (bmdFormat10BitYUV). Our video frames and KLV data are currently produced in python.

@dzhoshkun
Copy link
Contributor

Thanks @aaronmswan

With GG we've focused on real-time video processing pipelines involving acquisition, scientific computing and encoding, but haven't done any work on writing to a physical output port. One way to write out to a Blackmagic device would be to implement a new VideoTarget (see this figure in our paper).

We've been using GG with Python 3.7 on a Windows machine for one of our internal projects, which is why I asked what OS you are on. The Windows support is experimental and on this branch. In the above commit, I've tried to isolate the Python3-related changes from that branch. Haven't tested it, but it should be all you need to compile GG against Python3, if you fancy giving it a go.

@dzhoshkun dzhoshkun removed their assignment Apr 6, 2020
@joubs joubs added this to the 31 12 2020 milestone Dec 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants