ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
132.72k stars 10.07k forks source link

youtube-dl enigma2 rtmp links #6729

Open cupof opened 9 years ago

cupof commented 9 years ago
    youtube-dl

is this line hard coded in to youtube-dl binary

basic_args = [ 'rtmpdump', '--verbose', '-r', url,

i am using with enigma2 and piping to media player http works rtmp not work because --verbose is being passed on to the rtmpdump command

this rtmpdump command works

'rtmpdump', '-r', url,

can you compile a version of youtube-dl binary for enigma2 and stop the txt --verbose from being passed on to rtmpdump as that is stopping rtmp links from piping to media player in enigma2

thank you

yan12125 commented 9 years ago

Do you mean that rtmpdump with --verbose generates extra messages and those extra messages break enigma2? If so, you need to ask enigma2 developers to fix it.

cupof commented 9 years ago

no when youtube-dl sends the url to rtmpdump it writes --verbose in the rtmpdump command

its got nothing to with enigma2 code if i could edit the youtube-dl binary i could delete --verbose from youtube-dl

this is what is in your youtube-dl binary

basic_args = [ 'rtmpdump', '--verbose', '-r', url, which i cant edit

for rtmp links to work it needs to be like this

basic_args = [ 'rtmpdump', '-r', url,

with --verbose removed

jaimeMF commented 9 years ago

Could you explain with more detail why it doesn't work: exact commands you are using and the programs you use? In my case, piping to mpv works fine:

$ youtube-dl -v --ignore-config  'http://video.oilers.nhl.com/videocenter/console?id=691469&catid=4' -o - | mpv -
Playing: -
[file] Reading from stdin...
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'--ignore-config', u'http://video.oilers.nhl.com/videocenter/console?id=691469&catid=4', u'-o', u'-']
[debug] Encodings: locale UTF-8, fs utf-8, out None, pref UTF-8
[debug] youtube-dl version 2015.08.28
[debug] Git HEAD: aabc2be
[debug] Python version 2.7.10 - Darwin-13.4.0-x86_64-i386-64bit
[debug] exe versions: avconv 11.4, avprobe 11.4, ffmpeg git-2015-08-28-53bf32f, ffprobe git-2015-08-28-53bf32f, rtmpdump 2.4
[debug] Proxy map: {}
[nhl.com] 691469: Downloading JSON metadata
[nhl.com] 691469: Extracting information
[nhl.com] 691469: Downloading final video url
[debug] Invoking downloader on 'rtmp://cdncon.fcod.llnwd.net/a277/e4/mp4:u/oilers/vod/flv/2014/12/05/691469_20141205_mact_sd.mp4?eid=690930&pid=691469&gid=3012&pt=1?eid=690930&pid=691469&gid=3012&pt=1&ip=<>&e=1441122589&h=0c7b5e450ba551962ccb3204a2c7af2b'
[download] Destination: -
[debug] rtmpdump command line: rtmpdump --verbose -r 'rtmp://cdncon.fcod.llnwd.net/a277/e4/mp4:u/oilers/vod/flv/2014/12/05/691469_20141205_mact_sd.mp4?eid=690930&pid=691469&gid=3012&pt=1?eid=690930&pid=691469&gid=3012&pt=1&ip=<>&e=1441122589&h=0c7b5e450ba551962ccb3204a2c7af2b' -o - --app a277/e4 --playpath 'mp4:u/oilers/vod/flv/2014/12/05/691469_20141205_mact_sd.mp4?eid=690930&pid=691469&gid=3012&pt=1?eid=690930&pid=691469&gid=3012&pt=1&ip=<>&e=1441122589&h=0c7b5e450ba551962ccb3204a2c7af2b' --tcUrl rtmp://cdncon.fcod.llnwd.net/a277/e4 --skip 1
[rtmpdump] RTMPDump v2.4
[rtmpdump] (c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
[rtmpdump] DEBUG: Parsing...
[rtmpdump] DEBUG: Parsed protocol: 0
[rtmpdump] DEBUG: Parsed host    : cdncon.fcod.llnwd.net
[rtmpdump] DEBUG: Parsed app     : a277/e4/mp4:u
[rtmpdump] DEBUG: Number of skipped key frames for resume: 1
[rtmpdump] DEBUG: Protocol : RTMP
[rtmpdump] DEBUG: Hostname : cdncon.fcod.llnwd.net
[rtmpdump] DEBUG: Port     : 1935
[rtmpdump] DEBUG: Playpath : mp4:u/oilers/vod/flv/2014/12/05/691469_20141205_mact_sd.mp4?eid=690930&pid=691469&gid=3012&pt=1?eid=690930&pid=691469&gid=3012&pt=1&ip=<>&e=1441122589&h=0c7b5e450ba551962ccb3204a2c7af2b
[rtmpdump] DEBUG: tcUrl    : rtmp://cdncon.fcod.llnwd.net/a277/e4
[rtmpdump] DEBUG: app      : a277/e4
[rtmpdump] DEBUG: live     : no
[rtmpdump] DEBUG: timeout  : 30 sec
[rtmpdump] DEBUG: Setting buffer time to: 36000000ms
[rtmpdump] Connecting ...
[rtmpdump] DEBUG: RTMP_Connect1, ... connected, handshaking
[rtmpdump] DEBUG: HandShake: Type Answer   : 03
[rtmpdump] DEBUG: HandShake: Server Uptime : 556881973
[rtmpdump] DEBUG: HandShake: FMS Version   : 4.0.3.1
[rtmpdump] DEBUG: HandShake: Handshaking finished....
[rtmpdump] DEBUG: RTMP_Connect1, handshaked
[rtmpdump] DEBUG: Invoking connect
[rtmpdump] INFO: Connected...
[rtmpdump] DEBUG: HandleServerBW: server BW = 2500000
[rtmpdump] DEBUG: HandleClientBW: client BW = 2500000 2
[rtmpdump] DEBUG: HandleChangeChunkSize, received: chunk size change to 4096
[rtmpdump] DEBUG: RTMP_ClientPacket, received: invoke 242 bytes
[rtmpdump] DEBUG: (object begin)
[rtmpdump] DEBUG: (object begin)
[rtmpdump] DEBUG: Property: <Name:             fmsVer, STRING:  FMS/4,0,3,4044>
[rtmpdump] DEBUG: Property: <Name:       capabilities, NUMBER:  255.00>
[rtmpdump] DEBUG: Property: <Name:               mode, NUMBER:  1.00>
[rtmpdump] DEBUG: (object end)
[rtmpdump] DEBUG: (object begin)
[rtmpdump] DEBUG: Property: <Name:              level, STRING:  status>
[rtmpdump] DEBUG: Property: <Name:               code, STRING:  NetConnection.Connect.Success>
[rtmpdump] DEBUG: Property: <Name:        description, STRING:  Connection succeeded.>
[rtmpdump] DEBUG: Property: <Name:     objectEncoding, NUMBER:  0.00>
[rtmpdump] DEBUG: Property: <Name:               data, ECMA_ARRAY>
[rtmpdump] DEBUG: (object begin)
[rtmpdump] DEBUG: Property: <Name:            version, STRING:  4,0,3,4044>
[rtmpdump] DEBUG: (object end)
[rtmpdump] DEBUG: (object end)
[rtmpdump] DEBUG: (object end)
[rtmpdump] DEBUG: HandleInvoke, server invoking <_result>
[rtmpdump] DEBUG: HandleInvoke, received result for method call <connect>
[rtmpdump] DEBUG: sending ctrl. type: 0x0003
[rtmpdump] DEBUG: Invoking createStream
[rtmpdump] DEBUG: RTMP_ClientPacket, received: invoke 21 bytes
[rtmpdump] DEBUG: (object begin)
[rtmpdump] DEBUG: Property: NULL
[rtmpdump] DEBUG: (object end)
[rtmpdump] DEBUG: HandleInvoke, server invoking <onBWDone>
[rtmpdump] DEBUG: Invoking _checkbw
[rtmpdump] DEBUG: RTMP_ClientPacket, received: invoke 29 bytes
[rtmpdump] DEBUG: (object begin)
[rtmpdump] DEBUG: Property: NULL
[rtmpdump] DEBUG: (object end)
[rtmpdump] DEBUG: HandleInvoke, server invoking <_result>
[rtmpdump] DEBUG: HandleInvoke, received result for method call <createStream>
[rtmpdump] DEBUG: SendPlay, seekTime=0, stopTime=0, sending play: mp4:u/oilers/vod/flv/2014/12/05/691469_20141205_mact_sd.mp4?eid=690930&pid=691469&gid=3012&pt=1?eid=690930&pid=691469&gid=3012&pt=1&ip=176.86.176.13&e=1441122589&h=0c7b5e450ba551962ccb3204a2c7af2b
[rtmpdump] DEBUG: Invoking play
[rtmpdump] DEBUG: sending ctrl. type: 0x0003
[rtmpdump] DEBUG: RTMP_ClientPacket, received: invoke 16419 bytes
[rtmpdump] DEBUG: (object begin)
[rtmpdump] DEBUG: Property: NULL
[rtmpdump] DEBUG: (object end)
[rtmpdump] DEBUG: HandleInvoke, server invoking <_onbwcheck>
[rtmpdump] DEBUG: Invoking _result
[rtmpdump] DEBUG: HandleChangeChunkSize, received: chunk size change to 4096
[rtmpdump] DEBUG: HandleCtrl, received ctrl. type: 4, len: 6
[rtmpdump] DEBUG: HandleCtrl, Stream IsRecorded 1
[rtmpdump] DEBUG: RTMP_ClientPacket, received: invoke 252 bytes
[rtmpdump] DEBUG: (object begin)
[rtmpdump] DEBUG: Property: NULL
[rtmpdump] DEBUG: (object begin)
[rtmpdump] DEBUG: Property: <Name:              level, STRING:  status>
[rtmpdump] DEBUG: Property: <Name:               code, STRING:  NetStream.Play.Reset>
[rtmpdump] DEBUG: Property: <Name:        description, STRING:  Playing and resetting u/oilers/vod/flv/2014/12/05/691469_20141205_mact_sd.mp4.>
[rtmpdump] DEBUG: Property: <Name:            details, STRING:  u/oilers/vod/flv/2014/12/05/691469_20141205_mact_sd.mp4>
[rtmpdump] DEBUG: Property: <Name:           clientid, STRING:  qAAmksFA>
[rtmpdump] DEBUG: (object end)
[rtmpdump] DEBUG: (object end)
[rtmpdump] DEBUG: HandleInvoke, server invoking <onStatus>
[rtmpdump] DEBUG: HandleInvoke, onStatus: NetStream.Play.Reset
[rtmpdump] DEBUG: HandleCtrl, received ctrl. type: 0, len: 6
[rtmpdump] DEBUG: HandleCtrl, Stream Begin 1
[rtmpdump] DEBUG: RTMP_ClientPacket, received: invoke 246 bytes
[rtmpdump] DEBUG: (object begin)
[rtmpdump] DEBUG: Property: NULL
[rtmpdump] DEBUG: (object begin)
[rtmpdump] DEBUG: Property: <Name:              level, STRING:  status>
[rtmpdump] DEBUG: Property: <Name:               code, STRING:  NetStream.Play.Start>
[rtmpdump] DEBUG: Property: <Name:        description, STRING:  Started playing u/oilers/vod/flv/2014/12/05/691469_20141205_mact_sd.mp4.>
[rtmpdump] DEBUG: Property: <Name:            details, STRING:  u/oilers/vod/flv/2014/12/05/691469_20141205_mact_sd.mp4>
[rtmpdump] DEBUG: Property: <Name:           clientid, STRING:  qAAmksFA>
[rtmpdump] DEBUG: (object end)
[rtmpdump] DEBUG: (object end)
[rtmpdump] DEBUG: HandleInvoke, server invoking <onStatus>
[rtmpdump] DEBUG: HandleInvoke, onStatus: NetStream.Play.Start
[rtmpdump] Starting download at: -0.001 kB
[rtmpdump] DEBUG: RTMP_ClientPacket, received: notify 24 bytes
[rtmpdump] DEBUG: (object begin)
[rtmpdump] DEBUG: (object end)
[rtmpdump] DEBUG: ignoring too small audio packet: size: 0
[rtmpdump] DEBUG: RTMP_ClientPacket, received: notify 44 bytes
[rtmpdump] DEBUG: (object begin)
[rtmpdump] DEBUG: (object begin)
[rtmpdump] DEBUG: Property: <Name:               code, STRING:  NetStream.Data.Start>
[rtmpdump] DEBUG: (object end)
[rtmpdump] DEBUG: (object end)
[rtmpdump] DEBUG: RTMP_ClientPacket, received: notify 494 bytes
[rtmpdump] DEBUG: (object begin)
[rtmpdump] DEBUG: (object begin)
[rtmpdump] DEBUG: Property: <Name:           duration, NUMBER:  1877.45>
[rtmpdump] DEBUG: Property: <Name:       moovPosition, NUMBER:  32.00>
[rtmpdump] DEBUG: Property: <Name:              width, NUMBER:  1920.00>
[rtmpdump] DEBUG: Property: <Name:             height, NUMBER:  1080.00>
[rtmpdump] DEBUG: Property: <Name:       videocodecid, STRING:  avc1>
[rtmpdump] DEBUG: Property: <Name:       audiocodecid, STRING:  mp4a>
[rtmpdump] DEBUG: Property: <Name:         avcprofile, NUMBER:  100.00>
[rtmpdump] DEBUG: Property: <Name:           avclevel, NUMBER:  40.00>
[rtmpdump] DEBUG: Property: <Name:             aacaot, NUMBER:  2.00>
[rtmpdump] DEBUG: Property: <Name:     videoframerate, NUMBER:  29.97>
[rtmpdump] DEBUG: Property: <Name:    audiosamplerate, NUMBER:  44100.00>
[rtmpdump] DEBUG: Property: <Name:      audiochannels, NUMBER:  2.00>
[rtmpdump] DEBUG: Property: <Name:          trackinfo, STRICT_ARRAY>
[rtmpdump] DEBUG: (object begin)
[rtmpdump] DEBUG: (object begin)
[rtmpdump] DEBUG: Property: <Name:             length, NUMBER:  56322266.00>
[rtmpdump] DEBUG: Property: <Name:          timescale, NUMBER:  30000.00>
[rtmpdump] DEBUG: Property: <Name:           language, STRING:  eng>
[rtmpdump] DEBUG: Property: <Name:  sampledescription, STRICT_ARRAY>
[rtmpdump] DEBUG: (object begin)
[rtmpdump] DEBUG: (object begin)
[rtmpdump] DEBUG: Property: <Name:         sampletype, STRING:  avc1>
[rtmpdump] DEBUG: (object end)
[rtmpdump] DEBUG: (object end)
[rtmpdump] DEBUG: (object end)
[rtmpdump] DEBUG: (object begin)
[rtmpdump] DEBUG: Property: <Name:             length, NUMBER:  82795520.00>
[rtmpdump] DEBUG: Property: <Name:          timescale, NUMBER:  44100.00>
[rtmpdump] DEBUG: Property: <Name:           language, STRING:  eng>
[rtmpdump] DEBUG: Property: <Name:  sampledescription, STRICT_ARRAY>
[rtmpdump] DEBUG: (object begin)
[rtmpdump] DEBUG: (object begin)
[rtmpdump] DEBUG: Property: <Name:         sampletype, STRING:  mp4a>
[rtmpdump] DEBUG: (object end)
[rtmpdump] DEBUG: (object end)
[rtmpdump] DEBUG: (object end)
[rtmpdump] DEBUG: (object end)
[rtmpdump] DEBUG: (object end)
[rtmpdump] DEBUG: (object end)
[rtmpdump] INFO: Metadata:
[rtmpdump] INFO:   duration              1877.45
[rtmpdump] INFO:   moovPosition          32.00
[rtmpdump] INFO:   width                 1920.00
[rtmpdump] INFO:   height                1080.00
[rtmpdump] INFO:   videocodecid          avc1
[rtmpdump] INFO:   audiocodecid          mp4a
[rtmpdump] INFO:   avcprofile            100.00
[rtmpdump] INFO:   avclevel              40.00
[rtmpdump] INFO:   aacaot                2.00
[rtmpdump] INFO:   videoframerate        29.97
[rtmpdump] INFO:   audiosamplerate       44100.00
[rtmpdump] INFO:   audiochannels         2.00
[rtmpdump] INFO: trackinfo:
[rtmpdump] INFO:   length                56322266.00
[rtmpdump] INFO:   timescale             30000.00
[rtmpdump] INFO:   language              eng
[rtmpdump] INFO: sampledescription:
[rtmpdump] INFO:   sampletype            avc1
[rtmpdump] INFO:   length                82795520.00
[rtmpdump] INFO:   timescale             44100.00
[rtmpdump] INFO:   language              eng
[rtmpdump] INFO: sampledescription:
[rtmpdump] INFO:   sampletype            mp4a
[rtmpdump] DEBUG: RTMP_ClientPacket, received: notify 11114 bytes
[rtmpdump] DEBUG: (object begin)
[rtmpdump] DEBUG: (object begin)
[rtmpdump] DEBUG: Property: <Name:               data, STRING:  <?xpacket begin="���" id="W5M0MpCehiHzreSzNTczkc9d"?>
[rtmpdump] <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.6-c014 79.156821, 2014/08/29-03:07:50        ">
[rtmpdump]  <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
[rtmpdump]   <rdf:Descript>
[rtmpdump] DEBUG: (object end)
[rtmpdump] DEBUG: (object end)
[rtmpdump] DEBUG: RTMP_ClientPacket, received: invoke 32803 bytes
[rtmpdump] DEBUG: (object begin)
[rtmpdump] DEBUG: Property: NULL
[rtmpdump] DEBUG: (object end)
[rtmpdump] DEBUG: HandleInvoke, server invoking <_onbwcheck>
[rtmpdump] DEBUG: Invoking _result
[download] 64.00KiB at Unknown speed (00:00)
[rtmpdump] DEBUG: RTMP_ClientPacket, received: invoke 49187 bytes
[rtmpdump] DEBUG: (object begin)
[rtmpdump] DEBUG: Property: NULL
[rtmpdump] DEBUG: (object end)
[rtmpdump] DEBUG: HandleInvoke, server invoking <_onbwcheck>
[rtmpdump] DEBUG: Invoking _result
[rtmpdump] DEBUG: RTMP_ClientPacket, received: invoke 65573 bytes
[rtmpdump] DEBUG: (object begin)
[rtmpdump] DEBUG: Property: NULL
[rtmpdump] DEBUG: (object end)
[rtmpdump] DEBUG: HandleInvoke, server invoking <_onbwcheck>
[rtmpdump] DEBUG: Invoking _result
[rtmpdump] DEBUG: RTMP_ClientPacket, received: invoke 81957 bytes
[rtmpdump] DEBUG: (object begin)
[rtmpdump] DEBUG: Property: NULL
[rtmpdump] DEBUG: (object end)
[rtmpdump] DEBUG: HandleInvoke, server invoking <_onbwcheck>
[rtmpdump] DEBUG: Invoking _result
 (+) Video --vid=1 (h264)
 (+) Audio --aid=1 (aac)

If you want to run a modified version of youtube-dl all you have to do is change the source code and on unix you run make youtube-dl and or windows you run python setup.py py2exe (you need py2exe).

cupof commented 9 years ago

i am not using windows i am using a linux satellite box which runs enigma2

in enigma2 i have a plugin that streams rtmp and http links with rtmpdump or wget and that works fine

now i want to use youtube-dl to pipe to media player with this code using youtube-dl http works but rtmp does not

self.urtmp = 'youtube-dl ' -o - -f best + self.url + " -o '" + local_file + "'"

so i telnet to my box type ps and that shows me this rtmpdump --verbose -r rtmp-url which dont work

if i use rtmpdump on its own no youtube-dl telnet to my box type ps and that shows me this rtmpdump -r rtmp-url now this works

if you was to edit out --verbose in your youtube-dl binary show here basic_args = [ 'rtmpdump', '--verbose', '-r', url,

now looks like this

basic_args = [ 'rtmpdump', '-r', url, rtmp stream would play

the only reason --verbose is written is youtube-dl puts it there

why is it even there rtmpdump dont work with it or need it

just need --verbose removed from that line in youtube-dl binary

jaimeMF commented 9 years ago

rtmpdump --verbose works for me maybe you are using an outdated version, could you post the output you get when calling rtmpdump with the --verbose option? I would also be useful to see any error message you get, including from enigma2.

We could only use it if you call youtube-dl --verbose, but old rtmpdump versions will fail with some urls.

ghost commented 9 years ago

@cupof in your line you are using two -o (outputs), try this:

self.urtmp = "youtube-dl -f best " + self.url + " -o '" + local_file + "'"
cupof commented 9 years ago

thanks for reply but i have tried many things in my line http works fine your line works fine with http still the same not working with rtmp because of --verbose rtmpdump --verbose -r rtmp://

line in youtube-dl binary definitely needs to be without --verbose

rtmpdump -r rtmp://

cupof commented 9 years ago

using just rtmpdump not youtube-dl

all rtmp links work with this

self.urtmp = "rtmpdump -r " + self.url + " -o '" + local_file + "'"

and it shows in telnet rtmpdump -r rtmp://

so its definitely the txt --verbose in youtube-dl that is stopping rtmp from working

jaimeMF commented 9 years ago

Could you post the output of rtmpdump with the --verbose option and youtube-dl --verbose?, it would really help us (as explained in our bug report instructions).

cupof commented 9 years ago

how to output rtmpdump with the --verbose option and youtube-dl --verbose?,

via the enigma2 plugin ?

yan12125 commented 9 years ago

Just run the commands in the terminal.