View Single Post
  #72  
Old 10-02-2011, 07:44 PM
daMichael daMichael is offline
Junior Member
 
Join Date: Aug 2011
Posts: 10
daMichael is on a distinguished road
Default

Re: Recording Kelby Training (www.Kelbytraining.com) videos by Kelby Media Group


Using RTMPdump 2.4, the Media RSS playlist mentioned before (hint: view source), and the HTA code below, the whole process is pretty easy. The code can be cleaned up a bit. There is an option to rename the files on save. Windows tested only.

Code:
<head>
<title>Kelby RIP</title>
<HTA:APPLICATION 
     APPLICATIONNAME="Kelby RIP"
     SCROLL="yes"
     SINGLEINSTANCE="yes"
     CAPTION="yes"
>
</head>

<script language="VBScript">
sub DoResize
    'resize   
    window.resizeTo 700,800
    screenWidth = Document.ParentWindow.Screen.AvailWidth
    screenHeight = Document.ParentWindow.Screen.AvailHeight
    posLeft = (screenWidth - 700) / 2
    posTop = 10     
    'move to centerscreen
    window.moveTo posLeft, posTop
  end sub

DoResize()

Sub numberboxes
    Dim i,n
    Dim count : count = number.value
    yes_rename.checked=false

    for i=1 to count
       n= "<input type=" & Chr(34) & "text" & Chr(34) & " name=" & Chr(34) & "filemp4" & Chr(34) & " size=" & Chr(34) & "32 " & Chr(34) & " value=" & Chr(34) & Chr(34) & "> <br>" + n
    next

    filenames.innerhtml="Kelby Filename:<br>"+ n
End Sub

Sub rename_numberboxes
    Dim i,n
    Dim count : count = number.value
    no_rename.checked=false    
    
    for i=1 to count
       n= "<input type="& Chr(34)&"text"& Chr(34)&" name="& Chr(34)&"filemp4" & Chr(34)&" size="& Chr(34)&"32"& Chr(34)&" value="& Chr(34)& Chr(34)&"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="& Chr(34)&"text"& Chr(34)&" name="& Chr(34)&"re_filemp4" & Chr(34)&" size="& Chr(34)&"32"& Chr(34)&" value="& Chr(34)&count-i+1 & "  .mp4" & Chr(34)&"><br>" + n
    next
    filenames.innerhtml="Kelby Filename:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Rename to:<br>"+ n
End Sub


Sub ExitHTA
    self.close()
End Sub

Sub clear_form
    filenames.innerhtml=""
    no_rename.checked=false
    yes_rename.checked=false
    callingurl.value=""
    number.value=10
End Sub

Sub rip_files
    If no_rename.checked Then 
         rip_no_rename 
         Exit Sub 
    End If
    rip_rename
End Sub

Sub rip_no_rename
    Dim objShell : Set objShell = CreateObject("WScript.Shell")
    Dim i,CMD,CMD1,CMD2,CMD3, strFilemp4
    Dim count : count = number.value

     CMD1 = "rtmpdump -r "& Chr(34) & "rtmpe://mbrstream.kelbymediagroup.com/ondemand/encoding"& Chr(34)
     CMD1 = CMD1 & " -a "& Chr(34) & "ondemand/encoding"& Chr(34)
     CMD1 = CMD1 & " -f "& Chr(34) & "WIN 10,0,45,2"& Chr(34)
     CMD1 = CMD1 & " -W "& Chr(34) & "http://media.kelbymediagroup.com/players/player5.6/player.swf"& Chr(34)
     CMD1 = CMD1 & " -p "& Chr(34) & "http://kelbytraining.com/online/watch/" & callingurl.value & Chr(34)
     CMD1 = CMD1 & " -y "& Chr(34) & "mp4:"

    For i=1 to count

        CMD = CMD1 & filemp4(i-1).value & Chr(34) & " -o " & Chr(34) & filemp4(i-1).value & Chr(34)
       objShell.Run CMD,1,True

     Next
End Sub

Sub rip_rename
    Dim objShell : Set objShell = CreateObject("WScript.Shell")
    Dim i,CMD,CMD1,CMD2,CMD3, strFilemp4
    Dim count : count = number.value

     CMD1 = "rtmpdump -r "& Chr(34) & "rtmpe://mbrstream.kelbymediagroup.com/ondemand/encoding"& Chr(34)
     CMD1 = CMD1 & " -a "& Chr(34) & "ondemand/encoding"& Chr(34)
     CMD1 = CMD1 & " -f "& Chr(34) & "WIN 10,0,45,2"& Chr(34)
     CMD1 = CMD1 & " -W "& Chr(34) & "http://media.kelbymediagroup.com/players/player5.6/player.swf"& Chr(34)
     CMD1 = CMD1 & " -p "& Chr(34) & "http://kelbytraining.com/online/watch/" & callingurl.value & Chr(34)
     CMD1 = CMD1 & " -y "& Chr(34) & "mp4:"

    For i=1 to count

        CMD = CMD1 & filemp4(i-1).value & Chr(34) & " -o " & Chr(34) & re_filemp4(i-1).value & Chr(34)
       objShell.Run CMD,1,True
     Next
End Sub


</script>

<body>


kelbytraining.com/online/watch/
<input type="text" name="callingurl" size="24">
<BR>
Number of files:
<input type="text" name="number" size="2" value=10>
<br>
<input type="checkbox" name="no_rename" title="no rename" onclick="numberboxes">Do not rename with save <br>
<input type="checkbox" name="yes_rename" onClick="rename_numberboxes">Rename with save
<br><br>

<span id="filenames"></span>
<br><br>
<input type="button" value="RIP" name="ok_button"  onClick="rip_files">
<br><br>
<input type="button" value="Clear" name="clear_button"  onClick="clear_form"> 
<input type="button" value="Close" name="close_button"  onClick="ExitHTA">

</body>
Reply With Quote