FORUMS
Remove All Ads from XDA

rtmpdump 2.0 for Android

870 posts
Thanks Meter: 264
 
By highlandsun, Inactive Recognized Developer on 20th December 2009, 07:35 AM
Post Reply Email Thread
Just for grins I've compiled the latest rtmpdump source using the Android 1.5 SDK. I guess it's not much use yet since we still don't have good playback of FLV files, but maybe someone here will find a good use for it.

The source code is from http://rtmpdump.mplayerhq.hu/ This is from the 2.0 C code, not the 1.x C++ code, so it's smaller and faster...
Attached Files
File Type: zip rtmpdump.zip - [Click for QR Code] (77.1 KB, 840 views)
The Following User Says Thank You to highlandsun For This Useful Post: [ View ] Gift highlandsun Ad-Free
 
 
20th December 2009, 08:11 AM |#2  
OP Inactive Recognized Developer
Flag Los Angeles
Thanks Meter: 264
 
Donate to Me
More
I just tried the latest yxflash. I got nothing at all from an H264 video downloaded from Hulu, and I got audio only for a VP6 video. (I tried a Buck Rogers episode since the video is only 384x288. Current shows on Hulu in wide format are 512x288 which wouldn't display on the 480x320 screen anyway.)

So, do the 2.0 ROMs have more video codecs supported? I know that 1.x can playback H.264 baseline profile videos, but Hulu is using H.264 main profile, so it's no surprise that it didn't play on my 1.5 ROM.
31st December 2009, 07:35 PM |#3  
OP Inactive Recognized Developer
Flag Los Angeles
Thanks Meter: 264
 
Donate to Me
More
rtmpdump-2.1.zip
This is a fresh build of rtmpdump 2.1. Read the README for details. It contains 4 programs:

rtmpdump - the client
rtmpsrv - a stub server, used mainly for displaying what other clients are doing
rtmpsuck - a transparent proxy, used to intercept a client stream and save it to disk while relaying to the client
streams - an HTTP gateway, serves RTMP streams via HTTP
Attached Files
File Type: zip rtmpdump-2.1.zip - [Click for QR Code] (174.2 KB, 708 views)
The Following User Says Thank You to highlandsun For This Useful Post: [ View ] Gift highlandsun Ad-Free
5th January 2010, 09:28 AM |#4  
OP Inactive Recognized Developer
Flag Los Angeles
Thanks Meter: 264
 
Donate to Me
More
So it seems there's not much interest here. It would probably help if someone were to port some more codecs into the OpenCore source tree. I've started looking into building ffmpeg on Android, but just compiling the C code probably isn't going to be very useful either. Without GPU acceleration I suspect a lot of these codecs will perform too poorly to be watchable. Is anybody in here working on these codecs?
5th January 2010, 03:37 PM |#5  
senab's Avatar
Senior Member
Flag London, UK
Thanks Meter: 32
 
Donate to Me
More
http://gitorious.org/~olvaffe/ffmpeg/ffmpeg-android
http://gitorious.org/~olvaffe/libsws...wscale-android

Looks like work has stopped on it though. I'm not a C programmer therefore can't really help, otherwise this would interest me.
6th January 2010, 11:23 PM |#6  
OP Inactive Recognized Developer
Flag Los Angeles
Thanks Meter: 264
 
Donate to Me
More
Thanks for the tip. Yeah, seems a bit out of date, too bad. I wonder if any of their work got merged upstream already...
9th January 2010, 05:50 PM |#7  
OP Inactive Recognized Developer
Flag Los Angeles
Thanks Meter: 264
 
Donate to Me
More
Hmm. This Archos 5 media player is now running Android 1.5

http://www.theinquirer.net/inquirer/...nternet-tablet

it seems to have a full complement of video codecs. I wonder where their code is. Of course, they're running on an 800MHz Cortex A8 so they've got a lot more horsepower to work with. Feels like it's time to retire the G1 and get something else. Maybe a GSM version of the Motorola Droid.
16th May 2010, 05:06 PM |#8  
OP Inactive Recognized Developer
Flag Los Angeles
Thanks Meter: 264
 
Donate to Me
More
I've taken a different tack now. Since Android has a built in RTSP client already, I'm using ffmpeg on a remote machine to transcode the FLV to an MP4 that Android can play. This is fed to a DarwinStreamingServer and I just use Meridian to play it.

Now that ffmpeg supports rtmpdump's library, ffmpeg can do all the work in one shot. I've attached the perl script I use to grab a H,u,l,u stream and republish it on the server. ffmpeg grabs the stream using rtmp and re-encodes it and pushes it to DSS. Once the encoding begins you can use Meridian to open the rtsp URL.

T-Mobile's 3G network seems to handle a 400-500kbit/sec stream here in Los Angeles, but it's not consistent. Sometimes it hits a glitch and doesn't recover, sometimes the audio continues but the video stream gets lost and doesn't come back. So probably it's safer to use a smaller bit rate.

Note that H,u,l,u uses 3 different CDNs - Akamai, Level3, and Limeworks. Currently this script doesn't support Limeworks. Basically what it does is grab the lowest bitrate H264 stream from H,u,l,u (usually a 400kbps 512x288 stream) and re-encode it to 480x270. To use it, just run "h,u,l,u,p,u,b <h,u,l,u URL>". You'll need a recent SVN version of ffmpeg built with --enable-librtmp to be able to use it. And of course you'll also need DarwinStreamingServer. I haven't been able to make ffserver work yet.

If you're connected on a decent network with wifi you should have no trouble playing the full 400-500kbit rates. On 3G you might want to stick to 200 or so.

I haven't figured out where to go next with this. Right now I'm thinking about modifying this script so it can be run as a CGI. Then you just use the web browser to navigate the h,u,l,u web site in one window; when you get to a program you want you copy its link and paste it into a form on another window that invokes this script and returns an rtsp link as the result. Then click on the rtsp link and the media player will open it.
Attached Files
File Type: txt hulupub.txt - [Click for QR Code] (12.5 KB, 803 views)
17th May 2010, 12:30 PM |#9  
OP Inactive Recognized Developer
Flag Los Angeles
Thanks Meter: 264
 
Donate to Me
More
Ah hah, after a lot of poking and prodding I managed to fix ffmpeg's ffserver, so now it can be used to stream live media over RTSP to Android phones too.
The required patches are here

https://lists.mplayerhq.hu/pipermail...ay/088706.html

So no more need for Darwin Streaming Server to get this job done.

Note - as far as I can tell, streaming from files is still broken, and I haven't looked into it. All I've tested is to see that ffmpeg can stream an RTMPE session to ffserver, which can then stream it out over RTSP.
22nd May 2010, 10:02 AM |#10  
OP Inactive Recognized Developer
Flag Los Angeles
Thanks Meter: 264
 
Donate to Me
More
An even better solution, running ffserver on the phone, so that the stream can be transferred using TCP instead of UDP. It may freeze during play due to network issues, but it will resume again instead of just losing packets.

See this message for the necessary config files...

https://lists.mplayerhq.hu/pipermail...ay/089049.html
Attached Files
File Type: zip ffserver.zip - [Click for QR Code] (420.4 KB, 251 views)
8th June 2010, 06:16 AM |#11  
mrono's Avatar
Senior Member
Thanks Meter: 4
 
Donate to Me
More
Any chance of giving a walkthrough or a short guide on how to get this thing working?
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes