Skip to content
Snippets Groups Projects
Commit 61ab2119 authored by Petter Reinholdtsen's avatar Petter Reinholdtsen
Browse files

Added example wrapper script encoder_example_ffmpeg.

Based on script posted to https://bugs.debian.org/516343 in 2009
by Robert Millan.

Fixes #1601
parent ad29a421
No related branches found
No related tags found
1 merge request!38Added example wrapper script encoder_example_ffmpeg.
Pipeline #6289 canceled
......@@ -5,6 +5,7 @@ noinst_PROGRAMS = dump_video dump_psnr libtheora_info \
# possible contents of BUILDABLE_EXAMPLES:
EXTRA_PROGRAMS = player_example encoder_example png2theora tiff2theora
EXTRA_DIST = encoder_example_ffmpeg
AM_CPPFLAGS = -I$(top_srcdir)/include
AM_CFLAGS = $(OGG_CFLAGS)
......
#!/bin/sh
####################################################################
# #
# THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. #
# USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS #
# GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE #
# IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. #
# #
# THE Theora SOURCE CODE IS COPYRIGHT (C) 2009,2025 #
# by the Xiph.Org Foundation and contributors http://www.xiph.org/ #
# #
####################################################################
set -x
video=`mktemp`
audio=`mktemp`
rm -f $video $audio
mkfifo $video $audio
# A single process can handle both, but this results in deadlock because
# mplayer is single-threaded.
mplayer "$1" -ao null -vo yuv4mpeg:file=$video > /dev/null 2>&1 &
mplayer "$1" -vo null -ao pcm:file=$audio > /dev/null 2>&1 &
theora_encoder_example $video $audio > "$2".new && mv "$2".new $2
rm -f $video $audio
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment