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

added transcoding app from mitol and removed transcoding job code #2421

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

umar8hassan
Copy link
Contributor

@umar8hassan umar8hassan commented Feb 19, 2025

What are the relevant tickets?

fixes https://github.com/mitodl/hq/issues/6717

Description (What does it do?)

This PR aims to refactor transcoding job code to include newly created mitol.transcoding for media conversion tasks

How can this be tested?

  1. Add settings for AWS_* from RC in your local .env
  2. Add settings for required for gdrive to work locally.
  3. Add the additional settings in .env:
# Transcoding App settings
POST_TRANSCODE_ACTIONS=videos.api.update_video_job
TRANSCODE_JOB_TEMPLATE=./videos/config/mediaconvert.json
  1. Switch to this branch and rebuild containers: docker-compose up -d --build
  2. Add a sample video in gdrive and sync with ocw-studio. This should trigger a transcoding job
  3. To verify you execute the following command in django shell using docker-compose exec -it web ./manage shell:
from videos.models import VideoJob
from django.conf import settings
import boto3

client = boto3.client(
     "mediaconvert",
     region_name=settings.AWS_REGION,
     aws_access_key_id=settings.AWS_ACCESS_KEY_ID,
     aws_secret_access_key=settings.AWS_SECRET_ACCESS_KEY,
     endpoint_url="https://vasjpylpa.mediaconvert.us-east-1.amazonaws.com"
 )
client.get_job(Id=VideoJob.objects.order_by("-created_on").first().job_id)
  • this should display the details of the latest transcode job

@umar8hassan umar8hassan marked this pull request as ready for review February 25, 2025 23:38
@umar8hassan umar8hassan self-assigned this Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant