Username:
B
I
U
S
"
url
img
#
code
sup
sub
font
size
color
smiley
embarassed
thumbsup
happy
Huh?
Angry
Roll Eyes
Undecided
Lips Sealed
Kiss
Cry
Grin
Wink
Tongue
Shocked
Cheesy
Smiley
Sad
<- 12345 ->
--
--
List results:
Search options:
Use \ before commas in usernames
torch slug since 2006
oh yeah i've had that too, but forgot to tell you. i was pretty confused when it happened
Has anyone tried this with hashd.tv?  I figure it could work since it uses the same rtmp and stream key mumbo jumbo, but it didn't in the brief time I tried.
torch slug since 2006
yeah streaming to hashd worked. i used this url:
Code:
rtmp://ingest-ams1.hashd.tv/live/djs?key=abc123streamkeygoeshereabc123
HELLO!
Unless you're in Europe I don't imagine the Amsterdam ingest is the best bet. Don't they have one in Dallas?
Edit history:
DJS: 2013-06-25 09:11:26 am
DJS: 2013-06-25 09:10:54 am
torch slug since 2006
oh yeah, yeah you can change that. im in sweden so i used that one. should work the same with dallas.
for your convenience:
Code:
Dallas:
rtmp://ingest-dal1.hashd.tv/live/USERNAME?key=YOURKEY

Amsterdam:
rtmp://ingest-ams1.hashd.tv/live/USERNAME?key=YOURKEY


your stream key can be obtained here:  http://hashd.tv/settings/streams (click Details under the stream you want).
then just throw that into kumari.
Edit history:
presjpolk: 2013-07-15 11:14:18 am
HELLO!
OK so I'm going to go ahead and use Kumari for all my future Twitch and Hashd stuff.  That just leaves Nico.

Nico's catch is the 384kb/s cap for audio + video.

EDIT 3 weeks later Smiley

Now that I've been streaming exclusively with Kumari for a while, I've learned something.  Twitch is apparently really really having trouble pushing out data to some people (not surprising I guess judging by their shameless begging for free peering), and so for some people a 720p stream is a slideshow.

An option to scale down the stream would be great.
interesting. that should be quite easy.
HELLO!
Is Kumari doing CBR?

http://help.twitch.tv/customer/portal/articles/1253460-broadcast-requirements
ah, that's cute. well, i guess i can't say anything.

as for cbr, if it's not then it should be. wild bitrate fluctuations are dumb for streaming. from the ffmpeg code:

Code:
        avcodec_get_context_defaults3(c, *codec);
        c->codec_id = codec_id;

        c->bit_rate = video_bitrate_kbit * 1000;
//        c->rc_max_rate = 1024000;
//        c->rc_buffer_size = 10 * 1000 * 1000;
        c->width    = video_width;
        c->height   = video_height;
        c->time_base.num = 1000;
        c->time_base.den = (int)(video_framerate * 1000.0);
        video_frame_time_ms = ((double)c->time_base.num / (double)c->time_base.den) * 1000.0;
        c->gop_size      = 60; /* emit one intra frame every 60 frames at most */
        c->pix_fmt       = AV_PIX_FMT_YUV420P;
        c->thread_count = 0;

note that those two rate control settings are commented out. i remember playing around with them and not being impressed, but i can't remember any details. from x264 and ffmpeg when streaming starts:

Code:
options: cabac=1 ref=5 deblock=1:0:0 analyse=0x3:0x113 me=umh subme=8 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=7 lookahead_threads=7 sliced_threads=1 slices=7 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=2 keyint=60 keyint_min=6 scenecut=40 intra_refresh=0 rc=abr mbtree=0 bitrate=512 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, flv, to 'rtmp://live.justin.tv/app/live_xxxxxxx_xxxxxxxx':
    Stream #0:0: Video: h264, yuv420p, 640x480, q=-1--1, 512 kb/s, 90k tbn, 30 tbc
    Stream #0:1: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s


http://trac.ffmpeg.org/wiki/x264EncodingGuide#AdditionalInformationTips

looks like i may need to add min and max bitrate with a buffer size. well, i doubt the fluctuations are severe right now. maybe for certain games like old school resident evil when there is a big difference between normal gameplay and fmv cutscenes.
Just curious, would it be a lot of work to support Syphon?  It would enable quick support for CamTwist video in Kumari (although CT has its own issues, but meh).  Syphon seems to produce excellent results with almost no additional CPU loss from my testing.
i took a look at it. it would be the first time i've integrated objective-c into one of my projects but that's not really a big deal. the api seems simple enough. only thing i don't know right now is how to access the pixel data of a specific gl texture given its id. i assume it's some kind of opengl downloading function analogous to uploading a texture for display, just in reverse. the reason it's not already like that is this syphon library is mainly intended for compositing and/or display and not for things that need access to the picture data on the cpu side (such as a streaming app). it's probably not a big deal if you're not using a lot of other programs subscribing to the same stream but it would have been better for them to provide a way for the client to tell the server "also send a pointer to the pixel data in cpu memory". so that way the copy back out of vram would only happen once. but like i said, probably not a big deal if kumari is the only app doing that.
HELLO!
I guess that answers my question, that I keep remembering while I'm streaming but forget at other times, as to whether you'd accept OS-specific code in the form of a patch to allow disabling the screen saver while streaming/recording.
Quote from Some Twitch User:
Are there any planned solutions for mac users? I understand you're working with the most popular Windows software to provide solutions, are you working with supporting Wirecast or FMLE? Neither of those have CBR.


Quote from Jared Rea:
I brought that up this morning. As someone who started streaming by forcing CamTwist to make sweet love to FMLE, I know that it can be difficult to stream on Mac's. We'll see what's possible from our end.


Would you mind if I brought Kumari to his attention?  Seems like all Twitch is aware of is FMLE and Wirecast.  I'd like them to be aware of the 2 newer options on the off chance something good will come of it.
no lol, go for it. it's a bit embarrassing because it's fucking alpha 1 but i will eventually come back around to it.
HELLO!
Well Twitch says my stream quality is Excellent.  So it's apparently CBR enough for them.
Edit history:
presjpolk: 2013-08-24 07:48:57 pm
HELLO!
Dumb question: What libraries and versions are required to build this?

I got as far as getting the thing to build with Qt 5, which mean adding some Widgets includes, and changing the deprecated QDesktopServices::storageLocation(QDesktopServices::DesktopLocation) to QStandardPaths::writableLocation(QStandardPaths::DesktopLocation)

Some searching for missing headers it balked about caused me to go grab the latest ffmpeg, then edited the project file to find my /usr/local/ffmpeg.  But I'm still missing stuff:

Code:
clang: error: no such file or directory: '/usr/local/ffmpeg/lib/libpostproc.a'
clang: error: no such file or directory: '/usr/local/ffmpeg/lib/libmp3lame.a'
clang: error: no such file or directory: '/usr/local/ffmpeg/lib/libfdk-aac.a'
clang: error: no such file or directory: '/usr/local/ffmpeg/lib/libx264.a'


I'm guessing the latter three are separate libraries, but my reading suggests libpostproc is supposed to be part of ffmpeg. Is this a version thing? A configuration thing?

thanks.  Here I just wanted to hack in something to scale down my stream, since Twitch really doesn't like serving 720p to everyone. Smiley  Also I wanted to make the dang thing turn off the screen saver while streaming.
Code:
#mac os x

instdir="/Volumes/2/clanghome/shared"
mkdir -p $instdir


#fdk-aac

brew install automake
brew install libtool

git clone --depth 1 git://github.com/mstorsjo/fdk-aac.git
cd fdk-aac
autoreconf -fiv

CFLAGS="-I$instdir/include -mmacosx-version-min=10.6" \
LDFLAGS="-L$instdir/lib -mmacosx-version-min=10.6" \
./configure \
--prefix=$instdir

make

cp .libs/libfdk-aac.a ~/code/Yua/lib/mac/

make install


#x264

brew install yasm

git clone --depth 1 git://git.videolan.org/x264
cd x264
./configure \
--prefix=$instdir \
--extra-cflags="-I$instdir/include -mmacosx-version-min=10.6" \
--extra-ldflags="-L$instdir/lib -mmacosx-version-min=10.6" \
--disable-gpac \
--disable-lavf \
--disable-ffms \
--enable-shared

make -j 12
cp libx264.a ~/code/Yua/lib/mac/

make install


#ffmpeg

git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg
cd ffmpeg
./configure \
--prefix=$instdir \
--extra-cflags="-I$instdir/include -mmacosx-version-min=10.6" \
--extra-ldflags="-L$instdir/lib -mmacosx-version-min=10.6" \
--enable-nonfree \
--enable-libfdk-aac \
--enable-runtime-cpudetect \
--enable-avresample \
--enable-gpl \
--enable-version3 \
--enable-libx264 \
--enable-shared

make -j 12

find . -name \*.a -exec cp -v {} ~/code/Yua/lib/mac/ \;

make install

#don't forget to move the include files over manually from $instdir!

let me know if you have any questions. you can probably skip fdk-aac since kumari doesn't use it. if you do that, don't forget to remove the reference to it in the ffmpeg configure line.
gah ... lame is missing from those instructions. guess i did it once and forgot about it. afaik it is the official lame built from a tarball downloaded from here.
HELLO!
Thanks. Now I've got something that builds *and* links.  Now I've got to debug it. Smiley

Looks like it's simply going to be some image format issues with the different  Qt version. Because when it runs it looks like attached image, and if I try to stream it crashes

Code:
Thread 0:: Dispatch queue: com.apple.main-thread
0   com.apple.CoreGraphics        	0x00007fff9a90e9e5 CGSConvertRGBX8888toRGBA8888 + 723
1   com.apple.CoreGraphics        	0x00007fff9a735b07 argb32_image + 730
2   libRIP.A.dylib                	0x00007fff93ebc5ac ripl_Mark + 23
3   libRIP.A.dylib                	0x00007fff93eb7536 ripl_BltImage + 1625
4   libRIP.A.dylib                	0x00007fff93eb6c8a ripc_RenderImage + 313
5   libRIP.A.dylib                	0x00007fff93eb478b ripc_DrawImage + 1175
6   com.apple.CoreGraphics        	0x00007fff9a731de7 CGContextDrawImage + 460
7   libqcocoa.dylib               	0x0000000106346896 qt_mac_drawCGImage(CGContext*, CGRect const*, CGImage*) + 262
8   libqcocoa.dylib               	0x000000010632ca51 QCocoaScreen::grabWindow(unsigned long long, int, int, int, int) const + 1041
9   QtGui                         	0x00000001019745d3 QScreen::grabWindow(unsigned long long, int, int, int, int) + 115
10  QtGui                         	0x000000010199d046 QPixmap::grabWindow(unsigned long long, int, int, int, int) + 134
11  com.yourcompany.Kumari        	0x000000010000b711 Kumari::take_screenshot() + 161
12  com.yourcompany.Kumari        	0x000000010001b01a Kumari::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) + 1882
13  QtCore                        	0x0000000101f080c1 QMetaObject::activate(QObject*, int, int, void**) + 2593
14  QtCore                        	0x0000000101f0db02 QSingleShotTimer::timerEvent(QTimerEvent*) + 50
15  QtCore                        	0x0000000101f01143 QObject::event(QEvent*) + 51
16  QtWidgets                     	0x000000010133bca7 QApplicationPrivate::notify_helper(QObject*, QEvent*) + 311
17  QtWidgets                     	0x000000010133d10a QApplication::notify(QObject*, QEvent*) + 794
18  QtCore                        	0x0000000101eda17e QCoreApplication::notifyInternal(QObject*, QEvent*) + 110
19  QtCore                        	0x0000000101f22c21 QTimerInfoList::activateTimers() + 961
20  libqcocoa.dylib               	0x00000001063393b5 QCocoaEventDispatcherPrivate::activateTimersSourceCallback(void*) + 21
21  com.apple.CoreFoundation      	0x00007fff9a403b31 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
22  com.apple.CoreFoundation      	0x00007fff9a403455 __CFRunLoopDoSources0 + 245
23  com.apple.CoreFoundation      	0x00007fff9a4267f5 __CFRunLoopRun + 789
24  com.apple.CoreFoundation      	0x00007fff9a4260e2 CFRunLoopRunSpecific + 290
25  com.apple.HIToolbox           	0x00007fff96fbceb4 RunCurrentEventLoopInMode + 209
26  com.apple.HIToolbox           	0x00007fff96fbcc52 ReceiveNextEventCommon + 356
27  com.apple.HIToolbox           	0x00007fff96fbcae3 BlockUntilNextEventMatchingListInMode + 62
28  com.apple.AppKit              	0x00007fff98ed3533 _DPSNextEvent + 685
29  com.apple.AppKit              	0x00007fff98ed2df2 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128
30  com.apple.AppKit              	0x00007fff98eca1a3 -[NSApplication run] + 517
31  libqcocoa.dylib               	0x000000010633a2cb QCocoaEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 1307
32  QtCore                        	0x0000000101ed7983 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 371
33  QtCore                        	0x0000000101eda705 QCoreApplication::exec() + 357
34  com.yourcompany.Kumari        	0x0000000100006c86 main + 70
35  com.yourcompany.Kumari        	0x0000000100006c34 start + 52


I'll read and bang on it some but if you have any suggestions...

Also everything I'm doing I'm going ahead and putting up here: https://github.com/stevensmedia/kumari

Attachment:
definitely looks like an image format error. i have alignment problems with rgb888 (the 24-bit format) all the time. maybe try changing to one of the rgb32 ones. don't forget to change where the format appears in ffmpeg-ese. should be like AV_PIX_FMT_something.
Edit history:
presjpolk: 2013-08-25 11:10:37 pm
HELLO!
Thanks and duh I should have checked the console output. Yeah this is spewing warnings.  Whelp. Time to get to work.

--

Well I got the display issue fixed.  And I added a screensaver shutoff.

But it's not recording right (I get these 9900 byte files which I'm going to guess are just headers or something), and it still crashes on attempting to stream, and I have no idea why.

So I go to build Qt 4 in case that's the problem, but it errors out, and tells me my OS version is not supported... blah.
it's not qt 4.

did you get all of the image formats changed so they match? there is probably a set for streaming and a set for recording. is ffmpeg printing anything to the console in qt creator? i will definitely have a look myself but i can't promise when it will be exactly.
Edit history:
presjpolk: 2013-08-26 06:48:34 am
presjpolk: 2013-08-26 06:14:41 am
HELLO!
Console's not erroring now.  I'll check again on the image formats.

--

OK, I gut sucked into looking before I work this morning Smiley

Maybe I'm confused, but in Lossless_Recorder::write_video_frame, the first thing it does is *convert* the frame to the format it wants.  So I'm at a loss as to why the original captured format should matter for recording.

RTMP_Broadcaster seeems to dot he same in its write_video_frame.  In fact it's the exact same code:

Code:
    QImage input_frame = video_frames.takeFirst();
    input_frame = input_frame.convertToFormat(QImage::Format_RGB888);


Well I guess if the conversion's failing... I can check that next.
try using something other than rgb888.

i think yua may have been immune to this because i already switched it over to the 32-bit format.
Edit history:
presjpolk: 2013-08-27 04:17:07 pm
HELLO!
Dinked around with that.  But then ID ecided to enable some qDebugs.  I have  A CLUE.

Code:
...
record_frames(); audio_data.size() 0 video_frames.size() 477
record_frames(); audio_data.size() 0 video_frames.size() 478
record_frames(); audio_data.size() 0 video_frames.size() 479
record_frames(); audio_data.size() 0 video_frames.size() 480
record_frames(); audio_data.size() 0 video_frames.size() 481
record_frames(); audio_data.size() 0 video_frames.size() 481


Hmm. Well now that explains a lot. If it's never getting any audio to the recorder then it's not going to record anything.

I'm still working on it. Just thought I'd give an update. Smiley