Find the answer to your Linux question:
Page 2 of 2 FirstFirst 1 2
Results 11 to 19 of 19
this is what I get when I run my command from a script: Code: MEncoder 1.0pre7-3.3.5-20050130 (C) 2000-2005 MPlayer Team CPU: Advanced Micro Devices Athlon MP/XP Thoroughbred (Family: 6, Stepping: ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    Linux Engineer spencerf's Avatar
    Join Date
    Jan 2005
    Location
    Syracuse, NY
    Posts
    1,144

    this is what I get when I run my command from a script:

    Code:
    MEncoder 1.0pre7-3.3.5-20050130 (C) 2000-2005 MPlayer Team
    CPU: Advanced Micro Devices Athlon MP/XP Thoroughbred (Family: 6, Stepping: 1)
    Detected cache-line size is 64 bytes
    CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
    Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE
    
    File not found: 'frameno.avi'
    Failed to open frameno.avi
    success: format: 0  data: 0x0 - 0x3f8a800
    AVI file format detected.
    VIDEO:  [DIV3]  352x240  24bpp  29.970 fps  329.5 kbps (40.2 kbyte/s)
    [V] filefmt:3  fourcc:0x33564944  size:352x240  fps:29.97  ftime:=0.0334
    ==========================================================================
    Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
    AUDIO: 44100 Hz, 2 ch, s16le, 64.1 kbit/4.54% (ratio: 8010->176400)
    Selected audio codec: [ffwmav2] afm:ffmpeg (DivX audio v2 (FFmpeg))
    ==========================================================================
    PACKET SIZE: 2048 bytes
    Opening video filter: [expand osd=1]
    Expand: -1 x -1, -1 ; -1  (-1=autodetect) osd: 1
    Opening video filter: [harddup]
    Opening video filter: [scale w=720 h=480]
    ==========================================================================
    Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
    Selected video codec: [ffdivx] vfm:ffmpeg (FFmpeg DivX ;-) (MS MPEG-4 v3))
    ==========================================================================
    Building audio filter chain for 44100Hz/2ch/s16le -> 48000Hz/2ch/s16le...
    Writing AVI header...
    Limiting audio preload to 0.4s
    Increasing audio density to 4
    AUDIO FRAME SIZE: 768, DELTA_PTS: 2949120 (0.032)
    VDec: vo config request - 352 x 240 (preferred csp: Planar YV12)
    VDec: using Planar YV12 as output csp (no 0)
    Movie-Aspect is undefined - no prescaling applied.
    SwScaler: reducing / aligning filtersize 5 -> 4
    SwScaler: reducing / aligning filtersize 5 -> 4
    SwScaler: reducing / aligning filtersize 5 -> 4
    SwScaler: reducing / aligning filtersize 5 -> 4
    
    SwScaler: BICUBIC scaler, from Planar YV12 to Planar YV12 using MMX2
    videocodec: libavcodec (720x480 fourcc=3267706d [mpg2])
    New_Face failed. Maybe the font path is wrong.
    Please supply the text font file (~/.mplayer/subfont.ttf).
    subtitle font: load_sub_face failed.
    INITIAL DELAY of 0 frames   0fps Trem:   0min   0mb  A-V:0.000 [0:0]
    Pos: 103.2s   3096f ( 8%)  43fps Trem:  13min 433mb  A-V:0.027 [2591:192]
    1 duplicate frame(s)!
    my command is:

    Code:
    mencoder /home/bob/movies/1.avi -of mpeg -vf scale=720:480,harddup -oac lavc -ovc lavc -lavcopts acodec=ac3:abitrate=192:vcodec=mpeg2video:keyint=25:vbitrate=5000:aspect=4/3 -mpegopts format=dvd -srate 48000 -ofps 30000/1001 -o /home/bob/movies/1.mpg
    except whole command is one line!
    All right, brain. You don't like me and I don't like you, but let's just do this and I can get back to killing you with beer. All New Users Read This!!! If you have a grub problem please look at GRUB MANUAL

  2. #12
    Linux Engineer spencerf's Avatar
    Join Date
    Jan 2005
    Location
    Syracuse, NY
    Posts
    1,144
    the content of the directory I want converted which is /home/bob/movies is a bunch of avi files.
    All right, brain. You don't like me and I don't like you, but let's just do this and I can get back to killing you with beer. All New Users Read This!!! If you have a grub problem please look at GRUB MANUAL

  3. #13
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    Location
    St. Petersburg, FL
    Posts
    5,035
    Can you
    Code:
    ls
    it?

  4. #14
    Linux Engineer spencerf's Avatar
    Join Date
    Jan 2005
    Location
    Syracuse, NY
    Posts
    1,144
    this is all the files in: /home/bob/movies/ minus the script I copy over to it.

    Code:
    That 70's Show - 301 - Reefer Madness.avi
    That 70's Show - 302 - Red Sees Red.avi
    That 70's Show - 303 - Hyde's Father.avi
    That 70's Show - 304 - TooOldTo.avi
    That 70's Show - 305 - Roller Disco.avi
    That 70's Show - 306 - Eric's Panties.avi
    That 70's Show - 307 - Baby Fever.avi
    That 70's Show - 308 - JackieBagsHyde.avi
    That 70's Show - 309 - HydeChristmas.avi
    That 70's Show - 310 - Ice Shack.avi
    That 70's Show - 311 - WhoWantsIt.avi
    That 70's Show - 312 - FezGetsTheGirl.avi
    That 70's Show - 313 - Dine and Dash.avi
    That 70's Show - 314 - Radio Daze.avi
    That 70's Show - 315 - Donna'sPanties.avi
    That 70's Show - 316 - RomanticWeek.avi
    That 70's Show - 317 - Kittys Birthday.avi
    That 70's Show - 318 - TrialsofKelso.avi
    That 70's Show - 319 - Eric'sNaughty.avi
    That 70's Show - 320 - Holy Craps.avi
    That 70's Show - 321 - EricDrunkenTatt.avi
    That 70's Show - 322 - FezDatesDonna.avi
    That 70's Show - 323 - CanadianroadT.avi
    That 70's Show - 324 -  Backstage Pass.avi
    That 70's Show - 325 - ThePromiseRing.avi
    That 70's Show - 401 - ItsaWonderful.avi
    That 70's Show - 402 - EricDepression.avi
    That 70's Show - 403 - Pinciotti-Fore.avi
    That 70's Show - 404 - HydeGetsAGirl.avi
    That 70's Show - 405 - ByByBasement.avi
    That 70's Show - 406 - The Relapse.avi
    That 70's Show - 407 - UncontableBall.avi
    That 70's Show - 408 - Donna's Story.avi
    That 70's Show - 410 - Red and Stacey.avi
    That 70's Show - 411 - The third wheel.avi
    That 70's Show - 412 - EricChristmas.avi
    That 70's Show - 413 - JacSayCheese.avi
    That 70's Show - 415 - Tornado Prom.avi
    That 70's Show - 416 - DonnaDatesAKe.avi
    That 70's Show - 417 - Kelso's Career.avi
    That 70's Show - 418 - Leo Loves Kitty.avi
    That 70's Show - 419 - Jackie's Cheese.avi
    That 70's Show - 420 - Class Picture.avi
    That 70's Show - 421 - Prank Day.avi
    That 70's Show - 422 - Eric's Corvette.avi
    That 70's Show - 423 - Hyde's Birthday.avi
    That 70's Show - 424 - Musical.avi
    That 70's Show - 425 - EricFalseAlarm.avi
    That 70's Show - 426 - EverybLovesCa.avi
    That 70's Show - 427 - LoveWiscStyle.avi
    That 70's show - 409 - TheForgotSon.avi
    That 70's show - 414 - Eric'sHotCousin.avi
    All right, brain. You don't like me and I don't like you, but let's just do this and I can get back to killing you with beer. All New Users Read This!!! If you have a grub problem please look at GRUB MANUAL

  5. #15
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    Location
    St. Petersburg, FL
    Posts
    5,035
    Try enclosing the {$file&&etc's in quotes

  6. #16
    Linux Guru Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,252
    Aha.

    The issue is that it's attempting to read a file with spaces in it. When it later calls the command, it includes the filename exactly as it appears, with spaces, which are read in as separate files.

    Try this:
    Code:
    #!/bin/bash
    if [ $# -eq 1 ]
    then
    dir="$1"
    else
    dir="$PWD"
    fi
    cd $dir
    for file in *.avi
    do
    mencoder "$file" -of mpeg -vf scale=720:480,harddup -oac lavc -ovc lavc -lavcopts acodec=ac3:abitrate=192:vcodec=mpeg2video:keyint=25:vbitrate=5000:aspect=4/3 -mpegopts format=dvd -srate 48000 -ofps 30000/1001 -o ${file%%avi}mpg
    done
    The only change is putting $file in quotes. This may fix your problem.

  7. #17
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    Location
    St. Petersburg, FL
    Posts
    5,035
    yeah...pretty much

  8. #18
    Linux Engineer spencerf's Avatar
    Join Date
    Jan 2005
    Location
    Syracuse, NY
    Posts
    1,144
    yep that did it. Thanks so much for your help guys. I really appreciate it.
    All right, brain. You don't like me and I don't like you, but let's just do this and I can get back to killing you with beer. All New Users Read This!!! If you have a grub problem please look at GRUB MANUAL

  9. #19
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    Location
    St. Petersburg, FL
    Posts
    5,035
    That's why we're here

Page 2 of 2 FirstFirst 1 2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •