ofVideoPlayer enigma

Trying to get streams to open in openFrameworks. I open them fine from linux command line:
“totem http://206.222.31.146/mega
“totem http://206.222.31.146/skai
as well as on vlc but when I open them in openFrameworks nothing happens. Any ideas? This is the code I run (also found here in zip) :
testApp.h:

#pragma once
#include "ofMain.h"
#include "ofxOpenCv.h"
class testApp : public ofBaseApp{
	public:
		void setup();
		void update();
		void draw();
		ofVideoPlayer streamsArray;
};

testApp.cpp:

#include "testApp.h"
void testApp::setup()
{
    ofBackground(0);
    ofSetVerticalSync(true);
    streamsArray.loadMovie("http://206.222.31.146/mega");
    streamsArray.play();
}
void testApp::update()
{
     streamsArray.update();
}
void testApp::draw()
{
    ofSetHexColor(0xFFFFFF);
    streamsArray.draw(0, 0, 640, 480);
}

main.cpp:

#include "ofMain.h"
#include "testApp.h"
int main( ){
	ofSetupOpenGL(640,480, OF_WINDOW);			// <-------- setup the GL context
	ofRunApp( new testApp());
}

Have been hitting my head against the wall for over a week. Any help much appreciated. Other streams ending in m3u8 play fine. Can’t figure why a whole range of streams such as the above play fine in totem (which uses GStreamer) and fail to play in ofx. Please help a noobie desesperado :smile:

The default video player on the mac is Quicktime based - can Quicktime play those URLS?

i tried this when you posted about it and it seems gstreamer can figure out the stream type, i think i might need to modify the videoplayer so it waits till the stream is buffered to try to guess the format. probably some streams transmit the format right at the beginning and for others you need to get more bytes to actually get it. i would need to try but haven’t had time to give it a try

Getting closer :).

I worked on Arturo’s hypothesis and setup a small python server to transcode the stream rather than take the live feed directly. So:
live stream --> my live stream —> ofx

avconv -re -i xmas.mov -f flv rtmp://localhost:1935/live/

now I point VLC to http://localhost:1935/live/ and it loads my live stream. Ofx still does nothing. What type of encoding should I do in avconv (fork of ffmpeg) so that ofx is happy?

thanks

i’ve been looking into it and it seems that if you use mms:// instead of http:// it just works no need to transcode the stream

Thank A,
another reason for transcoding is because the stream has issues with the ofxVideoPlayer can’t get over, but the ffmpeg transcoder manages to handle more gracefully and gives a much “smoother” stream to ofxPlayer. If you notice for example with one of the two streams (http://206.222.31.146/mega)
but after 5-6 seconds it freezes. It is at that point that VLC also reports:

[0x7f6ee4005b08] main input error: ES_OUT_RESET_PCR called
[wmv3 @ 0x7f6ec80fcaa0] warning: first frame is no keyframe

the image becomes mangled for a few frames but VLC recovers. ofx doesn’t. I hoped that transcoding would resolve it that’s why I asked for an input that ofVideoPlayer would be able to handle so that I encode just in that.

Thanks for all your time :).
tp

then you might be able to play it by using mms:// pointing to the transcoding server address instead of http://