Skip to content

Instantly share code, notes, and snippets.

View colonelpanic8's full-sized avatar

Ivan Malison colonelpanic8

View GitHub Profile
Even on the fastest gpus that we could realistically use, railbird's video
processing pipeline can only run at about 2x real time. If we were to wait for
users to finish recording their tracking sessions to start uploading video to
our backend it could take hours for them to have complete statistics, at which
point they will likely have moved on to thinking about something else. The
obvious solution here is streaming, but unfortunately, pretty much every
streaming protocol in existence is optimzed to minimize latency at all costs.
They achieve this by adjusting the bit rate or dropping frames to synchronize
the stream closely with the recording time, whenever the connection bandwith
becomes spotty or cuts out momentarily. These sacrifices in the name of
services.postgresql = {
enable = true;
package = pkgs.postgresql_15;
ensureDatabases = [ "railbird" "public" ];
authentication = pkgs.lib.mkOverride 10 ''
#type database DBuser CIDR-ADDRESS auth-method
local all all trust
host all all 0.0.0.0/0 trust
host all all ::1/128 trust
'';
ffmpeg -i /var/tmp/dev_videos/dev/413/0.mp4 -vf "setpts=PTS-STARTPTS, showinfo" -f null - 2>&1 | awk '/pts/{print $NF}' > pts.txt
LD_LIBRARY_PATH="" nr gnuplot -e "plot 'pts.txt' with lines"
ffmpeg -f concat -safe 0 -i ~/temp/concat_filelist.txt -c copy output.mp4
ffprobe -v error -select_streams v:0 -show_entries stream=r_frame_rate,nb_frames,duration -of default=noprint_wrappers=1:nokey=1 ~/temp/output2.mp4
2024-04-11 05:23:16.088 12840-12926 id.railbird.app pid-12840 W Entry not found
2024-04-11 05:23:16.090 12840-12926 nativeloader pid-12840 D Configuring clns-5 for other apk /data/app/~~WAsp77bqOmvmER3EDCOtRw==/com.google.android.trichromelibrary_631209933-sgVM7wngTT6rWfo-tWnPsw==/base.apk. target_sdk_version=34, uses_libraries=ALL, library_path=/data/app/~~l3Fz49v4bSoFi8KLjVagmg==/com.google.android.webview-ZFTTq443s_WZKCSKMARCHA==/lib/arm64:/data/app/~~l3Fz49v4bSoFi8KLjVagmg==/com.google.android.webview-ZFTTq443s_WZKCSKMARCHA==/base.apk!/lib/arm64-v8a:/data/app/~~WAsp77bqOmvmER3EDCOtRw==/com.google.android.trichromelibrary_631209933-sgVM7wngTT6rWfo-tWnPsw==/base.apk!/lib/arm64-v8a, permitted_path=/data:/mnt/expand
2024-04-11 05:23:16.090 12840-12926 nativeloader pid-12840 D Extending system_exposed_libraries: libedgetpu_dba.google.so
2024-04-11 05:23:16.097 12840-12926 nativeloader pi
railbird on  ivan/fix-validate_fps_consistency-config [$!?] is 📦 v0.1.0 via 🐍 v3.11.6 via ❄️ impure (nix-shell-env) on ☁️ ivan@railbird.ai took 3s
➜ poetry run railbird config-json | jq .railbird.video.db_segment_info
{
"validate_fps_consistency": false,
"log_fps_drift": true
}
railbird on  ivan/fix-validate_fps_consistency-config [$!?] is 📦 v0.1.0 via 🐍 v3.11.6 via ❄️ impure (nix-shell-env) on ☁️ ivan@railbird.ai took 3s
➜ poetry run railbird config-json --validate-fps-consistency | jq .railbird.video.db_segment_info
{
"validate_fps_consistency": true,
import gc
import time
import weakref
import objgraph
from dependency_injector import containers, providers
from railbird import util
from railbird.containers import RBDeps, RequestContainer
@pytest.mark.asyncio
async def test_merge_behavior(async_sessionmaker, stream_factory):
stream = stream_factory()
async with async_sessionmaker() as session:
for i in range(11):
stream.get_segment(i)
stream.record_exhaustion(i, (i + 1) * 100)
stream.get_segment(11)
stream.get_segment(12)
session.add(stream)
const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config')
const path = require('path')
const escape = require('escape-string-regexp')
const exclusionList = require('metro-config/src/defaults/exclusionList')
const pak = require('./react-native-vision-camera/package/package.json')
const root = path.resolve(__dirname, "./react-native-vision-camera/package")
const modules = Object.keys({ ...pak.peerDependencies })
/**
from gql import dsl
def all_gql_fields(the_value):
if isinstance(the_value, dsl.DSLType):
underlying_type = the_value._type
if isinstance(the_value, dsl.DSLField):
underlying_type = un_of_type(the_value.field.type)
if not hasattr(underlying_type, "fields"):
#!/usr/bin/env python
import argparse
import logging
from dependency_injector.wiring import Provide, inject
from sqlalchemy.orm import joinedload
from railbird import config, console
from railbird.containers import RBDeps
from railbird.datatypes import models