Linux Commands Examples

A great documentation place for Linux commands

tcextract

read multimedia file from medium, extract or demultiplex requested stream and print to standard output


see also : avifix - avisync - avimerge - avisplit - tcprobe - tcscan - tccat - tcdemux - tcdecode - transcode

Synopsis

tcextract

-i name [ -x codec ] [ -t magic ] [ -a track ] [ -C s-e ] [ -d verbosity ] [ -v ]


add an example, a script, a trick and tips

: email address (won't be displayed)
: name

Step 2

Thanks for this example ! - It will be moderated and published shortly.

Feel free to post other examples
Oops ! There is a tiny cockup. A damn 404 cockup. Please contact the loosy team who maintains and develops this wonderful site by clicking in the mighty feedback button on the side of the page. Say what happened. Thanks!

examples

0

The command tcextract -i foo.avi -x mp3 -a 3 extracts MPEG audio track 3 from the AVI-file foo.avi and prints the bitstream to stdout.


0
source
            
echo "Extracting Audio to tempaudio.ac3... Please Wait";
tcextract -i "$1" -t vob -x ac3 -a 0 > tempaudio.ac3;
AUDIONAME="tempaudio.ac3";
echo "Extracting video from VOB file to tempvideo.m2v";
tcextract -i "$1" -t vob -x mpeg2 > tempvideo.m2v;
FILENAME="$PWD/tempvideo.m2v";
FILESIZE=$(stat -c%s "$FILENAME");
0
source
            
cat ${PREFIX}_*.VOB | tcextract -x ps1 -t vob -a 0x25 > subs.ps1
../../../subtitleripper/subtitle2pgm -i subs.ps1 -o subs -g 4 -C 0
0
source
            
echo "Extracting Audio to tempaudio.ac3... Please Wait";
tcextract -i "$1" -t vob -x ac3 -a 0 > tempaudio.ac3;
AUDIONAME="tempaudio.ac3";
AUDIOSIZE=$(stat -c%s "$AUDIONAME");
echo "Extracting video from VOB file to tempvideo.m2v";
tcextract -i "$1" -t vob -x mpeg2 > tempvideo.m2v;
FILENAME="$PWD/tempvideo.m2v";
FILESIZE=$(stat -c%s "$FILENAME");

description

tcextract is part of and usually called by transcode.
However, it can also be used independently.
tcextract
reads source (from stdin if not explicitely defined) and prints on the standard output.

options

-i name

Specify input source. If ommited, stdin is assumed. tcextract reads streams from file or from stdin.

-C s-e

extract and print out only this frame interval (video) or bytes (audio) [all]. This option is only supported if the source contains proper information to perform a selective extraction.

-t magic

source file magic. This option is used to identify the source file format if reading is performed from stdin or tcextract fails to identify the source file format. Supported formats are labeled with magic:

avi RIFF AVI-file

vob MPEG program streams

m2v MPEG elementary video stream

vdr MPEG digital video recording

raw raw bitstream

wav RIFF WAVE audio

yuv4mpeg mjpeg-tools stream header format

-x codec

source pdeudo-codec, if not detected when reading from stdin. Currently, supported parameter for codec are

mp3 MPEG audio

ac3 AC3 audio

a52 A52 audio

dv Digital Video DV

mpeg2 MPEG video

yv12 Y’CbCr YUV

rgb RGB 24-bit

ps1 MPEG private stream (subtitles)

pcm raw audio stream

-a track

extract selected audio or video track from source.

-d level

With this option you can specify a bitmask to enable different levels of verbosity (if supported). You can combine several levels by adding the corresponding values:

QUIET 0

INFO 1

DEBUG 2

STATS 4

WATCH 8

FLIST 16

VIDCORE 32

SYNC 64

COUNTER 128

PRIVATE 256

-v

Print version information and exit.

copyright

tcextract is Copyright (C) by Thomas Oestreich.

notes

tcextract is a front end for extracting various raw or encoded audio/video tracks from a source and is used in transcode’s import pipeline.


see also

avifix , avisync , avimerge , avisplit , tcprobe , tcscan , tccat , tcdemux , tcextract, tcdecode , transcode


authors

tcextract was written by Thomas Oestreich
<ostreich[:at:]theorie.physik[:dot:]uni-goettingen.de> with contributions from many others. See AUTHORS for details.

How can this site be more helpful to YOU ?


give  feedback