PyLivestream icon indicating copy to clipboard operation
PyLivestream copied to clipboard

No errors, not working

Open SamDev-7 opened this issue 3 years ago • 3 comments

Describe the bug My code

import pylivestream.api as stream
stream.stream_file(ini_file="config.ini", video_file="video.mp4", websites=["youtube"])

Output:

Press Enter to go live on ['youtube'],looping file video.mp4
Or Ctrl C to abort.

 ffmpeg -loglevel error -re -i video.mp4 -codec:v libx264 -pix_fmt yuv420p -preset veryfast -b:v 20000k -g 120.0 -codec:a aac -b:a 128k -ar 44100 -m
axrate 20000k -bufsize 10000k -strict experimental -f flv rtmp://a.rtmp.youtube.com/live2/<private key>

Then nothing happens... System Parameters

  • Operating system (Linux, Mac, Windows) Linux
  • FFmpeg version ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers

SamDev-7 avatar Nov 14 '20 04:11 SamDev-7

Note: please refresh/change your YouTube Live stream id as pasting it here means anyone can copy your key and stream anything on your Youtube Live (!)

It could be that the YouTube Live stream key was not correct. Please try copy and pasting that FFmpeg command into your Terminal and see what results. That's in effect the same thing PyLivestream does

scivision avatar Nov 15 '20 12:11 scivision

If the stream key is not correct, there will be no errors. YouTube or other service provider just silently discards your RTMP packets from FFmpeg, so FFmpeg doesn't know something is wrong, and so neither does PyLivestream.

scivision avatar Nov 15 '20 12:11 scivision

I confirm that my stream key is correct, i tested the same key with pure ffmpeg and it works.

SamDev-7 avatar Nov 16 '20 01:11 SamDev-7