View previous topic :: View next topic |
Author |
Message |
pmatos Veteran
Joined: 06 Jun 2003 Posts: 1246 Location: Eckental, Germany
|
Posted: Sat Nov 01, 2003 2:28 pm Post subject: Ripping Real Player movies |
|
|
Hi all,
I have access online to some real player movies that are streamed to me whenever I wish but I'd like to have them on my local disk in an avi, mpeg, whatever. Is there a way to rip these movies?
Best regards, _________________ Paulo Matos |
|
Back to top |
|
|
steveb Advocate
Joined: 18 Sep 2002 Posts: 4564
|
Posted: Sat Nov 01, 2003 2:41 pm Post subject: |
|
|
i never did that with real player files, but for other streaming media i used mplayer and used the flags: -dumpstream -dumpfile
cheers
SteveB |
|
Back to top |
|
|
pmatos Veteran
Joined: 06 Jun 2003 Posts: 1246 Location: Eckental, Germany
|
Posted: Sat Nov 01, 2003 3:37 pm Post subject: |
|
|
Hi, I tried a combination of options like the ones your mention but I'm out of luck. Somehow, mplayer just exits. Can't understand why.
Code: | pmatos@euler pmatos $ mplayer -softsleep -cache 1024 -dumpaudio -dumpvideo -dumpstream http://18.39.0.144:8080/ramgen/18.06/strang-1806-lec01-26aug1999-220k.rm
MPlayer 1.0pre2-3.3.1 (C) 2000-2003 MPlayer Team
CPU: Intel Pentium 4/Xeon/Celeron Northwood 2194 MHz (Family: 8, Stepping: 7)
Detected cache-line size is 64 bytes
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2
Reading config file /usr/share/mplayer/mplayer.conf
Reading config file /home/pmatos/.mplayer/config
Reading /home/pmatos/.mplayer/codecs.conf: Can't open '/home/pmatos/.mplayer/codecs.conf': No such file or directory
Reading /usr/share/mplayer/codecs.conf: 61 audio & 157 video codecs
font: can't open file: /home/pmatos/.mplayer/font/font.desc
Font /usr/share/mplayer/font/font.desc loaded successfully! (206 chars)
Failed to open /dev/rtc: Permission denied (mplayer should be setuid root or /dev/rtc should be readable by the user.)
Using software timing
Can't open input config file /home/pmatos/.mplayer/input.conf: No such file or directory
Input config file /usr/share/mplayer/input.conf parsed: 52 binds
Setting up LIRC support...
mplayer: could not connect to socket
mplayer: Permission denied
Failed to open LIRC support.
You will not be able to use your remote control.
Playing http://18.39.0.144:8080/ramgen/18.06/strang-1806-lec01-26aug1999-220k.rmFailed to create AF_INET6 socket:
Connecting to server 18.39.0.144[18.39.0.144]:8080 ...
Cache size set to 1024 KBytes
Connected to server: 18.39.0.144
Stream not seekable!
Core dumped ;)
Exiting... (End of file) |
steveb wrote: | i never did that with real player files, but for other streaming media i used mplayer and used the flags: -dumpstream -dumpfile
cheers
SteveB |
_________________ Paulo Matos |
|
Back to top |
|
|
triad Apprentice
Joined: 10 Jul 2003 Posts: 234 Location: Dark Side of the Moon
|
Posted: Sat Nov 01, 2003 4:42 pm Post subject: |
|
|
This should work for you.
Code: | mencoder -ovc lavc -lavcopts vcodec=mpeg4 -oac mp3lame -o name_of_file_u_want_to_save_as.avi http://url.to.streaming.video |
*Note it shows wrapped above but this is all one line.
This requires Mplayer and that Mplayer was emerged after realplayer was or you configured Mplayer to use RealPlayer codecs.
This works for me. Hope this helps you.
triad _________________ It's not the size of your processor that matters... But how you use it! |
|
Back to top |
|
|
pmatos Veteran
Joined: 06 Jun 2003 Posts: 1246 Location: Eckental, Germany
|
Posted: Sat Nov 01, 2003 10:18 pm Post subject: |
|
|
I get:
Code: |
pmatos@euler pmatos $ mencoder -ovc lavc -lavcopts vcodec=mpeg4 -oac mp3lame -o Strang-Lecture1.avi http://18.39.0.144:8080/ramgen/18.06/strang-1806-lec01-26aug1999-220k.rm
MEncoder 1.0pre2-3.3.1 (C) 2000-2003 MPlayer Team
CPU: Intel Pentium 4/Xeon/Celeron Northwood 2472 MHz (Family: 8, Stepping: 7)
Detected cache-line size is 64 bytes
CPUflags: Type: 8 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2
Reading /home/pmatos/.mplayer/codecs.conf: Can't open '/home/pmatos/.mplayer/codecs.conf': No such file or directory
Reading /usr/share/mplayer/codecs.conf: 61 audio & 157 video codecs
File not found: 'frameno.avi'
Failed to open frameno.avi
Reading config file /home/pmatos/.mplayer/mencoder: No such file or directory
Failed to create AF_INET6 socket:
Connecting to server 18.39.0.144[18.39.0.144]:8080 ...
Cache size set to 320 KBytes
Connected to server: 18.39.0.144
success: format: 11 data: 0x0 - 0x0
============ Sorry, this file format is not recognized/supported =============
=== If this file is an AVI, ASF or MPEG stream, please contact the author! ===
Cannot open demuxer.
Exiting... |
Should I reemerge realplayer?
Best regards,
Paulo Matos
triad wrote: | This should work for you.
Code: | mencoder -ovc lavc -lavcopts vcodec=mpeg4 -oac mp3lame -o name_of_file_u_want_to_save_as.avi http://url.to.streaming.video |
*Note it shows wrapped above but this is all one line.
This requires Mplayer and that Mplayer was emerged after realplayer was or you configured Mplayer to use RealPlayer codecs.
This works for me. Hope this helps you.
triad |
_________________ Paulo Matos |
|
Back to top |
|
|
triad Apprentice
Joined: 10 Jul 2003 Posts: 234 Location: Dark Side of the Moon
|
Posted: Sun Nov 02, 2003 2:37 am Post subject: |
|
|
For some reason or another (dont ask me why ) mplayer doesnt like some .rm file so what I do is try to determine the rtsp stream for the .rm file and feed that into mplayer/mencoder. so using your link I did this:
Code: | wget http://18.39.0.144:8080/ramgen/18.06/strang-1806-lec01-26aug1999-220k.rm
|
This downloaded a file called strang-1806-lec01-26aug1999-220k.rm
then I did
Code: | nano -w strang-1806-lec01-26aug1999-220k.rm |
this gives me this:
so then I just took this and verified it would play:
Code: |
mplayer rtsp://18.39.0.144:554/18.06/strang-1806-lec01-26aug1999-220k.rm?cloakport=8080,554,7070
|
It worked
So then just did this using mencoder:
Code: |
mencoder -ovc lavc -lavcopts vcodec=mpeg4 -oac mp3lame -o Strang-Lecture1.avi rtsp://18.39.0.144:554/18.06/strang-1806-lec01-26aug1999-220k.rm?cloakport=8080,554,7070
|
Got me an .avi file.
Hope this helps.
Triad
P.S. Watched the lecture. good topic. Linear Algebra. _________________ It's not the size of your processor that matters... But how you use it! |
|
Back to top |
|
|
hiroki Guru
Joined: 29 Jul 2003 Posts: 327 Location: @home in germany
|
Posted: Sat Mar 06, 2004 10:22 pm Post subject: |
|
|
hi!
is there a way of accelerating the ripping process?
the command mentioned above need exactly the same time as if you would watch the movie. isn't there a possibility to rip faster than the video is? so it would i.e. not take one hour for a movie of 1 hour duration, but f.i. half an hour.... ?
i am asking because i need to rip a couple of movies with each about 1.5 hours duration. the total amount is about 10 movies. so... i don't want it to take so long
any solutions?
thanks,
hiroki |
|
Back to top |
|
|
teknomage1 Veteran
Joined: 05 Aug 2003 Posts: 1239 Location: Los Angeles, CA
|
Posted: Sun Mar 07, 2004 4:45 am Post subject: |
|
|
you can't speed it up because you have to pretend you're watching the movie as far as the stream server is concerned. The whole point of them making it a realplayer stream is so that you [b] can't [\b] steal the file. You've beaten them but that's about as much as you can do. |
|
Back to top |
|
|
hiroki Guru
Joined: 29 Jul 2003 Posts: 327 Location: @home in germany
|
Posted: Sun Mar 07, 2004 7:59 pm Post subject: |
|
|
yes.. i already thought so.. but i thought too, there was possibly a way to "watch" 2 parts of the movie simultaneously, so you could load with the double speed
for example thread 1 downloads from 0 sec to 30 min, the second from 30 min to 60 min.. ...
this would be worth coding a program
any volunteers?
hiroki |
|
Back to top |
|
|
pmatos Veteran
Joined: 06 Jun 2003 Posts: 1246 Location: Eckental, Germany
|
Posted: Sun Mar 07, 2004 8:54 pm Post subject: |
|
|
hiroki wrote: | yes.. i already thought so.. but i thought too, there was possibly a way to "watch" 2 parts of the movie simultaneously, so you could load with the double speed
for example thread 1 downloads from 0 sec to 30 min, the second from 30 min to 60 min.. ...
this would be worth coding a program
any volunteers?
hiroki |
That seems to be quite trivial, however, it is not due to the fact that after having the 30 seconds pieces one needs to concatenate these files correctly. And after all, this is not a trivial concatenation since we needed to build a 'parser' for the resulting file type so that it could concatenate the pieces. However, it becomes trivial if there is already a command line program that given file1 file2 file3 file4 with avi extension for example, concatenates all these files into another one.
Cheers, _________________ Paulo Matos |
|
Back to top |
|
|
MighMoS Guru
Joined: 24 Apr 2003 Posts: 416 Location: @ ~
|
Posted: Sun Mar 07, 2004 10:31 pm Post subject: |
|
|
Wow! This thread is really helpful...it should be a tip of the week or something! _________________ jabber: MighMoS@jabber.org
localhost # export HOME=`which heart` |
|
Back to top |
|
|
hiroki Guru
Joined: 29 Jul 2003 Posts: 327 Location: @home in germany
|
Posted: Sun Mar 07, 2004 10:56 pm Post subject: |
|
|
SO, here is a python-script I used to download several RealMedia movies. You still have to download the .rm file by yourself (just save link target as...), put them all in a directory, and then call this script.
it worked for me, no guarantee that it will always work.
Code: |
#!/usr/bin/env python
import glob, time, os
if __name__ == "__main__":
log = open("realcap.log", 'w')
encoder = "mencoder -ovc lavc -lavcopts vcodec=mpeg4 -oac mp3lame -o %s %s"
filelist = glob.glob("*.rm")
urllist = []
print "The following RealMedia files were found:"
print " ".join(filelist), "\n"
print time.ctime(), "\tStarted capturing of %d RealMedia files" % len(filelist)
print >> log, time.ctime(), "\tStarted capturing of %d RealMedia files" % len(filelist)
for file in filelist:
f = open(file, 'r')
url = []
for x in f.readlines():
if x.strip().startswith("rtsp://"):
url += [x]
urllist += url
f.close()
print "".join(urllist)
for url in urllist:
url = url.replace("\r\n", "")
filename = url.split("?")[0]
filename = "cap_" + filename[filename.rfind("/")+1:] + ".avi"
command = encoder % (filename, url)
print "Fetching RealVideo Stream from:", url
print time.ctime(), "\tCapturing", filename, "started"
print >> log, time.ctime(), "\tCapturing", filename, "started"
os.system(command)
print >> log, time.ctime(), "\tCapturing", filename, "finished"
print time.ctime(), "\tCapturing", filename, "finished"
print >> log, time.ctime(), "\tFinished capture process"
print time.ctime(), "\tFinished capture process"
log.close()
|
so, enjoy
hiroki
PS: I still don't think that anyone else will have a use for this, but as I used it, maybe someone else will someday... maybe... under some circumstances, also make use of this py-script
PS2: OK, well, I could habe written it that way, so it is not necessary to be in the directory where the rm-files are, yes I could have implemented a feaure to download the files to another directory.. yes, maybe I could even have been able to implement it that way, that you just pass an URL for a HTMLpage containing the rm-links and then automatically download all movies.. yeah yeah yeah, but I didn't!
I just implemented the functionality I needed... not more...
PS3: of cource "if __name__" if not necessary.. but as i started writing the program i did not know whether i would write it as functions or not...
maybe it would still be a good idea as function.. so it can be reused.. |
|
Back to top |
|
|
MighMoS Guru
Joined: 24 Apr 2003 Posts: 416 Location: @ ~
|
Posted: Sun Mar 07, 2004 11:19 pm Post subject: |
|
|
General question: is there a way to get the bitrate of the rm file, then encode in that bitrate? I recoded a movie whose file size literally doubled from 16 to 32 MB. _________________ jabber: MighMoS@jabber.org
localhost # export HOME=`which heart` |
|
Back to top |
|
|
Souperman Guru
Joined: 14 Jul 2003 Posts: 449 Location: Cape Town, South Africa
|
Posted: Tue Apr 13, 2004 8:32 pm Post subject: |
|
|
triad wrote: | This should work for you.
Code: | mencoder -ovc lavc -lavcopts vcodec=mpeg4 -oac mp3lame -o name_of_file_u_want_to_save_as.avi http://url.to.streaming.video |
*Note it shows wrapped above but this is all one line.
This requires Mplayer and that Mplayer was emerged after realplayer was or you configured Mplayer to use RealPlayer codecs.
This works for me. Hope this helps you.
triad |
Seems to work OK, I just have two issues with it...
Code: |
MEncoder 0.92-3.3.2 (C) 2000-2003 MPlayer Team
CPU: Advanced Micro Devices (Family: 6, Stepping: 0)
Detected cache-line size is 64 bytes
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Reading /home/graeme/.mplayer/codecs.conf: can't open '/home/graeme/.mplayer/codecs.conf': No such file or directory
Reading /usr/share/mplayer/codecs.conf: 50 audio & 136 video codecs
File not found: 'frameno.avi'
Reading config file /home/graeme/.mplayer/mencoder: No such file or directory
success: format: 0 data: 0x0 - 0x22F70C7
REAL file format detected.
skip_str: 12 bytes skipped
skip_str: 20 bytes skipped
======= WAVE Format =======
Format Tag: 28515 (0x6F63)
Channels: 2
Samplerate: 22050
avg byte/sec: 32460
Block align: 564
bits/sample: 16
cbSize: 18
Unknown extra header dump: [5e] [0] [e] [0] [a] [0] [34] [2] [8] [0] [1] [0] [0] [2] [4] [0] [0] [12]
skip_str: 12 bytes skipped
skip_str: 20 bytes skipped
VIDEO: RV20 [20100001,00008838] 320x240 (aspect 0.00) 25.00 fps
[V] filefmt:11 fourcc:0x30325652 size:320x240 fps:25.00 ftime:=0.0400
==========================================================================
Opening audio decoder: [realaud] RealAudio decoder
opening shared obj '/opt/RealPlayer9/Real/Codecs/cook.so.6.0'
Audio codec: [10] 32 Kbps Stereo Music
Audio bitrate: 32.386 kbit/s (4048 bps)
AUDIO: 22050 Hz, 2 ch, 16 bit (0x10), ratio: 4048->88200 (32.4 kbit)
Selected audio codec: [racook] afm:realaud (RealAudio COOK)
==========================================================================
Opening video filter: [expand=-1:-1:-1:-1:1]
Expand: -1 x -1, -1 ; -1 (-1=autodetect) osd: 1
==========================================================================
Opening video decoder: [realvid] RealVideo decoder
opening shared obj '/opt/RealPlayer9/Real/Codecs/drv2.so.6.0'
Selected video codec: [rv20] vfm:realvid (Linux RealPlayer 8 RV20 decoder)
==========================================================================
MP3 audio selected
Building audio filter chain for 22050Hz/2ch/16bit -> 22050Hz/2ch/16bit...
Writing AVI header...
VDec: vo config request - 320 x 240 (preferred csp: Planar I420)
VDec: using Planar I420 as output csp (no 0)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
New_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
videocodec: libavcodec (320x240 fourcc=58564944 [DIVX])
Pos: 0.0s 1f ( 0%) 0fps Trem: 0min 0mb A-V:0.000 [0:0]
Pos: 0.1s 2f ( 0%) 0fps Trem: 0min 14mb A-V:0.004 [0:0]
Pos: 0.1s 3f ( 0%) 0fps Trem: 0min 16mb A-V:0.008 [0:0]
Pos: 0.2s 4f ( 0%) 0fps Trem: 1min 17mb A-V:0.012 [0:0]
Pos: 0.2s 5f ( 0%) 0fps Trem: 1min 17mb A-V:0.016 [0:0]
Pos: 0.2s 6f ( 0%) 0fps Trem: 1min 17mb A-V:0.020 [0:0]
3 duplicate frame(s)!
Pos: 0.4s 7f ( 0%) 0fps Trem: 1min 18mb A-V:0.024 [0:0]
Pos: 0.4s 8f ( 0%) 0fps Trem: 1min 18mb A-V:0.028 [0:0]
1 duplicate frame(s)!
...
|
See where it says "duplicate frames"? Well it says it all the time for just about every frame. When I view the AVI, the video seems to freeze every few seconds. Is it because it's dropping frames along the way, or what causes this?
The second problem is that the audio and the video is out of sync in the first minute of the AVI. The video lags behind the audio by about 1 or 2 seconds, but after about a minute they're in sync.
If it makes any difference, I'm not streaming the input file (using .rm files already saved on my disk). _________________ moo |
|
Back to top |
|
|
4nykey Apprentice
Joined: 11 Feb 2004 Posts: 176
|
|
Back to top |
|
|
hobbes27 Tux's lil' helper
Joined: 11 Apr 2003 Posts: 87 Location: Germany
|
Posted: Tue Apr 13, 2004 10:01 pm Post subject: |
|
|
hiroki wrote: | SO, here is a python-script I used to download several RealMedia movies. |
This is great!
I wasted a lot of time today trying to let vlc do this job. |
|
Back to top |
|
|
Gentree Watchman
Joined: 01 Jul 2003 Posts: 5350 Location: France, Old Europe
|
Posted: Tue Apr 13, 2004 10:58 pm Post subject: |
|
|
hiroki wrote: | yes.. i already thought so.. but i thought too, there was possibly a way to "watch" 2 parts of the movie simultaneously, so you could load with the double speed
for example thread 1 downloads from 0 sec to 30 min, the second from 30 min to 60 min.. ...
this would be worth coding a program
any volunteers?
hiroki |
If you have a bout 10 movies to do you could load several at a time to take advantage of your bandwidth without complicating life and taking 15 hours to do the job.
Just keep well within your b/w otherwise you'll loose frames.
HTH. |
|
Back to top |
|
|
Garak128 Tux's lil' helper
Joined: 12 Mar 2004 Posts: 93
|
Posted: Tue Apr 13, 2004 11:35 pm Post subject: |
|
|
Cool.
There is a windows app to do this too. Streambox VCR.
It also has a hack to let you download at full speed, ignoring the bitrates. Doesn't work on all servers, but most. Needs some cracks and stuff, but its easily gotten off google. |
|
Back to top |
|
|
|