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

Hi , I'm trying to use django-video-encoding, but it doesn't seem to work #40

Open
phaniophrero opened this issue Jun 14, 2023 · 2 comments

Comments

@phaniophrero
Copy link

I working on a project with Django GraphQL and Nextjs and trying to build a video course platform, and I want to use this library to change resolution of videos from 4k to 480p for example.

I've been following the example code, but now I don't have any fields in the Django Admin Dashboard to upload a video or something like that, is there any documentation about how to use this library in Django and send the data through API calls to the frontend. As I've mentioned I'm using Django GraphQL ( strawberry-graphql-django ) and Nextjs with Apollo Client.

I don't really understand how can I use the documentation in my case.

If you could give me some ideas or a place where I can find some documentation for this I'd highly appreciate it.

Thank you in advance!

@derek-adair
Copy link

Hello!

You need more detail if anyone is going to help you here. "It doesn't work" and "How do i send data to the front-end" is not enough information for anyone to help you. You need to give code examples of what you have tried and what you expect to work. You will find these two things very helpful when soliciting for help from strangers.

MY BEST GUESS is that you need to register your Video Models with the admin UI.

from django.contrib import admin
from video_encoding.admin import FormatInline

from .models import Video


@admin.register(Video)
class VideoAdmin(admin.ModelAdmin):
   inlines = (FormatInline,)

   list_dispaly = ('get_filename', 'width', 'height', 'duration')
   fields = ('file', 'width', 'height', 'duration')
   readonly_fields = fields

But you also may be asking for help on how to... write... a graphQL api? I dunno... good luck. Probably try stack overflow for these types of questions.

@derek-adair
Copy link

derek-adair commented Jun 23, 2023

If you'd like to see how I've implemented this project you can check out Medialogue. I've leveraged this project and put it into a docker container and should be up and running for you to poke around in one command (assuming you have docker set up). The demo instructions are here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants