ERROR: rtmpdump exited with code 1 #12

Closed
opened 2026-02-20 20:59:34 -05:00 by deekerman · 18 comments
Owner

Originally created by @rg3 on GitHub (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.

Originally created by @rg3 on GitHub (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.
deekerman 2026-02-20 20:59:34 -05:00
Author
Owner

@rg3 commented on GitHub (Nov 1, 2010):

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

@rg3 commented on GitHub (Nov 1, 2010): Thanks for reporting the issue. An example is needed, though.
Author
Owner

@rg3 commented on GitHub (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 commented on GitHub (Nov 1, 2010): Originally by anonymous: If you want an example video then it fails with this: http://www.youtube.com/watch?v=ULtNWlvI3Uc
Author
Owner

@rg3 commented on GitHub (Nov 1, 2010):

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

@rg3 commented on GitHub (Nov 1, 2010): I get "this video is not available" when I visit YouTube's webpage.
Author
Owner

@rg3 commented on GitHub (Nov 1, 2010):

Originally by anonymous:

Oh, right, that video is UK only.

@rg3 commented on GitHub (Nov 1, 2010): Originally by anonymous: Oh, right, that video is UK only.
Author
Owner

@rg3 commented on GitHub (Nov 1, 2010):

Originally by anonymous:

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

@rg3 commented on GitHub (Nov 1, 2010): Originally by anonymous: I am the original submitter and the video I was referring to was UK only also.
Author
Owner

@Jamie-Landeg-Jones commented on GitHub (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
    
@Jamie-Landeg-Jones commented on GitHub (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
Author
Owner

@rg3 commented on GitHub (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.

@rg3 commented on GitHub (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.
Author
Owner

@Jamie-Landeg-Jones commented on GitHub (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 commented on GitHub (Nov 16, 2010): Ok, I'll do that, but give me time I'm new to github - only signed up for this post!
Author
Owner

@Jamie-Landeg-Jones commented on GitHub (Nov 16, 2010):

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

cheers,
jamie

@Jamie-Landeg-Jones commented on GitHub (Nov 16, 2010): ok, I've done it, let me know if i've done it correctly or not! cheers, jamie
Author
Owner

@Jamie-Landeg-Jones commented on GitHub (Nov 17, 2010):

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

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.

@Jamie-Landeg-Jones commented on GitHub (Nov 17, 2010): Correctly parse the player URL in RTMP downloads (closed by b620a5f811d94a0296a9809391e3a121ad8d68e9) 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.
Author
Owner

@rg3 commented on GitHub (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!

@rg3 commented on GitHub (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!
Author
Owner

@Jamie-Landeg-Jones commented on GitHub (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

@Jamie-Landeg-Jones commented on GitHub (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
Author
Owner

@feranick commented on GitHub (Jan 7, 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)

@feranick commented on GitHub (Jan 7, 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)
Author
Owner

@phihag commented on GitHub (Jan 7, 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.

@phihag commented on GitHub (Jan 7, 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](http://lists.mplayerhq.hu/pipermail/rtmpdump/attachments/20110908/2a239630/attachment.bin).
Author
Owner

@feranick commented on GitHub (Jan 7, 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:
https://github.com/rg3/youtube-dl/issues/11#issuecomment-3399476

@feranick commented on GitHub (Jan 7, 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](http://lists.mplayerhq.hu/pipermail/rtmpdump/attachments/20110908/2a239630/attachment.bin). > > --- > > Reply to this email directly or view it on GitHub: > https://github.com/rg3/youtube-dl/issues/11#issuecomment-3399476
Author
Owner

@rbrito commented on GitHub (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.

@rbrito commented on GitHub (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.
Author
Owner

@HamedMP commented on GitHub (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

@HamedMP commented on GitHub (Jun 27, 2013): I have the same problem and I don't have any other idea to solve it!! :-1: ![screenshot from 2013-06-27 19 04 25](https://f.cloud.github.com/assets/3755031/716278/9af7b76a-df32-11e2-8282-c6256cf87da8.png)
Author
Owner

@jaimeMF commented on GitHub (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

@jaimeMF commented on GitHub (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 in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/youtube-dl#12
No description provided.