Advertisement
Guest User

FFmpeg Two Outputs

a guest
Oct 2nd, 2013
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.00 KB | None | 0 0
  1. FFmpeg bash script:
  2. #! /bin/bash
  3. clear
  4.  
  5. INRES="$1"
  6. OUTRES="$2"
  7. FPS="$3"
  8. QUAL="$4"
  9.  
  10. STREAM="$5"
  11.  
  12. avconv \
  13. -f x11grab -s $INRES -r $FPS -i :0.0 \
  14. -f alsa -ac 2 -i pulse \
  15. -vcodec libx264 -s $OUTRES -preset $QUAL \
  16. -acodec libmp3lame -ar 44100 -threads 6 -qscale 3 -b 712000 -bufsize 512k \
  17. -f flv $STREAM
  18. -c copy flv rtmp://127.0.0.1/live/myStream
  19.  
  20. And the output:
  21. ERROR> TERM environment variable not set.
  22. ERROR> avconv version 0.8.6-6:0.8.6-1ubuntu2, Copyright (c) 2000-2013 the Libav developers
  23. ERROR> built on Mar 30 2013 22:20:06 with gcc 4.7.2
  24. ERROR> [x11grab @ 0x190ff20] device: :0.0 -> display: :0.0 x: 0 y: 0 width: 1920 height: 1080
  25. ERROR> [x11grab @ 0x190ff20] shared memory extension found
  26. ERROR> [x11grab @ 0x190ff20] Estimating duration from bitrate, this may be inaccurate
  27. ERROR> Input #0, x11grab, from ':0.0':
  28. ERROR> Duration: N/A, start: 1380737281.928002, bitrate: 1990656 kb/s
  29. ERROR> Stream #0.0: Video: rawvideo, bgra, 1920x1080, 1990656 kb/s, 30 tbr, 1000k tbn, 30 tbc
  30. ERROR> [alsa @ 0x191fea0] capture with some ALSA plugins, especially dsnoop, may hang.
  31. ERROR> [alsa @ 0x191fea0] Estimating duration from bitrate, this may be inaccurate
  32. ERROR> Input #1, alsa, from 'pulse':
  33. ERROR> Duration: N/A, start: 1380737281.976920, bitrate: N/A
  34. ERROR> Stream #1.0: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
  35. Stream started
  36. Using network protocols without global network initialization. Please use avformat_network_init(), this will become mandatory later.
  37. Using network protocols without global network initialization. Please use avformat_network_init(), this will become mandatory later.
  38. [tcp @ 0x7f1c7000d440] TCP connection to 127.0.0.1:1935 failed: Connection refused
  39. [rtmp @ 0x7f1c7000d380] Cannot open connection tcp://127.0.0.1:1935
  40. [0x7f1c70002728] access_avio access error: Failed to open rtmp://127.0.0.1/live/myStream: Input/output error
  41. [0x7f1c882dc568] main input error: open of `rtmp://127.0.0.1/live/myStream' failed
  42. [0x7f1c882dc568] main input error: Your input can't be opened
  43. [0x7f1c882dc568] main input error: VLC is unable to open the MRL 'rtmp://127.0.0.1/live/myStream'. Check the log for details.
  44. ERROR> Incompatible pixel format 'bgra' for codec 'libx264', auto-selecting format 'yuv420p'
  45. ERROR> [buffer @ 0x1944020] w:1920 h:1080 pixfmt:bgra
  46. ERROR> [scale @ 0x1944640] w:1920 h:1080 fmt:bgra -> w:1280 h:720 fmt:yuv420p flags:0x4
  47. ERROR> [libx264 @ 0x18f9c80] VBV maxrate unspecified, assuming CBR
  48. ERROR> [libx264 @ 0x18f9c80] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX XOP FMA4 SSEMisalign LZCNT
  49. ERROR> [libx264 @ 0x18f9c80] profile Main, level 3.1
  50. ERROR> [libx264 @ 0x18f9c80] 264 - core 123 r2189 35cf912 - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=1 ref=5 deblock=1:0:0 analyse=0x1:0x111 me=umh subme=8 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=0 b_adapt=2 b_bias=0 direct=3 weightb=0 open_gop=1 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=50 rc=cbr mbtree=1 bitrate=712 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=712 vbv_bufsize=512 nal_hrd=none ip_ratio=1.25 aq=1:1.00
  51. ERROR> Output #0, flv, to 'rtmp://live.justin.tv/app/live_43015865_5v2oVp3jgaSlVfFJQidrmC76aYKnoE':
  52. ****NOTE**** Apparently it is NOT putting out two outputs?
  53. ERROR> Metadata:
  54. ERROR> encoder : Lavf53.21.1
  55. ERROR> Stream #0.0: Video: libx264, yuv420p, 1280x720, q=-1--1, 712 kb/s, 1k tbn, 30 tbc
  56. ERROR> Stream #0.1: Audio: libmp3lame, 44100 Hz, 2 channels, s16, 712 kb/s
  57. ERROR> Stream mapping:
  58. ERROR> Stream #0:0 -> #0:0 (rawvideo -> libx264)
  59. ERROR> Stream #1:0 -> #0:1 (pcm_s16le -> libmp3lame)
  60. ERROR> Press ctrl-c to stop encoding
  61. ERROR> frame= 17 fps= 0 q=0.0 size= 0kB time=10000000000.00 bitrate= 0.0kbits/s dup=0 drop=7
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement