[MEncoder-users] expert help wanted for realvideo transcoding!

Karlis order at karlis.ca
Tue Apr 7 18:19:18 CEST 2009


OMG Reimar thanks so much for your reply.

Reimar Döffinger wrote:
> On Fri, Apr 03, 2009 at 02:34:49PM -0700, Karlis wrote:
>> Can mencoder autodetect audio/video bitrates and framerates? Or do I  
>> have to inspect each file with ffmpeg, determine the audio/video  
>> bitrates and framerates, and specify that in the mencoder options? 
> 
> -identify should print mostly the same info as FFmpeg.

/usr/local/bin/mplayer -identify %s -nosound -vc dummy -vo null
this works great, much easier to parse than the ffmpeg output.
seems odd that the -identify isn't included as an option in the mencoder 
binary also . . .

Something weird though, I'm getting no audio stream information, and 
video bitrate is coming up as 0.  Is this normal for realvideo, a 
variable bitrate thing, or maybe this is what's causing me some problems?

VIDEO:  [RV20]  240x180  24bpp  15.000 fps    0.0 kbps ( 0.0 kbyte/s)
ID_VIDEO_BITRATE=0

> Though there obviously is the question why you would want to do it,
> e.g. if you don't want to lose quality vqscale=2 instead of vbitrate
> is far simpler and more reliable, particularly single-pass bitrate-based
> encoding usually does not work well.
> 
>> I'm currently already doing something like this for the video codec:  
>> mencoder doesn't seem to recognize the difference between rv20 and rv30,  
>> so I check the file for rv20 with ffmpeg, and add the "-vc rv20" if I  
>> detect rv20.  Do I have to do this for every parameter?
> 
> Huh? I have _never_ seen anyone need -vc rv20 to decode RealVideo.
> Also with that one you force MPlayer to use the binary decoders from Real
> which seems like a bad idea to use on such "cloud" services.

strange, without it I get lots of these encoding errors:

[rv20 @ 0x8c58af0]unknown bit3 set

and serious visual artifacts (partial frame movement updates in the 
video with black areas, not sure how to describe it well). those 
problems were solved by adding the -vc rv20.   This is only for rv20, 
rv30 and rv40 don't need the vc switch.

With or without -vc rv20, I get lots of messages:

1 duplicate frame(s)!
10 duplicate frame(s)!

should I try to resolve this?

>> mencoder %s -ni -vc rv20 -o %s -oac mp3lame -lameopts abr:br=56 -s rate  
>> 22050 -ovc lavc -lavcopts  
>> vcodec=flv:vbitrate=300:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -fps 15  
>> -ofps 15 -mc 1 -of lavf
> 
> -fps 15 overrides the input frame rate to 15 fps, if that is not absolutely
> correct it's no surprise you get sync issues.

My encode string also overrides the audio bitrate, yet there's no audio 
bitrate information in the mplayer -identify.  Could this also cause 
audio/video sync errors?

This is the latest test run I did.  The resulting file had the worst 
sync problem so far.  Included is the mencoder identify output for both 
the initial and resulting files.  Any suggestions?

-------------------------------------

/usr/local/bin/mencoder tm-3good.rm -ni -vc rv20  -o tm-3good-r1.flv 
-oac mp3lame -lameopts abr:br=56 -srate 22050 -ovc lavc -lavcopts 
vcodec=flv:vqscale=2:mbd=2:mv0:trell:v4mv:cbp:last_pred=3  -mc 1 -of lavf

-------------------------------------

/usr/local/bin/mplayer -identify tm-3good.rm -nosound -vc dummy -vo null
MPlayer SVN-r28624-4.1.2 (C) 2000-2009 MPlayer Team

Playing tm-3good.rm.
REAL file format detected.
Stream description: audio/x-pn-multirate-realaudio logical stream
Stream mimetype: logical-audio/x-pn-multirate-realaudio
Stream description: video/x-pn-multirate-realvideo logical stream
Stream mimetype: logical-video/x-pn-multirate-realvideo
Stream description: fileinfo
Stream mimetype: logical-fileinfo
Stream description: Audio Stream

  Stream mimetype: audio/x-pn-multirate-realaudio
ID_AUDIO_ID=0
[real] Audio stream found, -aid 0
Stream description: Video Stream
Stream mimetype: video/x-pn-multirate-realvideo
ID_VIDEO_ID=1
[real] Video stream found, -vid 1
Stream description: Video Stream
Stream mimetype: video/x-pn-multirate-realvideo
ID_VIDEO_ID=4
[real] Video stream found, -vid 4
Stream description: Video Stream
Stream mimetype: video/x-pn-multirate-realvideo
ID_VIDEO_ID=5
[real] Video stream found, -vid 5
Stream description: Audio Stream
Stream mimetype: audio/x-pn-multirate-realaudio
ID_AUDIO_ID=6
[real] Audio stream found, -aid 6
Stream description: Video Stream
Stream mimetype: video/x-pn-multirate-realvideo
ID_VIDEO_ID=7
[real] Video stream found, -vid 7
Stream description: Video Stream
Stream mimetype: video/x-pn-multirate-realvideo
ID_VIDEO_ID=8
[real] Video stream found, -vid 8
Stream description: Audio Stream
Stream mimetype: audio/x-pn-realaudio[real] Audio stream found, -aid 9
ID_AUDIO_ID=9
Stream description: Audio Stream
Stream mimetype: audio/x-pn-multirate-realaudio
ID_AUDIO_ID=10
[real] Audio stream found, -aid 10
Stream description: Video Stream
Stream mimetype: video/x-pn-realvideo
ID_VIDEO_ID=11
[real] Video stream found, -vid 11
Stream description: Video Stream
Stream mimetype: video/x-pn-multirate-realvideo
ID_VIDEO_ID=12
[real] Video stream found, -vid 12
Stream description: Video Stream
Stream mimetype: video/x-pn-multirate-realvideo
ID_VIDEO_ID=13
[real] Video stream found, -vid 13
Stream description: Video Stream
Stream mimetype: video/x-pn-multirate-realvideo
ID_VIDEO_ID=15
[real] Video stream found, -vid 15
VIDEO:  [RV20]  320x240  24bpp  15.000 fps    0.0 kbps ( 0.0 kbyte/s)
Clip info:
  name: Tm-3good
ID_CLIP_INFO_NAME0=name
ID_CLIP_INFO_VALUE0=Tm-3good
  author: pot tv
ID_CLIP_INFO_NAME1=author
ID_CLIP_INFO_VALUE1=pot tv
  copyright: ©2000
ID_CLIP_INFO_NAME2=copyright
ID_CLIP_INFO_VALUE2=©2000
ID_CLIP_INFO_N=3
ID_FILENAME=tm-3good.rm
ID_DEMUXER=real
ID_VIDEO_FORMAT=RV20
ID_VIDEO_BITRATE=0
ID_VIDEO_WIDTH=320
ID_VIDEO_HEIGHT=240
ID_VIDEO_FPS=15.000
ID_VIDEO_ASPECT=0.0000
ID_LENGTH=1289.00
ID_SEEKABLE=1
ID_CHAPTERS=0
==========================================================================
Forced video codec: dummy
Cannot find codec matching selected -vo and video format 0x30325652.
Read DOCS/HTML/en/codecs.html!
==========================================================================
Exiting... (End of file)
ID_EXIT=EOF

--------------------------
/usr/local/bin/mplayer -identify tm-3good-r1.flv -nosound -vc dummy -vo null
MPlayer SVN-r28624-4.1.2 (C) 2000-2009 MPlayer Team

Playing tm-3good-r1.flv.
libavformat file format detected.
ID_VIDEO_ID=0
[lavf] Video stream found, -vid 0
ID_AUDIO_ID=1
[lavf] Audio stream found, -aid 1
VIDEO:  [FLV1]  320x240  0bpp  15.000 fps  800.0 kbps (97.7 kbyte/s)
ID_FILENAME=tm-3good-r1.flv
ID_DEMUXER=lavfpref
ID_VIDEO_FORMAT=FLV1
ID_VIDEO_BITRATE=800000
ID_VIDEO_WIDTH=320
ID_VIDEO_HEIGHT=240
ID_VIDEO_FPS=15.000
ID_VIDEO_ASPECT=0.0000
ID_LENGTH=1283.32
ID_SEEKABLE=1
ID_CHAPTERS=0
==========================================================================
Forced video codec: dummy
Cannot find codec matching selected -vo and video format 0x31564C46.
Read DOCS/HTML/en/codecs.html!
==========================================================================


Exiting... (End of file)
ID_EXIT=EOF

---------------------------------

thanks again

cheers
karlis


More information about the MEncoder-users mailing list