Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- INRES="1920x1080" # input resolution
- OUTRES="640x360"
- VBITRATE="300K"
- FPS="30" # target FPS
- QUAL="ultrafast" # one of the many FFMPEG preset
- #justin.tv
- STREAM_KEY="my private key" #ffmpeg
- URL="rtmp://live.justin.tv/app/$STREAM_KEY"
- #No Audio
- #ffmpeg -f x11grab -y -s "$INRES" -r "$FPS" -i :0.0 -an \
- # -vcodec libx264 -preset "$QUAL" -pix_fmt yuv420p -s "$OUTRES" -b:v 1650k \
- # -f flv "$URL"
- ffmpeg -f x11grab -y -s "$INRES" -r "$FPS" -i :0.0 \
- -f video4linux2 -s 320x240 -r "$FPS" -i /dev/video0 -filter_complex 'overlay=10:main_h-overlay_h-10' -an \
- -vcodec libx264 -preset "$QUAL" -pix_fmt yuv420p -s "$OUTRES" -b:v "$VBITRATE" \
- -f flv "$URL"
- vitrums@vitrums:~/stream$ ./run640x360camera.sh
- ffmpeg version git-2012-07-28-a2f91e7 Copyright (c) 2000-2012 the FFmpeg developers
- built on Jul 28 2012 12:01:28 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
- configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-version3 --enable-x11grab
- libavutil 51. 65.100 / 51. 65.100
- libavcodec 54. 45.100 / 54. 45.100
- libavformat 54. 21.100 / 54. 21.100
- libavdevice 54. 2.100 / 54. 2.100
- libavfilter 3. 3.100 / 3. 3.100
- libswscale 2. 1.100 / 2. 1.100
- libswresample 0. 15.100 / 0. 15.100
- libpostproc 52. 0.100 / 52. 0.100
- [x11grab @ 0x2c13440] device: :0.0 -> display: :0.0 x: 0 y: 0 width: 1920 height: 1080
- [x11grab @ 0x2c13440] shared memory extension found
- [x11grab @ 0x2c13440] Estimating duration from bitrate, this may be inaccurate
- Input #0, x11grab, from ':0.0':
- Duration: N/A, start: 1343685102.657378, bitrate: 1990656 kb/s
- Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1920x1080, 1990656 kb/s, 30 tbr, 1000k tbn, 30 tbc
- [video4linux2,v4l2 @ 0x2c203c0] Estimating duration from bitrate, this may be inaccurate
- Input #1, video4linux2,v4l2, from '/dev/video0':
- Duration: N/A, start: 2283.039194, bitrate: 36864 kb/s
- Stream #1:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 320x240, 36864 kb/s, 30 tbr, 1000k tbn, 30 tbc
- [libx264 @ 0x2c244e0] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX
- [libx264 @ 0x2c244e0] profile Constrained Baseline, level 3.0
- [libx264 @ 0x2c244e0] 264 - core 125 r2 d9d2288 - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - 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 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=abr mbtree=0 bitrate=300 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
- Output #0, flv, to 'rtmp://live.justin.tv/app/MyPrivateKey':
- Metadata:
- encoder : Lavf54.21.100
- Stream #0:0: Video: h264 ([7][0][0][0] / 0x0007), yuv420p, 640x360, q=-1--1, 300 kb/s, 1k tbn, 30 tbc
- Stream mapping:
- Stream #0:0 (rawvideo) -> overlay:main
- Stream #1:0 (rawvideo) -> overlay:overlay
- overlay -> Stream #0:0 (libx264)
- Press [q] to stop, [?] for help
- frame= 2224 fps= 25 q=32766.0 Lsize= 2994kB time=00:01:14.13 bitrate= 330.9kbits/s
- video:2951kB audio:0kB subtitle:0 global headers:0kB muxing overhead 1.481149%
- [libx264 @ 0x2c244e0] frame I:9 Avg QP:17.22 size: 45033
- [libx264 @ 0x2c244e0] frame P:2215 Avg QP:18.82 size: 1181
- [libx264 @ 0x2c244e0] mb I I16..4: 100.0% 0.0% 0.0%
- [libx264 @ 0x2c244e0] mb P I16..4: 1.0% 0.0% 0.0% P16..4: 9.2% 0.0% 0.0% 0.0% 0.0% skip:89.7%
- [libx264 @ 0x2c244e0] final ratefactor: 26.65
- [libx264 @ 0x2c244e0] coded y,uvDC,uvAC intra: 58.5% 46.4% 29.7% inter: 3.8% 3.1% 1.0%
- [libx264 @ 0x2c244e0] i16 v,h,dc,p: 27% 61% 4% 8%
- [libx264 @ 0x2c244e0] i8c dc,h,v,p: 44% 32% 15% 9%
- [libx264 @ 0x2c244e0] kb/s:326.00
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement