Re: [FFmpeg-user] Live stream to periscope or youtube doesn't seems to work
Hi, output to file works fine.. my display server is Xvfb. I end up with this, but still all black: ~/ffmpeg-git-20171206-64bit-static$ ./ffmpeg -f x11grab -video_size 1024x768 -i :1 -c:v libx264 -preset medium -framerate 30 -g 60 -b:v 1600k -maxrate 1600k -bufsize 800k -vf "scale=960:540,format=yuv420p" -draw_mouse 0 -f flv rtmp://us-east.restream.io/live/re_468848_c9a40670d5cab9c81840 ffmpeg version N-89400-g5a412a5c3c-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2017 the FFmpeg developers built with gcc 6.4.0 (Debian 6.4.0-10) 20171112 configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-6 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-librtmp --enable-libsoxr --enable-libspeex --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg libavutil 56. 5.100 / 56. 5.100 libavcodec 58. 6.102 / 58. 6.102 libavformat58. 2.103 / 58. 2.103 libavdevice58. 0.100 / 58. 0.100 libavfilter 7. 7.100 / 7. 7.100 libswscale 5. 0.101 / 5. 0.101 libswresample 3. 0.101 / 3. 0.101 libpostproc55. 0.100 / 55. 0.100 [x11grab @ 0x4627f00] 16 bits per pixel screen is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented. Input #0, x11grab, from ':1': Duration: N/A, start: 1512967106.867233, bitrate: N/A Stream #0:0: Video: rawvideo (RGB[16] / 0x10424752), rgb565le, 1024x768, 29.97 fps, 29.97 tbr, 1000k tbn, 1000k tbc Stream mapping: Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264)) Press [q] to stop, [?] for help [libx264 @ 0x4630e40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 [libx264 @ 0x4630e40] profile High, level 3.1 [libx264 @ 0x4630e40] 264 - core 152 r19 ba24899 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=1 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=60 keyint_min=6 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=cbr mbtree=1 bitrate=1600 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=1600 vbv_bufsize=800 nal_hrd=none filler=0 ip_ratio=1.40 aq=1:1.00 Output #0, flv, to 'rtmp:// us-east.restream.io/live/re_468848_c9a40670d5cab9c81840': Metadata: encoder : Lavf58.2.103 Stream #0:0: Video: h264 (libx264) ([7][0][0][0] / 0x0007), yuv420p, 960x540, q=-1--1, 1600 kb/s, 29.97 fps, 1k tbn, 29.97 tbc Metadata: encoder : Lavc58.6.102 libx264 Side data: cpb: bitrate max/min/avg: 160/0/160 buffer size: 80 vbv_delay: -1 [flv @ 0x462fbc0] Failed to update header with correct duration.te= 15.9kbits/s speed=0.885x [flv @ 0x462fbc0] Failed to update header with correct filesize. frame= 315 fps=6.6 q=0.0 Lsize= 93kB time=00:00:46.68 bitrate= 16.3kbits/s speed=0.982x video:86kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 7.443541% [libx264 @ 0x4630e40] frame I:6 Avg QP: 0.13 size: 12514 [libx264 @ 0x4630e40] frame P:79Avg QP: 0.59 size:80 [libx264 @ 0x4630e40] frame B:230 Avg QP: 5.14 size:28 [libx264 @ 0x4630e40] consecutive B-frames: 1.9% 0.6% 4.8% 92.7% [libx264 @ 0x4630e40] mb I I16..4: 95.8% 0.0% 4.2% [libx264 @ 0x4630e40] mb P I16..4: 0.0% 0.0% 0.0% P16..4: 0.1% 0.0% 0.0% 0.0% 0.0%skip:99.9% [libx264 @ 0x4630e40] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 0.0% 0.0% 0.0% direct: 0.0% skip:100.0% L0:33.3% L1:66.7% BI: 0.0% [libx264 @ 0x4630e40] 8x8 transform intra:0.0% inter:46.2% [libx264 @ 0x4630e40] coded y,uvDC,uvAC intra: 4.0% 5.4% 5.4% inter: 0.0% 0.0% 0.0% [libx264 @ 0x4630e40] i16 v,h,dc,p: 95% 4% 1% 0% [libx264 @ 0x4630e40] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 47% 9% 5% 4% 3% 5% 3% 4% [libx264 @ 0x4630e40] i8c dc,h,v,p: 76% 22% 2% 0% [libx264 @ 0x4630e40] Weighted P-Frames: Y:0.0% UV:0.0% [libx264 @ 0x4630e40] ref P L0: 99.5% 0.0% 0.5% [libx264 @ 0x4630e40] ref B L0: 1.9% 98.1% [libx264 @ 0x4630e40] kb/s:14.93 ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listin
Re: [FFmpeg-user] Live stream to periscope or youtube doesn't seems to work
2017-12-11 1:58 GMT+01:00 Guilherme Santos : > Stream #0:0: Video: rawvideo (RGB[16] / 0x10424752), rgb565le, > 1024x768, 29.97 fps, 29.97 tbr, 1000k tbn, 1000k tbc The pix_fmt rgb565le works fine here with -f x11grab and current FFmpeg. Carl Eugen ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Live stream to periscope or youtube doesn't seems to work
2017-12-11 1:58 GMT+01:00 Guilherme Santos : > [x11grab @ 0xc3e16a0] 16 bits per pixel screen is not implemented. Update > your FFmpeg version to the newest one from Git. If the problem still > occurs, it means that your file has a feature which has not been > implemented. Please test with "-draw_mouse 0". And as explained, do not use the option "-r", either keep the input framerate or force one with -framerate if this works. Remember not to top-post here, Carl Eugen ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Live stream to periscope or youtube doesn't seems to work
On Sun, Dec 10, 2017, at 03:58 PM, Guilherme Santos wrote: > > ~/ffmpeg-git-20171206-32bit-static$ ./ffmpeg -f x11grab -video_size > 1024x768 -i :1 -c:v libx264 -preset medium -crf 28 -pix_fmt yuv420p -r > 30 > -g 60 -b:v 2M -maxrate 2M -bufsize 1M -f flv rtmp:// > or.pscp.tv:80/x/avadqqzw8nyv Can you not use the 64-bit version? -crf and -b:v are mutually exclusive rate control methods, as mentioned previously. Use one but not both. In your case -b:v is being ignored. Remove -r 30 and replace it with -framerate 30 input option as I mentioned previously. This will prevent the unnecessary duplication of frames as it will use -framerate 25 for the x11grab input by default if you don't change it. Adding -r 30 makes it convert from 25 to 30 by duplicating frames. > [x11grab @ 0xc3e16a0] 16 bits per pixel screen is not implemented. Update > your FFmpeg version to the newest one from Git. If the problem still > occurs, it means that your file has a feature which has not been > implemented. I guess this is the problem. Output to a local file and try to play it. Probably garbage output. > Stream #0:0: Video: rawvideo (RGB[16] / 0x10424752), rgb565le, > 1024x768, 29.97 fps, 29.97 tbr, 1000k tbn, 1000k tbc rgb565le. Mine is bgr0. What's your display server? ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Live stream to periscope or youtube doesn't seems to work
Hey Lou, wow thanks! amazing info.. I'm playing around but not succeed yet, it connects but screen goes black. Periscope's info: Video codec AVC Video bitrate 6.949 kbps Video framerate 5.0332192470304005 fps Video keyframe interval in seconds 12 Max keyframe interval: 3.0 s. Video width 1024 px Video height768 px The NEW ffmpeg command: ~/ffmpeg-git-20171206-32bit-static$ ./ffmpeg -f x11grab -video_size 1024x768 -i :1 -c:v libx264 -preset medium -crf 28 -pix_fmt yuv420p -r 30 -g 60 -b:v 2M -maxrate 2M -bufsize 1M -f flv rtmp:// or.pscp.tv:80/x/avadqqzw8nyv ffmpeg version N-89400-g5a412a5c3c-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2017 the FFmpeg developers built with gcc 6.4.0 (Debian 6.4.0-7) 20170920 configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-6 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libfribidi --enable-libass --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-librtmp --enable-libsoxr --enable-libspeex --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg libavutil 56. 5.100 / 56. 5.100 libavcodec 58. 6.102 / 58. 6.102 libavformat58. 2.103 / 58. 2.103 libavdevice58. 0.100 / 58. 0.100 libavfilter 7. 7.100 / 7. 7.100 libswscale 5. 0.101 / 5. 0.101 libswresample 3. 0.101 / 3. 0.101 libpostproc55. 0.100 / 55. 0.100 [x11grab @ 0xc3e16a0] 16 bits per pixel screen is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented. Input #0, x11grab, from ':1': Duration: N/A, start: 1512953527.229525, bitrate: N/A Stream #0:0: Video: rawvideo (RGB[16] / 0x10424752), rgb565le, 1024x768, 29.97 fps, 29.97 tbr, 1000k tbn, 1000k tbc Stream mapping: Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264)) Press [q] to stop, [?] for help [swscaler @ 0xc3fc320] Warning: data is not aligned! This can lead to a speed loss [libx264 @ 0xc3e9a80] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 [libx264 @ 0xc3e9a80] profile High, level 3.1 [libx264 @ 0xc3e9a80] 264 - core 152 r19 ba24899 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=1 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=60 keyint_min=6 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=28.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=2000 vbv_bufsize=1000 crf_max=0.0 nal_hrd=none filler=0 ip_ratio=1.40 aq=1:1.00 Output #0, flv, to 'rtmp://or.pscp.tv:80/x/avadqqzw8nyv': Metadata: encoder : Lavf58.2.103 Stream #0:0: Video: h264 (libx264) ([7][0][0][0] / 0x0007), yuv420p, 1024x768, q=-1--1, 2000 kb/s, 30 fps, 1k tbn, 30 tbc Metadata: encoder : Lavc58.6.102 libx264 Side data: cpb: bitrate max/min/avg: 200/0/200 buffer size: 100 vbv_delay: -1 [flv @ 0xc3e88a0] Failed to update header with correct duration.ate= 6.9kbits/s speed=0.967x [flv @ 0xc3e88a0] Failed to update header with correct filesize. frame= 1232 fps=5.0 q=27.0 Lsize= 206kB time=00:04:02.46 bitrate= 7.0kbits/s speed=0.989x video:182kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 13.385370% [libx264 @ 0xc3e9a80] frame I:21Avg QP: 9.37 size: 6657 [libx264 @ 0xc3e9a80] frame P:308 Avg QP:24.69 size:51 [libx264 @ 0xc3e9a80] frame B:903 Avg QP:33.97 size:33 [libx264 @ 0xc3e9a80] consecutive B-frames: 1.7% 0.0% 5.1% 93.2% [libx264 @ 0xc3e9a80] mb I I16..4: 81.2% 14.9% 4.0% [libx264 @ 0xc3e9a80] mb P I16..4: 0.0% 0.0% 0.0% P16..4: 0.1% 0.0% 0.0% 0.0% 0.0%skip:99.9% [libx264 @ 0xc3e9a80] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 0.0% 0.0% 0.0% direct: 0.0% skip:100.0% L0:41.8% L1:58.2% BI: 0.0% [libx264 @ 0xc3e9a80] 8x8 transform intra:14.9% inter:7.9% [libx264 @ 0xc3e9a80] coded y,uvDC,uvAC intra: 2.4% 2.8% 1.4% inter: 0.0% 0.0% 0.0% [libx264 @ 0xc3e9a80] i16 v,h,dc,p: 96% 3% 1% 0% [libx264 @ 0xc3e9a80] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 7% 89% 4% 0% 0% 0% 0% 0% 0% [libx264 @ 0xc3e9a80] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 51% 12% 3% 3% 4% 2% 3% 2% [libx264 @ 0xc3e9a80] i8c dc,h,v,p: 95%
Re: [FFmpeg-user] Live stream to periscope or youtube doesn't seems to work
On Sun, Dec 10, 2017, at 10:22 AM, Guilherme Santos wrote: > Hello, I was wondering why this command couldn't work... I'm trying to > live > stream from my aws ubuntu to periscope. check this out: > > $ ffmpeg -threads 0 -y -v verbose -re -f x11grab -video_size 1024x768 -i > :1 > -c:v libx264 -preset ultrafast -crf 3 -c:a aac -b:a 64k -pix_fmt yuv420p > -r > 15 -g 30 -b:v 2500k -bufsize 512k -f flv > rtmp://or.pscp.tv:80/x/bb1hmhk85d71 Remove "-threads 0" input option. Remove "-re" input option. It should not be used with x11grab. From the documentation: "Should not be used with actual grab devices or live input streams (where it can cause packet loss)." Replace "-r 15" output option with "-framerate 15" input option. Verify that the video service accepts 15 fps (I'm not sure if it will or not). If not, use a more standard rate, such as 25, and adjust "-g" to be approximately double your frame rate. Remove "-crf 3". That's overkill for streaming and is mutually exclusive with "-b:v". Add "-maxrate" option. Change "-bufsize" to be 1-2x "-maxrate". Experiment with -b:v, -bufsize, -maxrate to see what works best for you. > ffmpeg version 2.4.3-1ubuntu1~trusty6 Copyright (c) 2000-2014 the FFmpeg > developers Ancient and unsupported. Please update. An easy solution is to use a static build from: http://johnvansickle.com/ffmpeg/ (I can't recall if x11grab is supported by these builds, but I'll assume it is.) ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-user] Live stream to periscope or youtube doesn't seems to work
Hello, I was wondering why this command couldn't work... I'm trying to live stream from my aws ubuntu to periscope. check this out: $ ffmpeg -threads 0 -y -v verbose -re -f x11grab -video_size 1024x768 -i :1 -c:v libx264 -preset ultrafast -crf 3 -c:a aac -b:a 64k -pix_fmt yuv420p -r 15 -g 30 -b:v 2500k -bufsize 512k -f flv rtmp://or.pscp.tv:80/x/bb1hmhk85d71 ffmpeg version 2.4.3-1ubuntu1~trusty6 Copyright (c) 2000-2014 the FFmpeg developers built on Nov 22 2014 17:07:19 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1) configuration: --prefix=/usr --extra-version='1ubuntu1~trusty6' --build-suffix=-ffmpeg --toolchain=hardened --extra-cflags= --extra-cxxflags= --libdir=/usr/lib/x86_64-linux-gnu --shlibdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --enable-shared --disable-stripping --enable-avresample --enable-avisynth --enable-fontconfig --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-opengl --enable-x11grab --enable-libxvid --enable-libx265 --enable-libdc1394 --enable-libiec61883 --enable-libzvbi --enable-libzmq --enable-frei0r --enable-libx264 --enable-libsoxr --enable-openal --enable-libopencv libavutil 54. 7.100 / 54. 7.100 libavcodec 56. 1.100 / 56. 1.100 libavformat56. 4.101 / 56. 4.101 libavdevice56. 0.100 / 56. 0.100 libavfilter 5. 1.100 / 5. 1.100 libavresample 2. 1. 0 / 2. 1. 0 libswscale 3. 0.100 / 3. 0.100 libswresample 1. 1.100 / 1. 1.100 libpostproc53. 0.100 / 53. 0.100 [x11grab @ 0x765380] device: :1 -> display: :1 x: 0 y: 0 width: 1024 height: 768 [x11grab @ 0x765380] shared memory extension found Input #0, x11grab, from ':1': Duration: N/A, start: 1512933527.007383, bitrate: 377110 kb/s Stream #0:0: Video: rawvideo (RGB[16] / 0x10424752), rgb565le, 1024x768, 377110 kb/s, 29.97 tbr, 1000k tbn, 29.97 tbc Parsing... Parsed protocol: 0 Parsed host: or.pscp.tv Parsed app : x RTMP_Connect1, ... connected, handshaking HandShake: Type Answer : 03 HandShake: Server Uptime : 0 HandShake: FMS Version : 0.0.0.0 HandShake: Handshaking finished RTMP_Connect1, handshaked Invoking connect HandleServerBW: server BW = 500 HandleClientBW: client BW = 500 0 HandleCtrl, received ctrl. type: 0, len: 6 HandleCtrl, Stream Begin 0 HandleChangeChunkSize, received: chunk size change to 512 RTMP_ClientPacket, received: invoke 190 bytes (object begin) Property: Property: Property: (object begin) Property: Property: (object end) Property: (object begin) Property: Property: Property: Property: (object end) (object end) HandleInvoke, server invoking <_result> HandleInvoke, received result for method call Invoking releaseStream Invoking FCPublish Invoking createStream RTMP_ClientPacket, received: invoke 102 bytes (object begin) Property: Property: Property: NULL Property: (object begin) Property: Property: Property: (object end) (object end) HandleInvoke, server invoking HandleCtrl, received ctrl. type: 0, len: 6 HandleCtrl, Stream Begin 0 RTMP_ClientPacket, received: invoke 29 bytes (object begin) Property: Property: Property: NULL Property: (object end) HandleInvoke, server invoking <_result> HandleInvoke, received result for method call Invoking publish RTMP_ClientPacket, received: invoke 105 bytes (object begin) Property: Property: Property: NULL Property: (object begin) Property: Property: Property: (object end) (object end) HandleInvoke, server invoking HandleInvoke, onStatus: NetStream.Publish.Start [graph 0 input from stream 0:0 @ 0x753ae0] w:1024 h:768 pixfmt:rgb565le tb:1/100 fr:3/1001 sar:0/1 sws_param:flags=2 [auto-inserted scaler 0 @ 0x755920] w:iw h:ih flags:'0x4' interl:0 [format @ 0x753f80] auto-inserting filter 'auto-inserted scaler 0' between the filter 'Parsed_null_0' and the filter 'format' [auto-inserted scaler 0 @ 0x755920] w:1024 h:768 fmt:rgb565le sar:0/1 -> w:1024 h:768 fmt:yuv420p sar:0/1 flags:0x4 [libx264 @ 0x77a920] VBV bufsize set but maxrate unspecified, ignored [libx264 @ 0x77a920] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX AVX2 FMA3 LZCNT BMI2 [libx264 @ 0x77a920] profile Constrained Baseline, level 3.1 [libx264 @ 0x77a920] 264 - core 142 r2389 956c8d8 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chro