Not able to play recorded mp4 file in iOS 10

Max

Administrator
Staff member
Hello
We have fixed this issue in server build 2361
Try to update
Code:
service webcallserver update 2361
And let us know if you have any issues.
It is under verification now.
 

Ney

Member
Hi Max, After updating to server to build 2361, We are getting green background on recorded video. I am attaching the screen shot of video too. Feel free to move this task to new thread if you think so.
 

Attachments

Max

Administrator
Staff member
Hi,
Could you share your mp4 file?
Looks like it has resolution lower than the background space.
We will check on our end.
 

Max

Administrator
Staff member
We have reproduced the 'green screen' issue under rotation.
So if device has been rotated, the recorded mp4 file can have such green screen artifact, because resolution ratio was changed from X:Y to Y:X during rotation.
Try to lock camera orientation to avoid resolution change.
Here you can see how to lock camera orientation in the default sample MediaDevices:
https://github.com/flashphoner/wcs-...WCSExample/MediaDevices/ViewController.m#L114
Code:
[_localStream lockCameraOrientation];
 

Ney

Member
We did some testing...it appears with wifi as compared to only cellular the more bandwidth ( e.g. Wifi over cellular) the better the chance of a better outcome.
With that said we experienced issues whether it was cellular or broadbandsuch as the green artifact, a black screen on play back or an inability to play back at all.(See below screen shots along with how it was tested)

We are going live soon and would love to use your solution but would need to have these issues debugged in your side no later than end of day Aug 4.
Please let us know.

Here are the 6 tests we ran:

1. WIFI - Recording 1 - got green bar on iOS device (using sdk and on safari browser) but didn't get this issue when viewed over the desktop.

Recording: http://buckwormvideos.com:9091/clie...4-028F8FFE935D-fpm6i1dd0rql35uupi8cfc9v1b.mp4

2. WIFI - Recording 2 - no green bar (also l moved camera less in this)

3. WIFI - Recording 3 - no green bar (Camera movement - medium ) -

4. Cellular - Recording 1 - got green bar on iOS device (using sdk and on safari browser) but didn't get this issue when viewed over the desktop.

Recording: http://buckwormvideos.com:9091/clie...E-B4605EFC275C-i1oma6si8a9bgkomu9hjmrruee.mp4

5. Cellular - Recording 2 - got green bar on iOS device (using sdk and on safari browser) but didn't get this issue when viewed over the desktop.

Recording: http://buckwormvideos.com:9091/clie...4-2A5A039A6358-eltipp7kreeu4nqdg544tmfs3d.mp4

6. Cellular - Recording 3 - didnt get green bar

Recording: http://buckwormvideos.com:9091/clie...6-4099756B4CE8-273d376vpr0icsim7gm17f8qk5.mp4


Thanks!
 

Attachments

Max

Administrator
Staff member
In server build 2397, MP4 file can be played as VoD stream.
Two modes are implemented
- vod: stream for one subscriber only
- vod-live: stream can be played by more than one subscriber
In 'vod' mode, session is closed when file ends, or when playback is stopped.
In 'vod-live' mode, session is closed when file ends, or when vod_live_stream_timeout expires after playback is stopped by all subscribers. (The timeout can be configured in flashphoner.properties and by default is set to 30 seconds: vod_live_stream_timeout=30000)
Stream name for playback should correspondingly be specified as
- vod://fileName.mp4, or
- vod-live://fileName.mp4
Files for playback should be located in WCS_HOME/media directory.

MP4 records from iOS can be played as VoD without the 'green background', e.g. in iOS Player.
Script WCS_HOME/bin/on_record_hook.sh can be used for auto copying of records to WCS_HOME/media.
 

Ney

Member
Hi Max

I am not sure how comment 28 is related to green side bar issue.


In second last line, you had mentioned “MP4 records from iOS can be played as VoD without the 'green background', e.g. in iOS Player.” but we are already have iOS player for recorded video.

could you please explain this a little more.
 

Max

Administrator
Staff member
Hello,

When record is played in a standard iOS player, there will be 'green background' if there was resolution change in the recorded stream.
Now MP4 record can be played as VoD stream from WCS server, for example in iOS SDK sample Player, and there will be no 'green background'.
 

Attachments

Ney

Member
Hello,

1) Currently at the time of playing live stream, we are using url like wss://buckwormvideos.com:8443/<STREAM_NAME>

2) and once the video has been ended, we are playing the recorded file as https://buckwormvideos.com:8888/client/records/<MP4_FILE_NAME>

What I had understood with you above comment, we can play the MP4 with as VOD, means we can use url like

A) wss://buckwormvideos.com:8443/<MP4_STREAM_NAME>.
or
B) vod://buckwormvideos.com:8443/<MP4_STREAM_NAME>

Please confirm.

Also there is a confusion in naming convention (if case of A), if stream name to subscribe the live video is TEST_STREAM_NAME, what would be the name of MP4_STREAM_NAME ?
 

Max

Administrator
Staff member
Currently at the time of playing live stream, we are using url like wss://buckwormvideos.com:8443/<STREAM_NAME>
No. These two is not a part of one URL.
1. You have to conect to:
wss://buckwormvideos.com:8443
2. Then play stream with name:
<STREAM_NAME>
and once the video has been ended, we are playing the recorded file as https://buckwormvideos.com:8888/client/records/<MP4_FILE_NAME>
Correct
What I had understood with you above comment, we can play the MP4 with as VOD, means we can use url like
No.
1. You have to connect to:
wss://buckwormvideos.com:8443
2. Then play stream with name:
Code:
vod://<MP4_FILE_NAME>
3. The <MP4_FILE_NAME> should be placed in WCS_HOME/media directory.
if stream name to subscribe the live video is TEST_STREAM_NAME, what would be the name of MP4_STREAM_NAME ?
By default, TEST_STREAM_NAME is mapped to random mp4 file.
1. Application will receive notification with file name once the recording is complete.
Example: https://wcs5-eu.flashphoner.com/client2/examples/demo/streaming/stream_recording/recording.html
2. WCS_HOME/bin/on_record_hook.sh will be executed once the recording is complete.
You have to change this hook script to move files from WCS_HOME/records to WCS_HOME/media
or you can setup symlink
Code:
rm -rf WCS_HOME/media
ln -sf WCS_HOME/records WCS_HOME/media
then recorded mp4 files will be available from WCS_HOME/media directory

You can also configure record name policy in WCS_HOME/conf/flashphoner.properties
Code:
stream_record_policy=streamName
The 'streamName' policy means <STREAM_NAME>.mp4 will be recorded.
For example, if you publish stream with name 'cat', then 'cat.mp4' file will be recorded in WCS_HOME/records.

Therefore you can:
1. Set stream_record_policy=streamName
2. Set symlink media -> records
3. Play stream: vod://cat.mp4
Here cat.mp4 should be located in WCS_HOME/media
4. Use unique stream names to avoid conflicts.
 
Last edited:

Ney

Member
Hi Max

After we do this, will we have the ability for a user to use their device (e.g smartphone) to CLEANLY with no / very minimal latency to cleanly live steam video to one or many app users on similar or different platforms ( e.g. iOS to android etc)
 

Max

Administrator
Staff member
Low-latency streaming works out of the box, regardless the recording feature.
Yes, you will able to stream between these three platforms with low sub-second latency:
  • Android apps
  • iOS apps
  • WebRTC browsers (Chrome, Firefox, Edge, Safari 11)
 

Ney

Member
HI Max

Now we are playing the recorded video as VOD. its good so far. But now we need to show slider so that user can to know how long the recording is for and how far we are currently into watching it.

But I am not seeing any property to manage this. Could you please help me with properties name, so that we can achieve this.

Also how can we pause the recording, so that user can resume the video from the position, where he has left. Currently we have only the stop feature.
 
Last edited:

Max

Administrator
Staff member
The WebRTC VOD playback does not have any controls such as pause/resume, playback duration line.
It was a workaround for playback mp4 file containing several different resolutions, produced by WebRTC stream.
So you can't display additional controls using this implementation.
Options
1. You can transcode mp4 file on servers side to be able to play by standard iOS playback components.
2. You can record streams using ffmpeg libs for iOS just sending RTMP stream to WCS server: rtmp://host:1935/live streamName
RTMP does not change video resolutions unlike WebRTC.
 

Ney

Member
HI Max

In case, recording has got been deleted from server. is there any way to get detected through stream object, if we are playing the recording through VOD. I had checked the stream object, but I am not seeing any difference is properties in this case ?
 

Ney

Member
Hi Max, any update on this ? Is there any way to check if file is exists on server or not ?
 

Max

Administrator
Staff member
Hello,

Currently, playback will just fail if requested file is not available. Planning to specify failure reason in StreamStatusEvent, will inform when there is an update.
 

Max

Administrator
Staff member
Starting from WCS v. 2840, StreamStatusEvent will contain info "File not found" if requested file is not available.
Code:
stream.getInfo()
can be used to get it, as in the Two-way Streaming example.
file_not_found.jpg
 
Top