View Single Post
  #3  
Old 02-21-2012, 04:27 PM
n.p. n.p. is offline
Junior Member
 
Join Date: Jan 2012
Posts: 8
n.p. is on a distinguished road
Default

Re: Trouble with a file


Read the suggested thread and learn that there are patches to the source code.
Go to the github mirror thinking that it will be easier to find the source code there.
Download the newest file.
Go to a search engine to figure out how to unpack a .7z file.
Learn that the p7zip package for my system comes with a bloated gui.
Download the source for the p7zip program and compile it.
Unpack the .7z file.
Unpack the official rtmpdump source code.
Attempt to apply the patch.
Notice that 21 hunks fail (about half of them).
Try think of an alternative to going through all of those hunks by hand.
Finally see the "Download as tar.gz" button prominently displayed in the middle of the github page.
Download and unpack the already patched source code.
Attempt to compile (fails with undefined references to sqrt, atan, and exp).
Back to the search engines to try to figure out what is going on.
Learn that I need to have -lm in my linker flags.
Try adding "-lm" to the command line (in XLDFLAGS), but that didn't work.
Edit the Makefile and add "-lm" to the end of the "LDFLAGS=-Wall $(XLDFLAGS)" line.
Successfully compile the patched rtmpdump.
Attempt to run the modified program (it keeps crashing after one and a half seconds).
Remember to LD_PRELOAD the modified librtmp.so, so it gets used instead of the system one.
Run the modified program.
See the stream restart every few seconds.
Remember (again) to add the -v flag.
Run the modified program again.
Learn that it stops at the same place as the unmodified program.

Code:
Connecting ...
INFO: Connected...
Starting Live Stream
INFO: Metadata:
INFO: trackinfo:
INFO:   timescale             48000.00
INFO:   length                210378752.00
INFO:   language              eng
INFO: sampledescription:
INFO:   sampletype            mp4a
INFO:   timescale             25.00
INFO:   length                109571.00
INFO:   language              eng
INFO: sampledescription:
INFO:   sampletype            avc1
INFO:   audiochannels         2.00
INFO:   audiosamplerate       48000.00
INFO:   videoframerate        25.00
INFO:   aacaot                2.00
INFO:   avclevel              30.00
INFO:   avcprofile            77.00
INFO:   audiocodecid          mp4a
INFO:   videocodecid          avc1
INFO:   width                 704.00
INFO:   height                396.00
INFO:   frameWidth            704.00
INFO:   frameHeight           396.00
INFO:   displayWidth          704.00
INFO:   displayHeight         396.00
INFO:   moovposition          616923165.00
INFO:   duration              4382.89
91078.496 kB / 658.45 sec (15.0%)
Caught signal: 13, cleaning up, just a second...
ERROR: WriteN, RTMP send error 32 (42 bytes)
ERROR: RTMP_ReadPacket, failed to read RTMP packet body. len: 14672
91117.962 kB / 658.79 sec (15.0%)
Download may be incomplete (downloaded about 15.00%), try resuming
Basically it stops in the same place (plus or minus two seconds) every time.
Reply With Quote