Skip to content

Instantly share code, notes, and snippets.

@ensonic
Last active December 30, 2015 17:48
Show Gist options
  • Save ensonic/0e6a7cfa1b6492a675cf to your computer and use it in GitHub Desktop.
Save ensonic/0e6a7cfa1b6492a675cf to your computer and use it in GitHub Desktop.
#!/bin/bash
if test -z "$1" -o -z "$2"; then
echo "Usage $0 <input> <output>"
exit 1
fi
in="$1"
out="$2"
gst-launch-1.0 \
filesrc location="$in" ! decodebin name=d \
mp4mux name=m ! filesink location="$out" \
d. ! queue ! progressreport ! videoconvert ! x264enc ! queue ! m.video_0 \
d. ! queue max-size-buffers=0 max-size-bytes=0 max-size-time=0 ! audioconvert ! audioresample ! voaacenc ! aacparse ! queue ! m.audio_0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment