Skip to content

Instantly share code, notes, and snippets.

View flavioribeiro's full-sized avatar
:octocat:

Flavio Ribeiro flavioribeiro

:octocat:
View GitHub Profile
@flavioribeiro
flavioribeiro / fmp4mux-with-av1.diff
Created March 16, 2024 14:47
get fmp4mux with av1
diff --git mux/fmp4/Cargo.toml mux/fmp4/Cargo.toml
index 73e1f01b..090dc3a7 100644
--- mux/fmp4/Cargo.toml
+++ mux/fmp4/Cargo.toml
@@ -3,7 +3,7 @@ name = "gst-plugin-fmp4"
version = "0.12.0-alpha.1"
authors = ["Sebastian Dröge <sebastian@centricular.com>"]
license = "MPL-2.0"
-description = "GStreamer Fragmented MP4 Plugin"
+description = "GStreamer Fragmented MP4 Plugin (Supports AV1)"
@flavioribeiro
flavioribeiro / tennis-on-tidbyt.md
Last active January 16, 2023 04:38
Tennis App for TidByt

With the help of Pixilart, I created a simple animation with a tennis ball rolling as the transition and then used this Tennis API to fetch the matches of the day.

Here, you can see it running on the emulator, and here, you can see it running on my Tidbyt. The video links will expire in a day, so I may need to upload them somewhere else.

There are still a lot of "TODOs" on the codebase, including some nasty tricks I did to the interface, obfuscating the API keys, etc. The "flag" colors are also not working from the API, so I might also think about something else there. I should have a PR at some point next week :)

Screenshot 2023-01-15 at 11.33.17 PM|690x345

import fr.noop.subtitle.vtt.*;
import fr.noop.subtitle.model.SubtitleParsingException;
import fr.noop.subtitle.ttml.*;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
public class Hello {
public static void main (String[] args) throws IOException, SubtitleParsingException {
@flavioribeiro
flavioribeiro / scte35-pid-on-ts-segment.py
Created January 28, 2021 15:44
SCTE-35 PID presence on HLS TS Segments
import datetime
import os
from concurrent.futures import ThreadPoolExecutor
from requests import get
import m3u8
from threefive import decode
import time
PLAYLIST = ""
{
"durations": [
4000,
16000,
2435743
],
"sequences": [
{
"clips": [
{
<div class="container">
<?xml version="1.0" encoding="UTF-8"?>
<svg class="svgspin" width="144.95" height="145.52" viewBox="0 0 144.95163 145.52065" xml:space="preserve"><path d="m103.35 4.9101c-1.2018 0.02813-2.3972 0.14176-3.5798 0.32836 5.211 5.1439 8.4467 12.291 8.4467 20.182 0 2.7009-0.92953 7.2764-2.279 12.712-1.2948 5.2152-2.9952 11.1-4.6929 16.411 2.4615 2.7766 4.3887 6.0319 5.6351 9.6209 0.77293 0.16878 1.5697 0.35392 2.3582 0.53323 7.7588-7.2236 15.91-15.636 18.019-19.288 7.4587-12.919 3.0608-29.447-9.8393-36.895-4.4344-2.5602-9.2947-3.7149-14.068-3.6031zm-76.349 40.741c-14.89 0.03204-26.975 12.147-27 27.072-0.0073 6.4028 2.2171 12.281 5.9326 16.908 1.7683-7.2435 6.3518-13.782 13.284-17.805 2.2935-1.3285 6.5976-2.7766 11.848-4.2946 5.0377-1.4564 10.856-2.9017 16.236-4.0821 1.2798-3.7153 3.29-7.0723 5.8709-9.9229-0.20245-0.63581-0.40232-1.2981-0.60404-1.9477-10.093-3.0961-21.374-5.9333-25.568-5.9274zm54.494 59.851c-2.0366 0.46174-4.1387 0.73961-6.3176 0.73961-2.0861 0-4.1141-0.2626-6.078-0.68836-0.2
{
"Name":"{{ id }}-ml-channel",
"RoleArn":"{{{ arn }}}",
"Destinations":[
{
"Id":"{{ id }}-dest",
"Settings":[
{
"Url":"{{{ masterDestination.url }}}",
"PasswordParam":"{{{ masterDestination.password }}}",
@flavioribeiro
flavioribeiro / .babelrc
Created April 3, 2018 18:26 — forked from thejmazz/.babelrc
async/await with webpack+babel
{
"presets": ["es2015"],
"plugins": ["transform-async-to-generator"]
}
/*
* Copyright 2016 Naran Inc. All rights reserved.
* __ _ _______ ______ _______ __ _
* | | | | _ | _ | | _ | | | |
* | |_| | |_| | | || | |_| | |_| |
* | | | |_||_| | |
* | _ | | __ | | _ |
* | | | | _ | | | | _ | | | |
* |_| |__|__| |__|___| |_|__| |__|_| |__|
*
diff --git a/service/captions.go b/service/captions.go
index 8ffdf7e..096474f 100644
--- a/service/captions.go
+++ b/service/captions.go
@@ -88,6 +88,7 @@ func (s *MediaFactoryService) triggerCaptionsJob(ctx context.Context, jobStatus
func (s *MediaFactoryService) getCaptionsStatus(ctx context.Context, scoopID string) (*captionsStatus, error) {
var status captionsStatus
+
url := fmt.Sprintf("%s/captions/%s", s.captionsAPIEndpoint, scoopID)