Comments (23)
Yes - see RTMPStreamPlayer demo sample here
from medialibdemos3x.
Thank you for the response.
My exact requirement is as follows:
I have video from a drone camera(which is the external source) playing on my iPad, I want to stream this video stream live from iPad to a media server such as Wowza.
Can I acheive this using MediaLibDemos3x?
from medialibdemos3x.
Yes - see RTMPStreamPublisher demo sample ))
In ViewController.m set the url of your wowza - and try:
-(void)viewDidLoad {
//[DebLog setIsActive:YES];
[super viewDidLoad];
socket = nil;
upstream = nil;
hostTextField.text = @"rtmp://10.0.1.62:1935/live";
hostTextField.delegate = self;
streamTextField.text = @"teststream";
streamTextField.delegate = self;
}
from medialibdemos3x.
Yes I have successfully tried streaming the iPad camera video to Wowza using MediaLibDemos3x, however I would like to stream the drone video and not the iPad camera video from iPad to Wowza.
from medialibdemos3x.
For your purpose you have to use VIDEO_CUSTOM publisher mode.
Give me your email - I'll send the demo project.
On Tue, Jun 16, 2015 at 6:48 PM, sdave28jul [email protected]
wrote:
Yes I have tried streaming the iPad camera video to Wowza, however I would
like to stream the drone video and not the iPad camera video from iPad to
Wowza.—
Reply to this email directly or view it on GitHub
#27 (comment)
.
from medialibdemos3x.
Please email at [email protected]
from medialibdemos3x.
Thank you for the demo project, can you please provide some more pointers on how I could stream the drone video playing on the ipad using this sample?
from medialibdemos3x.
Hi,
I'm not able to stream to server with mode set to VIDEO_CUSTOM. I tried streaming to wowza with the attached sample but all I see is a black screen on wowza. It would be of great help if you could provide some more pointers.
from medialibdemos3x.
Hi,
I am implementing a new sample just now - I let know when it will be ready
from medialibdemos3x.
Thank you for the response. I already have the H264 video from drone camera playing on my iOS device, hence my requiremnt would be just to stream this video using rtmp and not do any video encoding (as I'm not using the ipad/iphone camera input)
Please let me know if it is in scope of MediaLibDemos3x to stream any video playing on iOS device (not the iOS camera video) to media server.
from medialibdemos3x.
Can you give me the data format that you get from your drone? Can you
represent them in some CoreMedia struct,
CMSampleBuffer or CVImageBuffer, for example?
On Thu, Jun 25, 2015 at 5:58 PM, sdave28jul [email protected]
wrote:
Thank you for the response. I already have the H264 video from drone
camera playing on my iOS device, hence my requiremnt would be just to
stream this video using rtmp and not do any video encoding (as I'm not
using the ipad/iphone camera input)Please let me know if it is in scope of MediaLibDemos3x to stream any
video playing on iOS device (not the iOS camera video) to media server.—
Reply to this email directly or view it on GitHub
#27 (comment)
.
from medialibdemos3x.
Im receiving the video from a Parrot Bebop drone using the follwing iOS sample
https://github.com/BrennanJones/BebopDroneVideoStreaming-iOS
from medialibdemos3x.
Ok,
You can make the following:
- Add somewhere (maybe as RTMP singleton) the same methods as I've made in SquareCamViewController class of SquareCam sample:
//-------------------------------------- IMediaStreamEvent mehods ------------------------------------------------
@interface SquareCamViewController (IMediaStreamEvent)
-(void)connectPublish;
-(void)disconnectPublish;
-(void)startPublish;
-(void)stopPublish;
-(void)sendFrame:(CMSampleBufferRef)sampleBuffer;
@EnD
@implementation SquareCamViewController (IMediaStreamEvent)
-(void)connectPublish {
NSLog(@"ConnectPublish\n");
if (upstream)
return;
MPMediaPublishType publishType = (NO) ? PUBLISH_LIVE : PUBLISH_RECORD;
upstream = [[BroadcastStreamClient alloc] init:@"rtmp://192.168.1.100:1935/live"];
upstream.delegate = self;
[upstream setVideoMode:VIDEO_CUSTOM];
[upstream setAudioMode:AUDIO_OFF];
[upstream stream:@"iPhoneMedia" publishType:publishType];
}
-(void)disconnectPublish {
NSLog(@"disconnectPublish\n");
if (!upstream)
return;
[upstream disconnect];
[upstream release];
upstream = nil;
}
-(void)startPublish {
NSLog(@"startPublish\n");
if (!upstream)
return;
[upstream start];
}
-(void)stopPublish {
NSLog(@"stopPublish\n");
if (!upstream)
return;
[upstream pause];
}
-(void)sendFrame:(CMSampleBufferRef)sampleBuffer {
// Get the frame timestamp
CMTime presentationTimeStamp = CMSampleBufferGetOutputPresentationTimeStamp(sampleBuffer);
int timestamp = presentationTimeStamp.value/(presentationTimeStamp.timescale/1000);
// Send the frame
CVPixelBufferRef pixelBuffer = CMSampleBufferGetImageBuffer(sampleBuffer);
[upstream sendFrame:pixelBuffer timestamp:timestamp];
}
#pragma mark-
#pragma mark IMediaStreamEvent Methods
-(void)stateChanged:(id)sender state:(int)state description:(NSString *)description {
NSLog(@" $$$$$$ <IMediaStreamEvent> stateChangedEvent: %d = %@", (int)state, description);
switch (state) {
case CONN_DISCONNECTED:
{
[self disconnectPublish];
break;
}
case CONN_CONNECTED:
case STREAM_PAUSED:
{
[self startPublish];
break;
}
case STREAM_PLAYING:
{
break;
}
default:
break;
}
}
-(void)connectFailed:(id)sender code:(int)code description:(NSString *)description {
NSLog(@" $$$$$$ <IMediaStreamEvent> connectFailedEvent: %d = %@\n", code, description);
if (code > 0)
[self disconnectPublish];
}
-
In updateVideoViewWithFrame: method of DroneVideoView class you have
CMSampleBufferRef sbRef = NULL;
which is used for frame rendering below:
dispatch_async(dispatch_get_main_queue(),^{
[_videoLayer enqueueSampleBuffer:sbRef];
[_videoLayer setNeedsDisplay];
Thus, sbRef is the structure which you should use for RTMP publishing with sendFrame: method (above)
-(void)sendFrame:(CMSampleBufferRef)sampleBuffer;
Regards,
Slava
from medialibdemos3x.
Hi Slava,
Thankyou, I will try and let you know
from medialibdemos3x.
Hi Slava,
The VIDEO_CUSTOM mode does not seem to work. I have made the changes suggested by you but still I'm neither able to connect nor view the drone video on Wowza with VIDEO_CUSTOM mode. If you have an updated sample, please do share.
from medialibdemos3x.
Hi,
Is there any updated sample with VIDEO_CUSTOM mode successfully working?
Thanks in advance
from medialibdemos3x.
Hi,
Yes, I have done the sample app for VIDEO_CUSTOM mode.
You can get it from github -
https://github.com/slavavdovichenko/MediaLibDemos3x (RTMPPhotoPublish
target).
Also you must update the fixed CommLibiOS.a & MediaLibiOS.a from this repo.
Slava
On Mon, Jun 29, 2015 at 3:02 PM, sdave28jul [email protected]
wrote:
Hi,
Is there any updated sample with VIDEO_CUSTOM mode successfully working?
Thanks in advance
—
Reply to this email directly or view it on GitHub
#27 (comment)
.
from medialibdemos3x.
Hi,
I'm successfully able to stream to Wowza with the RTMPPhotoPublisher sample.
I have made changes in my project for my requirement to stream drone video to Wowza however I see only a black screen when the stream is playing on wowza.
I have mailed you the changes I have made, can you please check and help out?
Thanks in advance.
from medialibdemos3x.
Follwing up, if there is any help possible for above requirement.
from medialibdemos3x.
Hi,
you can try fixed RTMPPhotoPublisher app -> https://github.com/slavavdovichenko/MediaLibDemos3x
from medialibdemos3x.
I think you have to investigate this issue - http://stackoverflow.com/questions/29525000/how-to-use-videotoolbox-to-decompress-h-264-video-stream/29525001#29525001
because to integrate the drone stream with the rtmp stream you need the uncompressed data, thus VTDecompressionSession have to be used.
from medialibdemos3x.
I have decompressed using VTDecompressionSession and tried to stream the CGImageRef. But whats the timeStamp which I have to send along with the CGImageRef
from medialibdemos3x.
When i Run And click on connnect then popup come "connectfailedEvent:fault code = -1 < Input or/and Output Stream is not Opened (-1)">
from medialibdemos3x.
Related Issues (20)
- Low Audio with Real Device HOT 4
- How to stop background music while broadcast or playing VOD?
- Only Audio?
- I need to control the audio channels.
- how to mirror the video from front camera??
- Why in description lib, you don't include it not free? $5000/1 license
- RTMP videos takes too long to load, around 8 to15 seconds to load
- Audio Volume HOT 1
- Crash on Player
- CommLibiOS.a versioning issue HOT 1
- Set Mute to stream HOT 1
- Override default camera stream and use sendSampleBuffer instead?
- Having issue playing video
- Unable to connect
- duplicate symbol OBJC_CLASS$_Subscription in: CommLibiOS.a(Subscription.o)
- Audio conflict when loading two stream windows simultaneously.
- MediaLibDemos3x use Microphone permission ? HOT 1
- hi sir can you give me a contact
- iOS 12 breaks lib
- RTMP Player is not working
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from medialibdemos3x.