The goal of efficiency is more slack.

Showing posts with label shell. Show all posts
Showing posts with label shell. Show all posts

Wednesday, July 08, 2020

ffmpeg write mp3 metadata

To create an mp3 file with some ID3 metadata. This example is to create files corresponding to chapters of an audiobook. Shell script:

#!/bin/sh

# Convert to mp3 with metadata. Use some defaults, pass some parameters.
# Parameters: 1: input file name, 2: chapter/track, 3: start time

ffmpeg -ss $3 -i "$1" -metadata artist="Some artist" -metadata album="An album name" -metadata genre="Books & Spoken" -metadata title=$2 -metadata track=$2 "Chapter $2.mp3"

Note that the first parameter is expected to be passed in in quotes if it has spaces.

Saturday, June 19, 2010

Blog from the command line

GoogleCL allows you to post to your Blogger blog from the command line. To install:
  1. Install Python gdata libraries. This entails downloading, untarring, and sudo python setup.py
  2. Install GoogleCL. Same as above.
  3. Copy googlecl-0.9.5/build/scripts-2.6/google (version numbers subject to change) to /usr/local/bin or anywhere else in you PATH.
Now you can open a terminal and run a command like:

google blogger post --tags "online, shell" --title "Frist post using GoogleCL" "Can you believe I'm posting this from the command line?"

Or write your post in a text editor, saving it as ~/tmp/post.html, then:

google blogger post --tags "online, shell" --title "Blog from the command line" ~/tmp/post.html

Popular Posts

Recent Posts

Unordered List

Text Widget

Pages

Powered by Blogger.
Scroll To Top