Hello,
My name is marlon and I have a question about using transcode to pre
process contrast and brightness in an avi video. Well as I am used to
help people in diferent open source projects I'll try doing in this
message what I would like people do in the messages I try to replay so
I'll try to explain my problem with the greater number of details I
can .
What I am trying to do is to encode .avi videos to .3gp h263 || mpeg4
videos. I installed ffmpeg, mplayer and transcode. At this time I am
relatively familiar with ffmpeg and I could encode successfully the
avi videos, but I found that before being encoded the videos need a
pre processing of contrast and brigthness. So I googled the internet
and found the transcode package wich seense to do just what I need.
Ok, I am a newbie in encoding so I am learning what file formats and
file containers are and such, so please be patient with me if I miss
something. I am also prety new to linux. My only experience with
encoders was with the vidiator xenon 2, where you select the contrast,
brightness, gama correction if needed, then video codec and such,
audio codec and such, click in run and everything is done. Now with
ffmpeg + transcode things are different and I am trying to learn how
it all works really but I'm still prety confused.
I decided first to preprocess the contrast and brigtness in the avi
file generating a pre processed avi file and after this encode the pre
processed file into an 3gp one. In the first step I have to use
transcode but I really have no idea how to do it. All the avi files
are capitured using adobe premiere.
My versions of ffmpeg, mplayer and transcode are:
FFmpeg version SVN-r5790, Copyright (c) 2000-2004 Fabrice Bellard
configuration: --enable-faadbin --enable-faac --enable-pp --enable-shared --e
nable-amr_nb-fixed --enable-gpl --enable-amr_wb --enable-amr_if2 --enable-pthrea
ds
libavutil version: 49.0.0
libavcodec version: 51.10.0
libavformat version: 50.5.0
built on Jul 27 2006 20:40:16, gcc: 3.3.6
MPlayer dev-SVN-r19148-3.3.6 (C) 2000-2006 MPlayer Team
CPU: Intel(R) Pentium(R) 4 CPU 1.80GHz (Family: 15, Model: 1, Stepping: 2)
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2
The transcode package was built with the following configurations:
./configure --enable-libpostproc --disable-lame --disable-libdvdread
--with-libavcodec-includes=/usr/local/include
--with-libavcodec-libs=/usr/local/lib
--with-libpostproc-prefix=/usr/local
--with-libpostproc-includes=/usr/local/include/postproc
--with-libpostproc-libs=/usr/local/lib
It compiled Ok, and its version (transcode) is 1.0.2.
Now let me explain quickly what I've tryed:
First I tryed reading the transcode faq. As I didn't find nothing
under the usage section about pre processing videos I tryed checking
the import filters section.
There I read I need to know what codecs my avi file contains before
trying to run transcode.
I tryed the tcprobe command and it showed for my sample video:
tcprobe -i gol.avi
[tcprobe] RIFF data, AVI video
[avilib] V: 29.970 fps, codec=MJPG, frames=450, width=320, height=240
[avilib] A: 48000 Hz, format=0x01, bits=16, channels=2, bitrate=1536 kbps,
[avilib] 451 chunks, 2882880 bytes, CBR
[tcprobe] summary for gol.avi, (*) = not default, 0 = not detected
import frame size: -g 320x240 [720x576] (*)
frame rate: -f 29.970 [25.000] frc=4 (*)
audio track: -a 0 [0] -e 48000,16,2 [48000,16,2] -n 0x1 [0x2000] (*)
bitrate=1536 kbps
length: 450 frames, frame_time=33 msec,
duration=0:00:15.015
The strange thing is that it didnt show the audio codec used in the
.avi file. Now I can't understand most part of what is shown here and
I can't even understand what I'll need from here to use in the
transcode command line.
Well as I didn't have the audio codec used I tryed the following command:
mplayer -vo null -ao null -frames 0 -identify gol.avi
MPlayer dev-SVN-r19148-3.3.6 (C) 2000-2006 MPlayer Team
CPU: Intel(R) Pentium(R) 4 CPU 1.80GHz (Family: 15, Model: 1, Stepping: 2)
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2
Playing gol.avi.
AVI file format detected.
ID_VIDEO_ID=0
ID_AUDIO_ID=1
VIDEO: [MJPG] 320x240 24bpp 29.970 fps 5827.9 kbps (711.4 kbyte/s)
ID_FILENAME=gol.avi
ID_DEMUXER=avi
ID_VIDEO_FORMAT=MJPG
ID_VIDEO_BITRATE=5827928
ID_VIDEO_WIDTH=320
ID_VIDEO_HEIGHT=240
ID_VIDEO_FPS=29.970
ID_VIDEO_ASPECT=0.0000
ID_AUDIO_FORMAT=1
ID_AUDIO_BITRATE=1536000
ID_AUDIO_RATE=0
ID_AUDIO_NCH=0
ID_LENGTH=15.02
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffmjpeg] vfm: ffmpeg (FFmpeg MJPEG decoder)
==========================================================================
ID_VIDEO_CODEC=ffmjpeg
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 48000 Hz, 2 ch, s16le, 1536.0 kbit/100.00% (ratio: 192000->192000)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
AO: [null] 48000Hz 2ch s16le (2 bytes per sample)
Starting playback...
Exiting... (End of file)
Ok, now I know my video is mjpg and audio is pcm. So what I want is to
generate another .avi file, with the same size, with mjpg and audio
pcm, with the same size, etc ... with contrast and brightness changed.
From this point I am totally confused and have no idea about how to do
thisprocess. I've provided all details I could and I've tryed google
too, but I am confused, really so I decided to ask here. My machine is
a slackware 10.2 p4 1.8 ghz.
If someone could help me or point me the direction where I should go I
would be gratefull.
Thanks
Marlon