Closed sherrywilly closed 2 years ago
ffmpeg_cmd = f'ffmpeg -rtbufsize 256M -re -i "{file}" -acodec libmp3lame -ar 44100 -b:a 128k -pix_fmt yuv420p -profile:v baseline -s 720x1280 -bufsize 6000k -vb 400k -maxrate 1500k -deinterlace -vcodec libx264 -preset veryfast -g 30 -r 30 -f flv "{url}"'
subprocess.call(ffmpeg_cmd, shell=True)
use aac for audio
@dedshit is your live stream still working? I did the aac plus replaced the deinterface as well, but for me starting the broadcast is failing.
@dedshit is your live stream still working? I did the aac plus replaced the deinterface as well, but for me starting the broadcast is failing.
share your command
@dedshit
ffmpeg_cmd = "ffmpeg -rtbufsize 256M -re -i '{file}' -c:a aac -ar 44100 -b:a 128k -pix_fmt yuv420p -profile:v baseline -s 720x1280 -bufsize 6000k -vb 400k -maxrate 1500k -vf yadif=1 -vcodec libx264 -preset veryfast -g 30 -r 30 -f flv -flvflags no_duration_filesize '{stream_url}'".format( file=FILE_PATH, stream_url=upload_url )
Here is my ffmpeg cmd, there is now no issue with the ffmpeg, but starting the broadcast at the Instagram is failing.
@dedshit
ffmpeg_cmd = "ffmpeg -rtbufsize 256M -re -i '{file}' -c:a aac -ar 44100 -b:a 128k -pix_fmt yuv420p -profile:v baseline -s 720x1280 -bufsize 6000k -vb 400k -maxrate 1500k -vf yadif=1 -vcodec libx264 -preset veryfast -g 30 -r 30 -f flv -flvflags no_duration_filesize '{stream_url}'".format( file=FILE_PATH, stream_url=upload_url )
Here is my ffmpeg cmd, there is now no issue with the ffmpeg, but starting the broadcast at the Instagram is failing.
is this for live or upload ?
@dedshit
ffmpeg_cmd = "ffmpeg -rtbufsize 256M -re -i '{file}' -c:a aac -ar 44100 -b:a 128k -pix_fmt yuv420p -profile:v baseline -s 720x1280 -bufsize 6000k -vb 400k -maxrate 1500k -vf yadif=1 -vcodec libx264 -preset veryfast -g 30 -r 30 -f flv -flvflags no_duration_filesize '{stream_url}'".format( file=FILE_PATH, stream_url=upload_url )
Here is my ffmpeg cmd, there is now no issue with the ffmpeg, but starting the broadcast at the Instagram is failing.is this for live or upload ?
This is for the live feed.
@dedshit
ffmpeg_cmd = "ffmpeg -rtbufsize 256M -re -i '{file}' -c:a aac -ar 44100 -b:a 128k -pix_fmt yuv420p -profile:v baseline -s 720x1280 -bufsize 6000k -vb 400k -maxrate 1500k -vf yadif=1 -vcodec libx264 -preset veryfast -g 30 -r 30 -f flv -flvflags no_duration_filesize '{stream_url}'".format( file=FILE_PATH, stream_url=upload_url )
Here is my ffmpeg cmd, there is now no issue with the ffmpeg, but starting the broadcast at the Instagram is failing.is this for live or upload ?
This is for the live feed.
you have stream url & key right then try to do manually
@dedshit
ffmpeg_cmd = "ffmpeg -rtbufsize 256M -re -i '{file}' -c:a aac -ar 44100 -b:a 128k -pix_fmt yuv420p -profile:v baseline -s 720x1280 -bufsize 6000k -vb 400k -maxrate 1500k -vf yadif=1 -vcodec libx264 -preset veryfast -g 30 -r 30 -f flv -flvflags no_duration_filesize '{stream_url}'".format( file=FILE_PATH, stream_url=upload_url )
Here is my ffmpeg cmd, there is now no issue with the ffmpeg, but starting the broadcast at the Instagram is failing.is this for live or upload ?
This is for the live feed.
you have stream url & key right then try to do manually
I tried doing it manually, there is no error in the ffmpeg, getting the output as expected but there is no live stream on Instagram app.
@dedshit
ffmpeg_cmd = "ffmpeg -rtbufsize 256M -re -i '{file}' -c:a aac -ar 44100 -b:a 128k -pix_fmt yuv420p -profile:v baseline -s 720x1280 -bufsize 6000k -vb 400k -maxrate 1500k -vf yadif=1 -vcodec libx264 -preset veryfast -g 30 -r 30 -f flv -flvflags no_duration_filesize '{stream_url}'".format( file=FILE_PATH, stream_url=upload_url )
Here is my ffmpeg cmd, there is now no issue with the ffmpeg, but starting the broadcast at the Instagram is failing.is this for live or upload ?
This is for the live feed.
you have stream url & key right then try to do manually
I tried doing it manually, there is no error in the ffmpeg, getting the output as expected but there is no live stream on Instagram app.
ffmpeg -re -i '{file}' -c:v libx264 -c:a aac -preset ultrafast -f flv '{rtmp://...../key}' try this if it works then use video filter option
@dedshit
ffmpeg_cmd = "ffmpeg -rtbufsize 256M -re -i '{file}' -c:a aac -ar 44100 -b:a 128k -pix_fmt yuv420p -profile:v baseline -s 720x1280 -bufsize 6000k -vb 400k -maxrate 1500k -vf yadif=1 -vcodec libx264 -preset veryfast -g 30 -r 30 -f flv -flvflags no_duration_filesize '{stream_url}'".format( file=FILE_PATH, stream_url=upload_url )
Here is my ffmpeg cmd, there is now no issue with the ffmpeg, but starting the broadcast at the Instagram is failing.is this for live or upload ?
This is for the live feed.
you have stream url & key right then try to do manually
I tried doing it manually, there is no error in the ffmpeg, getting the output as expected but there is no live stream on Instagram app.
ffmpeg -re -i '{file}' -c:v libx264 -c:a aac -preset ultrafast -f flv '{rtmp://...../key}' try this if it works then use video filter option
Nope! The live video is not reflecting on the Instagram Live Feed. Nope.
@dedshit
ffmpeg_cmd = "ffmpeg -rtbufsize 256M -re -i '{file}' -c:a aac -ar 44100 -b:a 128k -pix_fmt yuv420p -profile:v baseline -s 720x1280 -bufsize 6000k -vb 400k -maxrate 1500k -vf yadif=1 -vcodec libx264 -preset veryfast -g 30 -r 30 -f flv -flvflags no_duration_filesize '{stream_url}'".format( file=FILE_PATH, stream_url=upload_url )
Here is my ffmpeg cmd, there is now no issue with the ffmpeg, but starting the broadcast at the Instagram is failing.is this for live or upload ?
This is for the live feed.
you have stream url & key right then try to do manually
I tried doing it manually, there is no error in the ffmpeg, getting the output as expected but there is no live stream on Instagram app.
ffmpeg -re -i '{file}' -c:v libx264 -c:a aac -preset ultrafast -f flv '{rtmp://...../key}' try this if it works then use video filter option
Nope! The live video is not reflecting on the Instagram Live Feed. Nope.
https://www.instagram.com/trecjsiwxuzwiw/live/17956462621839009
@dedshit
ffmpeg_cmd = "ffmpeg -rtbufsize 256M -re -i '{file}' -c:a aac -ar 44100 -b:a 128k -pix_fmt yuv420p -profile:v baseline -s 720x1280 -bufsize 6000k -vb 400k -maxrate 1500k -vf yadif=1 -vcodec libx264 -preset veryfast -g 30 -r 30 -f flv -flvflags no_duration_filesize '{stream_url}'".format( file=FILE_PATH, stream_url=upload_url )
Here is my ffmpeg cmd, there is now no issue with the ffmpeg, but starting the broadcast at the Instagram is failing.is this for live or upload ?
This is for the live feed.
you have stream url & key right then try to do manually
I tried doing it manually, there is no error in the ffmpeg, getting the output as expected but there is no live stream on Instagram app.
ffmpeg -re -i '{file}' -c:v libx264 -c:a aac -preset ultrafast -f flv '{rtmp://...../key}' try this if it works then use video filter option
Nope! The live video is not reflecting on the Instagram Live Feed. Nope.
https://www.instagram.com/trecjsiwxuzwiw/live/17956462621839009
working fine
@dedshit
ffmpeg_cmd = "ffmpeg -rtbufsize 256M -re -i '{file}' -c:a aac -ar 44100 -b:a 128k -pix_fmt yuv420p -profile:v baseline -s 720x1280 -bufsize 6000k -vb 400k -maxrate 1500k -vf yadif=1 -vcodec libx264 -preset veryfast -g 30 -r 30 -f flv -flvflags no_duration_filesize '{stream_url}'".format( file=FILE_PATH, stream_url=upload_url )
Here is my ffmpeg cmd, there is now no issue with the ffmpeg, but starting the broadcast at the Instagram is failing.is this for live or upload ?
This is for the live feed.
you have stream url & key right then try to do manually
I tried doing it manually, there is no error in the ffmpeg, getting the output as expected but there is no live stream on Instagram app.
ffmpeg -re -i '{file}' -c:v libx264 -c:a aac -preset ultrafast -f flv '{rtmp://...../key}' try this if it works then use video filter option
Nope! The live video is not reflecting on the Instagram Live Feed. Nope.
@dedshit
ffmpeg_cmd = "ffmpeg -rtbufsize 256M -re -i '{file}' -c:a aac -ar 44100 -b:a 128k -pix_fmt yuv420p -profile:v baseline -s 720x1280 -bufsize 6000k -vb 400k -maxrate 1500k -vf yadif=1 -vcodec libx264 -preset veryfast -g 30 -r 30 -f flv -flvflags no_duration_filesize '{stream_url}'".format( file=FILE_PATH, stream_url=upload_url )
Here is my ffmpeg cmd, there is now no issue with the ffmpeg, but starting the broadcast at the Instagram is failing.is this for live or upload ?
This is for the live feed.
you have stream url & key right then try to do manually
I tried doing it manually, there is no error in the ffmpeg, getting the output as expected but there is no live stream on Instagram app.
ffmpeg -re -i '{file}' -c:v libx264 -c:a aac -preset ultrafast -f flv '{rtmp://...../key}' try this if it works then use video filter option
Nope! The live video is not reflecting on the Instagram Live Feed. Nope.
https://www.instagram.com/tv/CeOAWswpB7o/?igshid=YmMyMTA2M2Y=
now saved to igtv
@dedshit
ffmpeg_cmd = "ffmpeg -rtbufsize 256M -re -i '{file}' -c:a aac -ar 44100 -b:a 128k -pix_fmt yuv420p -profile:v baseline -s 720x1280 -bufsize 6000k -vb 400k -maxrate 1500k -vf yadif=1 -vcodec libx264 -preset veryfast -g 30 -r 30 -f flv -flvflags no_duration_filesize '{stream_url}'".format( file=FILE_PATH, stream_url=upload_url )
Here is my ffmpeg cmd, there is now no issue with the ffmpeg, but starting the broadcast at the Instagram is failing.is this for live or upload ?
This is for the live feed.
you have stream url & key right then try to do manually
I tried doing it manually, there is no error in the ffmpeg, getting the output as expected but there is no live stream on Instagram app.
ffmpeg -re -i '{file}' -c:v libx264 -c:a aac -preset ultrafast -f flv '{rtmp://...../key}' try this if it works then use video filter option
Nope! The live video is not reflecting on the Instagram Live Feed. Nope.
https://www.instagram.com/tv/CeOAWswpB7o/?igshid=YmMyMTA2M2Y=
now saved to igtv
is it something to do with the media file as well? I am using local file .mp4
@dedshit
ffmpeg_cmd = "ffmpeg -rtbufsize 256M -re -i '{file}' -c:a aac -ar 44100 -b:a 128k -pix_fmt yuv420p -profile:v baseline -s 720x1280 -bufsize 6000k -vb 400k -maxrate 1500k -vf yadif=1 -vcodec libx264 -preset veryfast -g 30 -r 30 -f flv -flvflags no_duration_filesize '{stream_url}'".format( file=FILE_PATH, stream_url=upload_url )
Here is my ffmpeg cmd, there is now no issue with the ffmpeg, but starting the broadcast at the Instagram is failing.is this for live or upload ?
This is for the live feed.
you have stream url & key right then try to do manually
I tried doing it manually, there is no error in the ffmpeg, getting the output as expected but there is no live stream on Instagram app.
ffmpeg -re -i '{file}' -c:v libx264 -c:a aac -preset ultrafast -f flv '{rtmp://...../key}' try this if it works then use video filter option
Nope! The live video is not reflecting on the Instagram Live Feed. Nope.
https://www.instagram.com/tv/CeOAWswpB7o/?igshid=YmMyMTA2M2Y=
now saved to igtv
Can you share your code with me? Let me try exactly your code. I am not sure what is happening, I am able to see the frame and bitrate but there is no live feed on the insta ACC. It would be great if you could share the code, I will try that.
@dedshit
ffmpeg_cmd = "ffmpeg -rtbufsize 256M -re -i '{file}' -c:a aac -ar 44100 -b:a 128k -pix_fmt yuv420p -profile:v baseline -s 720x1280 -bufsize 6000k -vb 400k -maxrate 1500k -vf yadif=1 -vcodec libx264 -preset veryfast -g 30 -r 30 -f flv -flvflags no_duration_filesize '{stream_url}'".format( file=FILE_PATH, stream_url=upload_url )
Here is my ffmpeg cmd, there is now no issue with the ffmpeg, but starting the broadcast at the Instagram is failing.is this for live or upload ?
This is for the live feed.
you have stream url & key right then try to do manually
I tried doing it manually, there is no error in the ffmpeg, getting the output as expected but there is no live stream on Instagram app.
ffmpeg -re -i '{file}' -c:v libx264 -c:a aac -preset ultrafast -f flv '{rtmp://...../key}' try this if it works then use video filter option
Nope! The live video is not reflecting on the Instagram Live Feed. Nope.
https://www.instagram.com/tv/CeOAWswpB7o/?igshid=YmMyMTA2M2Y=
now saved to igtv
is it something to do with the media file as well? I am using local file .mp4
nope just same
https://www.instagram.com/trecjsiwxuzwiw/live/17946305899957249
now streaming local file its working fine too
@dedshit
ffmpeg_cmd = "ffmpeg -rtbufsize 256M -re -i '{file}' -c:a aac -ar 44100 -b:a 128k -pix_fmt yuv420p -profile:v baseline -s 720x1280 -bufsize 6000k -vb 400k -maxrate 1500k -vf yadif=1 -vcodec libx264 -preset veryfast -g 30 -r 30 -f flv -flvflags no_duration_filesize '{stream_url}'".format( file=FILE_PATH, stream_url=upload_url )
Here is my ffmpeg cmd, there is now no issue with the ffmpeg, but starting the broadcast at the Instagram is failing.is this for live or upload ?
This is for the live feed.
you have stream url & key right then try to do manually
I tried doing it manually, there is no error in the ffmpeg, getting the output as expected but there is no live stream on Instagram app.
ffmpeg -re -i '{file}' -c:v libx264 -c:a aac -preset ultrafast -f flv '{rtmp://...../key}' try this if it works then use video filter option
Nope! The live video is not reflecting on the Instagram Live Feed. Nope.
https://www.instagram.com/tv/CeOAWswpB7o/?igshid=YmMyMTA2M2Y= now saved to igtv
is it something to do with the media file as well? I am using local file .mp4
nope just same
https://www.instagram.com/trecjsiwxuzwiw/live/17946305899957249
now streaming local file its working fine too
See, the stream is working, but the broadcast is not happening!
@dedshit
ffmpeg_cmd = "ffmpeg -rtbufsize 256M -re -i '{file}' -c:a aac -ar 44100 -b:a 128k -pix_fmt yuv420p -profile:v baseline -s 720x1280 -bufsize 6000k -vb 400k -maxrate 1500k -vf yadif=1 -vcodec libx264 -preset veryfast -g 30 -r 30 -f flv -flvflags no_duration_filesize '{stream_url}'".format( file=FILE_PATH, stream_url=upload_url )
Here is my ffmpeg cmd, there is now no issue with the ffmpeg, but starting the broadcast at the Instagram is failing.is this for live or upload ?
This is for the live feed.
you have stream url & key right then try to do manually
I tried doing it manually, there is no error in the ffmpeg, getting the output as expected but there is no live stream on Instagram app.
ffmpeg -re -i '{file}' -c:v libx264 -c:a aac -preset ultrafast -f flv '{rtmp://...../key}' try this if it works then use video filter option
Nope! The live video is not reflecting on the Instagram Live Feed. Nope.
https://www.instagram.com/tv/CeOAWswpB7o/?igshid=YmMyMTA2M2Y= now saved to igtv
is it something to do with the media file as well? I am using local file .mp4
nope just same
https://www.instagram.com/trecjsiwxuzwiw/live/17946305899957249
now streaming local file its working fine too
See, the stream is working, but the broadcast is not happening!
check in ig dm
wa01 | Metadata: wa01 | major_brand : mp42 wa01 | minor_version : 0 wa01 | compatible_brands: isommp42 wa01 | encoder : Lavf58.45.100 wa01 | Stream #0:0(und): Video: h264 (libx264) ([7][0][0][0] / 0x0007), yuv420p(progressive), 720x1280 [SAR 256:81 DAR 16:9], q=-1--1, 400 kb/s, 30 fps, 1k tbv_delay: N/A wa01 | Stream #0:1(eng): Audio: mp3 (libmp3lame) ([2][0][0][0] / 0x0002), 44100 Hz, stereo, fltp, 128 kb/s (default) wa01 | Metadata:wa01 | creation_time : 2021-11-02T10:30:49.000000Z wa01 | handler_name : ISO Media file produced by Google Inc. Created on: 11/02/2021. wa01 | encoder : Lavc58.91.100 libmp3lamewa01 | frame= 7 fps=0.0 q=0.0 size= 0kB time=00:00:00.36 bitrate= 9frame= 22 fps= 22 q=0.0 size= 0kB time=00:00:00.86 bitrate= 4.2kbits/s spframe= 37 fps= 24 q=30.0 size= 14kB time=00:00:01.35 bitrate= 87.0kbits/s sframe= 52 fps= 26 q=29.0 size= 33kB time=00:00:01.83 bitrate= 149.0kbits/s sframe= 68 fps= 27 q=26.0 size= 52kB time=00:00:02.32 bitrate= 182.4kbits/s s[tls @ 0x55e0ae69a100] A TLS fatal alert has been received.wa01 | av_interleaved_write_frame(): Input/output error wa01 | Last message repeated 1 times wa01 | [flv @ 0x55e0ae6ccb40] Failed to update header with correct duration. wa01 | [flv @ 0x55e0ae6ccb40] Failed to update header with correct filesize.
wa01 | Error writing trailer of rtmps://live-upload.instagram.com:443/rtmp/18192129808125107?s_sw=0&s_vt=ig&a=AbzfMuHm1EqshXw4: Input/output error wa01 | frame= 75 fps= 26 q=26.0 Lsize= 61kB time=00:00:02.35 bitrate= 210.9kbits/s speed=0.828x wa01 | video:34kB audio:37kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown wa01 | [tls @ 0x55e0ae69a100] The specified session has been invalidated for some reason. wa01 | Last message repeated 1 times wa01 | [libx264 @ 0x55e0ae6ced80] frame I:3 Avg QP:16.28 size: 5049
wa01 | [libx264 @ 0x55e0ae6ced80] frame P:72 Avg QP:24.59 size: 1592
wa01 | [libx264 @ 0x55e0ae6ced80] mb I I16..4: 96.6% 0.0% 3.4% wa01 | [libx264 @ 0x55e0ae6ced80] mb P I16..4: 0.6% 0.0% 0.6% P16..4: 1.7% 1.2% 0.5% 0.0% 0.0% skip:95.5% wa01 | [libx264 @ 0x55e0ae6ced80] final ratefactor: 24.44 wa01 | [libx264 @ 0x55e0ae6ced80] coded y,uvDC,uvAC intra: 12.6% 5.5% 2.2% inter: 1.4% 0.5% 0.0% wa01 | [libx264 @ 0x55e0ae6ced80] i16 v,h,dc,p: 96% 2% 2% 0% wa01 | [libx264 @ 0x55e0ae6ced80] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 49% 8% 15% 3% 4% 10% 2% 7% 2% wa01 | [libx264 @ 0x55e0ae6ced80] i8c dc,h,v,p: 93% 2% 5% 1% wa01 | [libx264 @ 0x55e0ae6ced80] kb/s:415.25 wa01 | Conversion failed!