it-artikel:linux:command-line-cli-examples-for-use-with-lbry-a.k.a.-odysee-video-platform-youtube-alternative

Command line (cli) examples for use with LBRY a.k.a. ODYSEE video platform (youtube alternative)

If your are a former Youtuber switching to ODYSEE a.k.a. LBRY, you might be interested in how to control and use ODYSEE/LBRY from the command line, for faster and easier video transcoding, easier uploading and such. The true professional knows, the CLI may not look pretty, but is far superior and faster compared to any GUI.

Windows and GUIs are for gaming. Real work is done in the terminal.

Prerequirements:

We just need the common goodies like:

  1. ffmpeg
  2. curl

Transcoding / Optimizing for LBRY/ODYSEE upload :

According to https://lbry.com/faq/video-publishing-guide LBRY/ODYSEE recommend content to meet some specifications, to get maximum compatibility and performance. That may change in the future of the platform. However for a start i recommend to follow their advice.

For easy use we create a little shell script that we simply use to throw our content at and it spits out something optimized. Like…

USAGE: odysee-transcode yourVideoFileNameHere

sudo -i

cat << 'EOFFF' > /usr/local/bin/odysee-transcode
#/bin/bash
#
# author: axel.werner.1973@gmail.com
# version: 2021-02-13 0933 utc
#
# Based on https://lbry.com/faq/video-publishing-guide
# 
#

if [ "$#" -ne 1 ]; then
	echo "$0 : Error: Illegal number of parameters. " >&2
	cat << EOF

Usage:
======

$0 yourVideoFileHere.xxx

EOF
	exit 3
fi

IN="$1"
OUT="odysee-$IN.mp4"

if [ ! -f "$IN" ]; then
	echo "$0 : Error: File not found: '$IN' " >&2
	exit 1
fi

if [ -f "$OUT" ]; then
	echo "$0 : Error: Output file exists: '$OUT' . Aborting." >&2
	ls -larth "$IN" "$OUT"
	exit 2
fi


ffmpeg 	-i "$IN" \
	-c:v libx264 \
	-crf 21 \
	-preset faster \
	-pix_fmt yuv420p \
	-maxrate 5000K \
	-bufsize 5000K \
	-vf 'scale=if(gte(iw\,ih)\,min(1920\,iw)\,-2):if(lt(iw\,ih)\,min(1920\,ih)\,-2)' \
	-movflags +faststart \
	-c:a aac \
	-b:a 160k \
	"$OUT"

ls -larth "$IN" "$OUT"

EOFFF

chmod -v +x /usr/local/bin/odysee-transcode

exit

Upload to ODYSEE/LBRY :

FIXME Hmmm…. Haven't found yet.

FIXME:

FIXME

FIXME:

FIXME

FIXME:

it-artikel/linux/command-line-cli-examples-for-use-with-lbry-a.k.a.-odysee-video-platform-youtube-alternative.txt · Last modified: 2022-08-31 12:30 by 127.0.0.1