Log in Register FAQ Memberlist Search pcHDTV Forum Index
pcHDTV Forum

pcHDTV Forum Index -> General pcHDTV topics -> mencoder commandline for 1080i
Post new topic  This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic 
mencoder commandline for 1080i
PostPosted: Fri Feb 03, 2006 3:01 pm Reply with quote
pyite
 
Joined: 02 Jun 2005
Posts: 15




Hello there. My system is too slow to play back 1080i properly, and I am looking for a command line to transcode with deinterlacing to another resolution (1280x720 or 960x540). Is there an mencoder expert who can help with this? The latest command line I tried:

mencoder /media/tv/tmp/tennis.mpg -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vhq:vqscale=3:v4mv:autoaspect:trell -vf tfields,scale=480:270 -fps 60000/1001 -ofps 60000/1001 -o test.avi

I see a lot of messages like this:

Pos: 39.2s 1158f ( 0%) 10fps Trem: 250min 1943mb A-V:-0.035 [2871:384]
1 duplicate frame(s)!
Pos: 39.5s 1168f ( 0%) 10fps Trem: 249min 1926mb A-V:-0.034 [2855:384]
1 duplicate frame(s)!
Pos: 42.5s 1255f ( 0%) 10fps Trem: 250min 1881mb A-V:0.034 [2746:384]]
Skipping frame!

The problem I have with this seems to be with keeping audio & video in sync. If I specify "-nosound" instead of -oac copy, I don't get any warning messages at all. Changing codecs from ac3 to mp3lame or pcm doesn't make a difference. When I play back the video, I can definitely tell that frames are missing! It is annoying to watch. With "-nosound", the video playback is perfect.

Any idea how to do a better job of transcoding / muxing / etc?

Thanks,
Mark
View user's profile Send private message Send e-mail
PostPosted: Sat Feb 04, 2006 7:06 pm Reply with quote
Scott Larson
 
Joined: 15 Oct 2003
Posts: 713
Location: Portland, OR




The recommendation of trying "-mc 0" and "-noskip" on the mencoder mailing list are good ideas. Although this contradicts the man page, I'd try not setting -fps on the command line. I've converted several 4:3 1080i files into 4:3 480p and I never set -fps. It makes no sense to me since -ofps will get the tfields filter running the right speed. I don't know if it will solve your A/V sync but I haven't had any problems.

Here's the command I use:

mencoder infile -mc 0 -vf
crop=1392:1064:250:16,tfields,scale=640:480
-ofps 60000/1001 -oac copy -ovc xvid -o outfile
View user's profile Send private message
Thanks
PostPosted: Sun Feb 05, 2006 3:35 pm Reply with quote
pyite
 
Joined: 02 Jun 2005
Posts: 15




Thanks for the reply.

I had a problem with -noskip and -mc 0. The audio and video were out of sync for several seconds.

However, this is to be expected with transport streams because of the way the audio & video are multiplexed. I believe if I specify -noskip and leave -mc 0 alone, I'll have better luck; or perhaps I can try to specify an offset for audio & video.

Mark
View user's profile Send private message Send e-mail
PostPosted: Mon Feb 06, 2006 12:03 pm Reply with quote
Scott Larson
 
Joined: 15 Oct 2003
Posts: 713
Location: Portland, OR




mencoder should still be able to keep audio and video in sync. They should never be that far apart in the stream and every audio and video packet has a timestamp.
View user's profile Send private message
PostPosted: Mon Feb 06, 2006 12:49 pm Reply with quote
pyite
 
Joined: 02 Jun 2005
Posts: 15




> mencoder should still be able to keep audio and video in sync. They should
> never be that far apart

You would think that the timestamps are good enough, but in the current version of mencoder it is not - especially with tfields. Matthias (one of the mencoder hackers) is working on an improved multiplexing algorithm - I will post here if it works better.

Mark
View user's profile Send private message Send e-mail
PostPosted: Mon Feb 06, 2006 8:23 pm Reply with quote
Scott Larson
 
Joined: 15 Oct 2003
Posts: 713
Location: Portland, OR




The largest A/V sync problem I've had using tfields is about 300ms. It was annoying but consistant so I merely adjusted the audio delay when playing it.
View user's profile Send private message
mencoder commandline for 1080i
  pcHDTV Forum Index -> General pcHDTV topics
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 7 Hours  
Page 1 of 1  

  
  
 Post new topic  This topic is locked: you cannot edit posts or make replies.  


Powered by phpBB © 2001-2003 phpBB Group
Theme created by Vjacheslav Trushkin