Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 07-30-2009, 07:02 PM   #1
Registered: Nov 2008
Location: USA
Distribution: Arch 64-bit
Posts: 159

Rep: Reputation: 35
mencoder "-vf scale" not working properly

my full command is

mencoder Haibane\ Renmei\ 01.mkv -sws 9 -of mpeg -mpegopts format=mpeg2 -vf scale=320:240,dsize=320:240:0 -ovc lavc -oac mp3lame -channels 2 -srate 48000 -o menc-h1.mpg
and mencoder encodes it with no errors, but then the output file is 1x7492 pixels in size sound works fine, everything works fine except the resize obviously failed.

The original file's dimensions are 704x480.

This is what mencoder says when I put in the command:

MEncoder UNKNOWN-4.2.4 (C) 2000-2009 MPlayer Team
success: format: 0  data: 0x0 - 0x1aad3634
[mkv] Track ID 1: video (V_MPEG4/ISO/AVC), -vid 0
[mkv] Track ID 2: audio (A_VORBIS) "2.0ch Vorbis", -aid 0, -alang jpn
[mkv] Track ID 3: subtitles (S_TEXT/ASS) "ASS", -sid 0, -slang eng
[mkv] Will play video track 1.
Matroska file format detected.
VIDEO:  [avc1]  704x480  24bpp  29.970 fps    0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:31  fourcc:0x31637661  size:704x480  fps:29.970  ftime:=0.0334
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 48000 Hz, 2 ch, s16le, 0.0 kbit/0.00% (ratio: 0->192000)
Selected audio codec: [ffvorbis] afm: ffmpeg (FFmpeg Vorbis)
PACKET SIZE: 2048 bytes, deltascr: 245760
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
Opening video filter: [dsize=320:240:0]
Opening video filter: [scale w=320 h=240]
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
MP3 audio selected.
Limiting audio preload to 0.4s.
Increasing audio density to 4.
VDec: vo config request - 704 x 480 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
[swscaler @ 0x9006110]Lanczos scaler, from yuv420p to yuv420p using MMX2
videocodec: libavcodec (320x240 fourcc=34504d46 [FMP4])
Writing header...
INITV: 0.200, 0.167, fps: 29.970

2 duplicate frame(s)!
FRAME DURATION: 900900   0.0330fps Trem:   0min   0mb  A-V:0.010 [0:0]
Pos:   0.7s     22f ( 0%)  0.00fps Trem:   0min   0mb  A-V:0.070 [0:135]
Skipping frame!
Pos:   1.0s     32f ( 0%)  0.00fps Trem:   0min   0mb  A-V:0.070 [68:154]
Skipping frame!
and then the last part goes on for awhile until it's done.

I am trying to resize this video for my Ipod Video on Rockbox, please help.
Old 07-30-2009, 07:54 PM   #2
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
As you are already scaling the video, why not use the -aspect option instead of -dsize.
Old 07-31-2009, 07:32 PM   #3
Registered: Nov 2008
Location: USA
Distribution: Arch 64-bit
Posts: 159

Original Poster
Rep: Reputation: 35
I tried using -aspect 16:9 instead of -dsize, but it gave the same results.

Instead, I have decided to do a complete workaround by resizing with ffmpeg (which seems to do it correctly), extracting the subs with mkvextract from mkvtoolnix, and telling mencoder to add the subs in with the -sub SUBFILE argument.

The whole point of my using mencoder instead of ffmpeg which I prefer, was because mencoder had support for hardcoding subtitles in, whereas ffmpeg did not.

Thanks anyways, though, your help is much appreciated.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
"System V" scripts not working properly sometimes rbauhaus Linux - Newbie 3 03-15-2009 09:39 AM
"su" commands not working properly htetnaing Linux - Newbie 4 08-15-2008 11:30 AM
my Fedora Box not working properly with the message " INPUT NOT SUPPORTED" siri.siri143 Linux - Newbie 3 04-15-2008 11:16 PM
net working eth0 eth1 wlan0 "no connection" "no LAN" "no wi-fi" Cayitano Linux - Newbie 5 12-09-2007 08:11 PM
"w" command not working properly blizunt7 Linux - General 3 12-17-2005 05:07 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:52 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration