+ Post New Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 21
How do you do....it? Thread, Video Rendering Server in Technical; Hi all, As part of the schools digital media sections of IT the students have to capture and edit video ...
  1. #1
    jamesfed's Avatar
    Join Date
    Sep 2009
    Location
    Reading
    Posts
    2,185
    Thank Post
    133
    Thanked 340 Times in 287 Posts
    Rep Power
    84

    Video Rendering Server

    Hi all,

    As part of the schools digital media sections of IT the students have to capture and edit video – since the IT Teachers want to stick with XP Movie Maker (which I understand because of its simplicity for the year 7/8/9 students) we are constantly running into problems with video file formats not being supported.

    Usually if a student had some video that couldn’t be edited I would stick it into SUPER and re render the video on my desktop PC however with the volume of video this can sometimes take quite a while.

    As such I was thinking does anyone know of a way that I could get one of the servers to automatically render the video for me?

    The way I see this working (or something similar)-

    1. Student finds they can’t use video in movie maker
    2. Student cops video file to a network shared folder
    3. Every few minutes the server looks at that folder to see if there is anything in there
    4. Server converts video and puts it in a ‘rendered videos’ network folder
    5. Server s deletes original video from folder (maybe even deletes the rendered video after a specific time period)

    What would be even better is if this could also be done with music files to.

    I know this is a tall order and I’d be happy to have a go at anything.
    If I need to run a separate OS (or even Linux) to do this then that shouldn’t be a problem as we have plenty of RAM in our virtual server.

    Thanks,
    James

  2. #2

    SYNACK's Avatar
    Join Date
    Oct 2007
    Posts
    10,991
    Thank Post
    851
    Thanked 2,653 Times in 2,253 Posts
    Blog Entries
    9
    Rep Power
    764
    So long as you have all the required codecs to read the files on the server this should not be a problem to implement as you want. A bit of VBS or Batch on a scheduled task along with Expression Encoder and you should be able to do this easily enough.

    How Do I: Encode a Video from the Command Line
    Command-line operation
    Expression Encoder 4
    Last edited by SYNACK; 8th July 2010 at 12:40 PM.

  3. Thanks to SYNACK from:

    jamesfed (8th July 2010)

  4. #3
    jamesfed's Avatar
    Join Date
    Sep 2009
    Location
    Reading
    Posts
    2,185
    Thank Post
    133
    Thanked 340 Times in 287 Posts
    Rep Power
    84
    Wow thanks thats just the kind of answer I was looking for - video was useful and I've got a bat file setup but don't know what source/target values I should be using to do the contents of a folder?
    Thanks again!

  5. #4

    SYNACK's Avatar
    Join Date
    Oct 2007
    Posts
    10,991
    Thank Post
    851
    Thanked 2,653 Times in 2,253 Posts
    Blog Entries
    9
    Rep Power
    764
    You would probably need to do them one by one, your best bet would be to make a VBS script that reads through the file names in that folder one by one and for each of them runs that command line then delets the source file. Something like "encoder.exe /source " & SourceDir & "\" & FileName & " /target f:\encodedvids\" & Filename
    pushed into a shell run command.

    These should have all the required code in them, just a case of combining it into a script and setting it as a scheduled task to run every hour or so:
    List All Files in Folder using VBScript
    Run Method (Windows Script Host)
    Copy, delete or move a file - Real's WSH VBS How-to

  6. #5
    jamesfed's Avatar
    Join Date
    Sep 2009
    Location
    Reading
    Posts
    2,185
    Thank Post
    133
    Thanked 340 Times in 287 Posts
    Rep Power
    84
    Oooh this is where the uming and errring begins
    I'll have a look through the docs - thanks again!

  7. #6

    plexer's Avatar
    Join Date
    Dec 2005
    Location
    Norfolk
    Posts
    13,272
    Thank Post
    613
    Thanked 1,567 Times in 1,407 Posts
    Rep Power
    412
    have a look at ffmpeg

    Ben

  8. Thanks to plexer from:

    jamesfed (8th July 2010)

  9. #7

    plexer's Avatar
    Join Date
    Dec 2005
    Location
    Norfolk
    Posts
    13,272
    Thank Post
    613
    Thanked 1,567 Times in 1,407 Posts
    Rep Power
    412
    FFMPEG Automated Video Convert

    Basically use a folder monitoring app to check for new files and then invoke ffmpeg on new files.

    Ben

  10. #8
    jamesfed's Avatar
    Join Date
    Sep 2009
    Location
    Reading
    Posts
    2,185
    Thank Post
    133
    Thanked 340 Times in 287 Posts
    Rep Power
    84
    Was just looking into FFMPEG too - any suggestions on a folder monitoring application?

  11. #9

    plexer's Avatar
    Join Date
    Dec 2005
    Location
    Norfolk
    Posts
    13,272
    Thank Post
    613
    Thanked 1,567 Times in 1,407 Posts
    Rep Power
    412
    Not used any but have a look here:

    7 Free Tools To Monitor Folder Changes

    Ben

  12. #10
    jamesfed's Avatar
    Join Date
    Sep 2009
    Location
    Reading
    Posts
    2,185
    Thank Post
    133
    Thanked 340 Times in 287 Posts
    Rep Power
    84
    Wow making serious progress now-
    Are using Expression Encoder 2 and Directory Monitor from deventerprise.net (expect a quick how to when I get it working perfectly).
    Only one thing is - how do I get the bat file that I have setup to output the original file name with the new .wmv extension?
    Another option I was thinking about was using the date/time as the filename and then the .wmv extension.

    Any clues?

  13. #11


    Join Date
    Feb 2007
    Location
    51.405546, -0.510212
    Posts
    8,709
    Thank Post
    220
    Thanked 2,615 Times in 1,926 Posts
    Rep Power
    777
    Quote Originally Posted by jamesfed View Post
    how do I get the bat file that I have setup to output the original file name with the new .wmv extension?
    I use this one for FFmpeg...

    MP4toWMV.cmd
    Code:
    @echo off
    for %%a in (*.mp4) do ffmpeg -y -i "%%a" -b 900k -vcodec wmv2 -acodec wmav2 -ab 128k -ac 2 -ar 44100 "%%~na.wmv"

  14. #12


    Join Date
    Feb 2007
    Location
    51.405546, -0.510212
    Posts
    8,709
    Thank Post
    220
    Thanked 2,615 Times in 1,926 Posts
    Rep Power
    777
    Quote Originally Posted by jamesfed View Post
    Another option I was thinking about was using the date/time as the filename and then the .wmv extension.
    The following batch file will do that...

    MP4toWMV_DateAsFilename.cmd
    Code:
    @echo off & setlocal ENABLEEXTENSIONS
    
    :: Call Functions
    call :GetTime h n s t
    call :GetDate y m d
    
    :: Convert video
    for %%a in (*.mp4) do ffmpeg -y -i "%%a" -b 900k -vcodec wmv2 -acodec wmav2 -ab 128k -ac 2 -ar 44100 "%h%-%n%-%s%_%y%-%m%-%d%.wmv"
    
    :: Exit
    goto :EOF
    
    :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    :GetTime hh nn ss tt
    ::
    :: By:   Ritchie Lawrence, updated 2007-05-12. Version 1.3
    ::
    :: Func: Loads local system time components into args 1 to 4.
    ::       For NT4/2000/XP/2003
    :: 
    :: Args: %1 Var to receive hours, 2 digits, 00 to 23 (by ref)
    ::       %2 Var to receive minutes, 2 digits, 00 to 59 (by ref)
    ::       %3 Var to receive seconds, 2 digits, 00 to 59 (by ref)
    ::       %4 Var to receive centiseconds, 2 digits, 00 to 99 (by ref)
    :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    setlocal ENABLEEXTENSIONS
    for /f "tokens=5-8 delims=:,. " %%a in ('echo/^|time') do (
      set hh=%%a&set nn=%%b&set ss=%%c&set cs=%%d)
    if 1%hh% LSS 20 set hh=0%hh%
    endlocal&set %1=%hh%&set %2=%nn%&set %3=%ss%&set %4=%cs%&goto :EOF
    :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    
    :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    :GetDate yy mm dd
    ::
    :: By:   Ritchie Lawrence, 2002-06-15. Version 1.0
    ::
    :: Func: Loads local system date components into args 1 to 3.
    ::       For NT4/2000/XP/2003.
    :: 
    :: Args: %1 var to receive year, 4 digits (by ref)
    ::       %2 var to receive month, 2 digits, 01 to 12 (by ref)
    ::       %3 Var to receive day of month, 2 digits, 01 to 31 (by ref)
    :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    setlocal ENABLEEXTENSIONS
    set t=2&if "%date%z" LSS "A" set t=1
    for /f "skip=1 tokens=2-4 delims=(-)" %%a in ('echo/^|date') do (
      for /f "tokens=%t%-4 delims=.-/ " %%d in ('date/t') do (
        set %%a=%%d&set %%b=%%e&set %%c=%%f))
    endlocal&set %1=%yy%&set %2=%mm%&set %3=%dd%&goto :EOF
    :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

  15. Thanks to Arthur from:

    jamesfed (9th July 2010)

  16. #13
    jamesfed's Avatar
    Join Date
    Sep 2009
    Location
    Reading
    Posts
    2,185
    Thank Post
    133
    Thanked 340 Times in 287 Posts
    Rep Power
    84
    Perfect!!

    Code is now-
    Code:
    @echo off & setlocal ENABLEEXTENSIONS
    
    :: Call Functions
    call :GetTime h n s t
    call :GetDate y m d
    
    :: Convert video
    "C:\Program Files (x86)\Microsoft Expression\Encoder 2\encoder.exe" /source %1 /target "c:\encode\output\%h%-%n%-%s%_%y%-%m%-%d%.wmv"
    
    :: Exit
    
    :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    :GetTime hh nn ss tt
    ::
    :: By:   Ritchie Lawrence, updated 2007-05-12. Version 1.3
    ::
    :: Func: Loads local system time components into args 1 to 4.
    ::       For NT4/2000/XP/2003
    :: 
    :: Args: %1 Var to receive hours, 2 digits, 00 to 23 (by ref)
    ::       %2 Var to receive minutes, 2 digits, 00 to 59 (by ref)
    ::       %3 Var to receive seconds, 2 digits, 00 to 59 (by ref)
    ::       %4 Var to receive centiseconds, 2 digits, 00 to 99 (by ref)
    :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    setlocal ENABLEEXTENSIONS
    for /f "tokens=5-8 delims=:,. " %%a in ('echo/^|time') do (
      set hh=%%a&set nn=%%b&set ss=%%c&set cs=%%d)
    if 1%hh% LSS 20 set hh=0%hh%
    endlocal&set %1=%hh%&set %2=%nn%&set %3=%ss%&set %4=%cs%&goto :EOF
    :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    
    :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    :GetDate yy mm dd
    ::
    :: By:   Ritchie Lawrence, 2002-06-15. Version 1.0
    ::
    :: Func: Loads local system date components into args 1 to 3.
    ::       For NT4/2000/XP/2003.
    :: 
    :: Args: %1 var to receive year, 4 digits (by ref)
    ::       %2 var to receive month, 2 digits, 01 to 12 (by ref)
    ::       %3 Var to receive day of month, 2 digits, 01 to 31 (by ref)
    :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    setlocal ENABLEEXTENSIONS
    set t=2&if "%date%z" LSS "A" set t=1
    for /f "skip=1 tokens=2-4 delims=(-)" %%a in ('echo/^|date') do (
      for /f "tokens=%t%-4 delims=.-/ " %%d in ('date/t') do (
        set %%a=%%d&set %%b=%%e&set %%c=%%f))
    endlocal&set %1=%yy%&set %2=%mm%&set %3=%dd%&goto :EOF
    :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    Last thing to do now is to get it to delete the origional file when its done and thats me happy for the day

  17. #14
    jamesfed's Avatar
    Join Date
    Sep 2009
    Location
    Reading
    Posts
    2,185
    Thank Post
    133
    Thanked 340 Times in 287 Posts
    Rep Power
    84
    Last thing to do now is to get it to delete the origional file when its done and thats me happy for the day
    Which was indeed just call the del command for %1

    Wow this project has worked out better than expected!
    Time to do a little testing and then I'll mash together a How to

  18. #15

    plexer's Avatar
    Join Date
    Dec 2005
    Location
    Norfolk
    Posts
    13,272
    Thank Post
    613
    Thanked 1,567 Times in 1,407 Posts
    Rep Power
    412
    How about reading the owner of the original creator of the file then having the server dump the converted movie in the home folder and then delete the original?

    Ben

SHARE:
+ Post New Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. Adobe Premier video rendering issue
    By d-taylor in forum Educational Software
    Replies: 11
    Last Post: 14th March 2012, 08:13 PM
  2. OWA 2007 Rendering Problem
    By Dos_Box in forum Windows Server 2008
    Replies: 21
    Last Post: 20th February 2009, 09:01 AM
  3. Mac not rendering properly
    By powdarrmonkey in forum Web Development
    Replies: 3
    Last Post: 15th October 2008, 11:26 AM
  4. Website rendering problem
    By beeswax in forum Web Development
    Replies: 4
    Last Post: 23rd May 2007, 09:22 AM
  5. Firefox not rendering same as IE
    By SimpleSi in forum Web Development
    Replies: 5
    Last Post: 16th December 2006, 05:39 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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