Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: rtmpdump exited with code 1 #11

Closed
rg3 opened this issue Nov 1, 2010 · 18 comments
Closed

ERROR: rtmpdump exited with code 1 #11

rg3 opened this issue Nov 1, 2010 · 18 comments
Labels
bug

Comments

@rg3
Copy link
Collaborator

@rg3 rg3 commented Nov 1, 2010

Was: http://bitbucket.org/rg3/youtube-dl/issue/173/

On any video with rtmpe youtube-dl correctly identifies:

[youtube] RTMP download detected

However the download will always stop at about the same place with:

[rtmpdump] 93716588 bytes ERROR: rtmpdump exited with code 1

Using option -c results in rtmpdump exiting immediately.

@rg3
Copy link
Collaborator Author

@rg3 rg3 commented Nov 1, 2010

Thanks for reporting the issue. An example is needed, though.

@rg3
Copy link
Collaborator Author

@rg3 rg3 commented Nov 1, 2010

Originally by anonymous:

If you want an example video then it fails with this: http://www.youtube.com/watch?v=ULtNWlvI3Uc

@rg3
Copy link
Collaborator Author

@rg3 rg3 commented Nov 1, 2010

I get "this video is not available" when I visit YouTube's webpage.

@rg3
Copy link
Collaborator Author

@rg3 rg3 commented Nov 1, 2010

Originally by anonymous:

Oh, right, that video is UK only.

@rg3
Copy link
Collaborator Author

@rg3 rg3 commented Nov 1, 2010

Originally by anonymous:

I am the original submitter and the video I was referring to was UK only also.

@Jamie-Landeg-Jones
Copy link

@Jamie-Landeg-Jones Jamie-Landeg-Jones commented Nov 16, 2010

I had the same problem, and have worked out a fix.

The parsing for the SWF url is wrong (the "//" are now escaped and the initial .*match needs to be 'ungreedy'), so the -W setting to rtmpdump is not set, causing the decryption of the video to be wrong.

I also suggest only setting "-q" to rtmpdump if "-q" is sent to youtube-dl

Here's a patch against 2010.10.24

--- youtube-dl.orig 2010-11-16 16:30:42.000000000 +0000
+++ youtube-dl 2010-11-16 16:30:54.000000000 +0000
@@ -493,7 +493,7 @@
# Download using rtmpdump. rtmpdump returns exit code 2 when
# the connection was interrumpted and resuming appears to be
# possible. This is part of rtmpdump's normal usage, AFAIK.

  •           basic_args = ['rtmpdump', '-q'] + [[], ['-W', player_url]][player_url is not None] + ['-r', url, '-o', filename]
    
  •           basic_args = ['rtmpdump'] + [[], ['-q']][self.params.get('quiet', False)] + [[], ['-W', player_url]][player_url is not None] + ['-r', url, '-o', filename]
            retval = subprocess.call(basic_args + [[], ['-e', '-k', '1']][self.params.get('continuedl', False)])
            while retval == 2 or retval == 1:
                    prevsize = os.path.getsize(filename)
    

    @@ -838,9 +838,9 @@
    return

            # Attempt to extract SWF player URL
    
  •           mobj = re.search(r'swfConfig._"(http://._?watch._?-._?.swf)"', video_webpage)
    
  •           mobj = re.search(r'swfConfig._?"(http:\/\/._?watch._?-._?.swf)"', video_webpage)
            if mobj is not None:
    
  •                   player_url = mobj.group(1)
    
  •                   player_url = re.sub(r'\(.)', r'\1', mobj.group(1))
            else:
                    player_url = None
    
@rg3
Copy link
Collaborator Author

@rg3 rg3 commented Nov 16, 2010

Thanks for working on this. The patch format is causing me some trouble. Could you simply fork the current repository, apply the patch and issue a pull request? That way would be much easier and we're on github.com after all.

Thanks in advance.

@Jamie-Landeg-Jones
Copy link

@Jamie-Landeg-Jones Jamie-Landeg-Jones commented Nov 16, 2010

Ok, I'll do that, but give me time I'm new to github - only signed up for this post!

@Jamie-Landeg-Jones
Copy link

@Jamie-Landeg-Jones Jamie-Landeg-Jones commented Nov 16, 2010

ok, I've done it, let me know if i've done it correctly or not!

cheers,
jamie

@Jamie-Landeg-Jones
Copy link

@Jamie-Landeg-Jones Jamie-Landeg-Jones commented Nov 17, 2010

Correctly parse the player URL in RTMP downloads (closed by b620a5f)

Fixed several problems courtesy of jamiejones:

The parsing for the SWF url was wrong (the "//" are now escaped and the
initial .*match needs to be 'ungreedy'), so the -W setting to rtmpdump
was not set, causing the decryption of the video to be wrong.

Finally, add "&has_verified=1" to the fetch of the HMTL page to
allow fetching of age-restricted videos.

@rg3
Copy link
Collaborator Author

@rg3 rg3 commented Nov 17, 2010

Hi,

Yes, you've done it correctly.

I just merged your changes, but rewrote history a little bit, so feel free to delete your master branch and fork again to fix other problems if you want. Why I rewrote history:

I combined both commits in one, as one was a fix for a mistake in the other commit. I also removed the part about the -q flag for rtmpdump. This is my choice, I prefer not to view the rtmpdump output and would like the program to always call it with -q. Also, I fixed the commit message to contain a header line and a further explanation, and I also wrapped the commit text at around 80 characters.

Please, feel free to submit any more fixes and specially about rtmp downloads. Most complaints about it seem to come from users in the UK and I can't reproduce the problem here.

Thanks again!

@Jamie-Landeg-Jones
Copy link

@Jamie-Landeg-Jones Jamie-Landeg-Jones commented Nov 18, 2010

No problem with the change.

And yes, I'll refork if I see any other changes.

Yes, a faulty commit.. I couldn't manage to get git locally to upload the changed files, so ended up editting the changes in again via the website!

Yes, 2 of the major TV channels in the UK offer all their content "on demand" via the youtube rtmp method, so it's a popular service here!

Thanks for the feedback,
cheers,
Jamie

@feranick
Copy link

@feranick feranick commented Jan 8, 2012

I use version 2012.01.05 from Macports and I have the issue of:

ERROR: rtmpdump exited with code 1

with movies at comedy central. For example this one:

http://www.thedailyshow.com/full-episodes/thu-january-5-2012-craig-shirley

I see the same problem both using the MacPorts version as well as using in with ubuntu (custom package)

@phihag phihag reopened this Jan 8, 2012
@phihag
Copy link
Contributor

@phihag phihag commented Jan 8, 2012

@feranick What version of rtmpdump are you using? Downloading :tds (or the mentioned longer URL ;) ) works fine on my machine, with rtmpdump 4e06e218e230a86608637b613499984703a342cf and this patch.

@feranick
Copy link

@feranick feranick commented Jan 8, 2012

The problem is both with version 2.3-2 and 2.4~20110711.gitc28f1bab-1 (the versions currently available in Ubuntu and Debian), which I recompiled on Ubuntu Oneiric and Lucid.

I'll test the patch, but without it, for sure, it's not working.

Date: Sat, 7 Jan 2012 16:53:26 -0800
From: reply@reply.github.com
To: feranick@hotmail.com
Subject: Re: [youtube-dl] ERROR: rtmpdump exited with code 1 (#11)

@feranick What version of rtmpdump are you using? Downloading :tds (or the mentioned longer URL ;) ) works fine on my machine, with rtmpdump 4e06e218e230a86608637b613499984703a342cf and this patch.


Reply to this email directly or view it on GitHub:
#11 (comment)

@rbrito
Copy link
Contributor

@rbrito rbrito commented Jan 8, 2012

I think that we can close this issue, as @feranick reported the issue on Debian bugtracker and I already reassigned the problem from youtube-dl to rtmpdump.

He told me on http://bugs.debian.org/655038#19 that now things work for him.

@HamedMP
Copy link

@HamedMP HamedMP commented Jun 27, 2013

I have the same problem and I don't have any other idea to solve it!! 👎
screenshot from 2013-06-27 19 04 25

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Jun 27, 2013

@HamedMP This seems to be a problem when installing rtmpdump, if it's a problem with youtube-dl open a new issue and paste the output when running youtube-dl with the option -v

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
7 participants
You can’t perform that action at this time.