[MEncoder-users] motion estimation across different codecs
Adrian Ulges
aulges at googlemail.com
Mon Mar 5 18:14:50 CET 2012
Hi,
I have a question regarding motion estimation in mencoder -
I have videos from two different sources/websites, encoded with
different codecs (for more info, see the output of "mplayer -identify"
below).
I observed that the distribution of the motion compensation vectors
across both sources is very different (which may not be surprising):
Videos from source 2 tend to have a lot more purely
horizontal/vertical motion vectors (i.e., either v_x or v_y is usually
zero), while videos from source 2 contain more diverse motion vectors.
This is bad, because I want to do some fancy machine learning on these
motion vectors.
I was hoping to get rid of this effect (i.e., to make the general
distributions of motion vectors from the two sources more similar) by
transcoding all input videos with the same codec, using the following
mencoder call:
mencoder input.avi
-ovc xvid
-xvidencopts vhq=3:bitrate=700:me_quality=3:nogmc:max_bframes=0:noqpel
-vf scale=-10:240
-o output.avi
Unfortunately, this call did not solve my problem - the distribution
of motion vectors from source 1 remains "strange".
My question is: why is this? (I have two guesses)
Option 1: The input quality is so low (in terms of blockiness) that
motion estimation cannot really find new motion estimates
Option 2: mencoder inherently uses the motion guess from the input
data and is biased towards it (in which case: is there a way to get
rid of this)?
If anyone is interested, I can also post more detailed information
(like plots of the motion vectors) -
thanks a lot in advance!
adrian
SOURCE 1:
=========
libavformat file format detected.
ID_AUDIO_ID=0
ID_AID_0_LANG=und
[lavf] stream 0: audio (aac), -aid 0, -alang und
ID_VIDEO_ID=0
[lavf] stream 1: video (h264), -vid 0
VIDEO: [H264] 480x272 24bpp 25.000 fps 361.4 kbps (44.1 kbyte/s)
Clip info:
major_brand: isom
ID_CLIP_INFO_NAME0=major_brand
ID_CLIP_INFO_VALUE0=isom
minor_version: 1
ID_CLIP_INFO_NAME1=minor_version
ID_CLIP_INFO_VALUE1=1
compatible_brands: isomavc1
ID_CLIP_INFO_NAME2=compatible_brands
ID_CLIP_INFO_VALUE2=isomavc1
copyright:
ID_CLIP_INFO_NAME3=copyright
ID_CLIP_INFO_VALUE3=
copyright-eng:
ID_CLIP_INFO_NAME4=copyright-eng
ID_CLIP_INFO_VALUE4=
ID_CLIP_INFO_N=5
ID_FILENAME=00ZEEKT5GFOBDSSIBV7F-0.mp4
ID_DEMUXER=lavfpref
ID_VIDEO_FORMAT=H264
ID_VIDEO_BITRATE=361392
ID_VIDEO_WIDTH=480
ID_VIDEO_HEIGHT=272
ID_VIDEO_FPS=25.000
ID_VIDEO_ASPECT=1.7647
ID_AUDIO_FORMAT=MP4A
ID_AUDIO_BITRATE=63992
ID_AUDIO_RATE=22050
ID_AUDIO_NCH=2
ID_START_TIME=0.00
ID_LENGTH=317.56
ID_SEEKABLE=1
ID_CHAPTERS=0
==========================================================================
Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)
AUDIO: 22050 Hz, 2 ch, s16le, 64.0 kbit/9.07% (ratio: 7999->88200)
ID_AUDIO_BITRATE=63992
ID_AUDIO_RATE=22050
ID_AUDIO_NCH=2
Selected audio codec: [faad] afm: faad (FAAD AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
SOURCE 2:
=========
libavformat file format detected.
ID_VIDEO_ID=0
[lavf] stream 0: video (h264), -vid 0
ID_AUDIO_ID=0
[lavf] stream 1: audio (aac), -aid 0
VIDEO: [H264] 320x240 0bpp 24.000 fps 398.7 kbps (48.7 kbyte/s)
Clip info:
metadatacreator: Yet Another Metadata Injector for FLV - Version 1.8
ID_CLIP_INFO_NAME0=metadatacreator
ID_CLIP_INFO_VALUE0=Yet Another Metadata Injector for FLV - Version 1.8
hasKeyframes: true
ID_CLIP_INFO_NAME1=hasKeyframes
ID_CLIP_INFO_VALUE1=true
hasVideo: true
ID_CLIP_INFO_NAME2=hasVideo
ID_CLIP_INFO_VALUE2=true
hasAudio: true
ID_CLIP_INFO_NAME3=hasAudio
ID_CLIP_INFO_VALUE3=true
hasMetadata: true
ID_CLIP_INFO_NAME4=hasMetadata
ID_CLIP_INFO_VALUE4=true
canSeekToEnd: true
ID_CLIP_INFO_NAME5=canSeekToEnd
ID_CLIP_INFO_VALUE5=true
duration: 1196
ID_CLIP_INFO_NAME6=duration
ID_CLIP_INFO_VALUE6=1196
datasize: 72839569
ID_CLIP_INFO_NAME7=datasize
ID_CLIP_INFO_VALUE7=72839569
videosize: 59933989
ID_CLIP_INFO_NAME8=videosize
ID_CLIP_INFO_VALUE8=59933989
framerate: 24
ID_CLIP_INFO_NAME9=framerate
ID_CLIP_INFO_VALUE9=24
videodatarate: 389
ID_CLIP_INFO_NAME10=videodatarate
ID_CLIP_INFO_VALUE10=389
videocodecid: 7
ID_CLIP_INFO_NAME11=videocodecid
ID_CLIP_INFO_VALUE11=7
width: 320
ID_CLIP_INFO_NAME12=width
ID_CLIP_INFO_VALUE12=320
height: 240
ID_CLIP_INFO_NAME13=height
ID_CLIP_INFO_VALUE13=240
audiosize: 12584684
ID_CLIP_INFO_NAME14=audiosize
ID_CLIP_INFO_VALUE14=12584684
audiodatarate: 79
ID_CLIP_INFO_NAME15=audiodatarate
ID_CLIP_INFO_VALUE15=79
audiocodecid: 10
ID_CLIP_INFO_NAME16=audiocodecid
ID_CLIP_INFO_VALUE16=10
audiosamplerate: 3
ID_CLIP_INFO_NAME17=audiosamplerate
ID_CLIP_INFO_VALUE17=3
audiosamplesize: 1
ID_CLIP_INFO_NAME18=audiosamplesize
ID_CLIP_INFO_VALUE18=1
stereo: true
ID_CLIP_INFO_NAME19=stereo
ID_CLIP_INFO_VALUE19=true
filesize: 72851432
ID_CLIP_INFO_NAME20=filesize
ID_CLIP_INFO_VALUE20=72851432
lasttimestamp: 1196
ID_CLIP_INFO_NAME21=lasttimestamp
ID_CLIP_INFO_VALUE21=1196
lastkeyframetimestamp: 1196
ID_CLIP_INFO_NAME22=lastkeyframetimestamp
ID_CLIP_INFO_VALUE22=1196
lastkeyframelocation: 72851412
ID_CLIP_INFO_NAME23=lastkeyframelocation
ID_CLIP_INFO_VALUE23=72851412
ID_CLIP_INFO_N=24
ID_FILENAME=00E18ATBBNVURHJR7C5M-0.flv
ID_DEMUXER=lavfpref
ID_VIDEO_FORMAT=H264
ID_VIDEO_BITRATE=398696
ID_VIDEO_WIDTH=320
ID_VIDEO_HEIGHT=240
ID_VIDEO_FPS=24.000
ID_VIDEO_ASPECT=1.3000
ID_AUDIO_FORMAT=MP4A
ID_AUDIO_BITRATE=80384
ID_AUDIO_RATE=44100
ID_AUDIO_NCH=2
ID_START_TIME=0.00
ID_LENGTH=1196.25
ID_SEEKABLE=1
ID_CHAPTERS=0
==========================================================================
Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)
AUDIO: 44100 Hz, 2 ch, s16le, 80.4 kbit/5.70% (ratio: 10048->176400)
ID_AUDIO_BITRATE=80384
ID_AUDIO_RATE=44100
ID_AUDIO_NCH=2
Selected audio codec: [faad] afm: faad (FAAD AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
--
--
Dr. Adrian Ulges
German Research Center for Artificial Intelligence (DFKI)
Tel: +49 631 20575 4190
Mail: adrian.ulges at dfki.de
Web: www.dfki.uni-kl.de/~ulges
-------------------------------------------------------------
Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
Trippstadter Strasse 122, D-67663 Kaiserslautern, Germany
Geschaeftsfuehrung:
Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster (Vorsitzender)
Dr. Walter Olthoff
Vorsitzender des Aufsichtsrats:
Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313
-------------------------------------------------------------
More information about the MEncoder-users
mailing list