Wowza Community

FFMPEG publish Desktop Screen and play with IOS devices

Hi,

i use the following command to publish my desktop screen to wowza. I use the Example Application LiveVideoStreaming for this case.

ffmpeg -f x11grab -s `xdpyinfo | grep 'dimensions:'|awk '{print $2}'` -i :0.0 -vcodec libx264 -b 300k -r 25 -g 48 -f flv "rtmp://myadress:1935/live/desktop"

It works great when i open VLC and play: rtsp://myadress:1935/live/desktop

Now when I try to open the stream with an IOS Device or Apple Quicktime nothing happens. Quicktime says “Loading movie…” and iOS returns after 1 seconds saying unable to open the stream

http://myaddress:1935/live/desktop/playlist.m3u8

Any idea?

The output from wowza:

INFO session connect-pending 91.34.109.122 -

INFO session connect 91.34.109.122 -

INFO stream create - -

INFO stream publish desktop -

INFO server comment - LiveStreamPacketizerSanJose.endChunkTS[live/definst/desktop]: Add chunk: id:6 a/v/k:0/241/5 duration:9800

INFO server comment - LiveStreamPacketizerCupertino.endChunkTS[live/definst/desktop]: Add chunk: id:6 mode:TS a/v/k:0/240/5 duration:9800

INFO cupertino connect 1359404638 -

INFO stream create desktop -

INFO stream play desktop -

INFO server comment - LiveStreamPacketizerSanJose.endChunkTS[live/definst/desktop]: Add chunk: id:7 a/v/k:0/241/5 duration:9880

INFO server comment - LiveStreamPacketizerCupertino.endChunkTS[live/definst/desktop]: Add chunk: id:7 mode:TS a/v/k:0/240/5 duration:9880

INFO server comment - LiveStreamPacketizerSanJose.endChunkTS[live/definst/desktop]: Add chunk: id:8 a/v/k:0/241/5 duration:10480

INFO server comment - LiveStreamPacketizerCupertino.endChunkTS[live/definst/desktop]: Add chunk: id:8 mode:TS a/v/k:0/240/5 duration:10480

No error msgs? I don’t see it disconnecting. You can post the output of ffprobe -show_streams rtsp://myadress:1935/live/desktop

Can you play via the rtmp URL in the Wowza LiveVideStreaming example?

The video is using High Profile. You want Baseline Profile, Level 3

Richard

Great, glad it’s working. Thanks for the update

Richard

No error msgs? I don’t see it disconnecting. You can post the output of ffprobe -show_streams rtsp://myadress:1935/live/desktop

Can you play via the rtmp URL in the Wowza LiveVideStreaming example?

Here is the ffprobe output:

[rtsp @ 0xa8b0620] Estimating duration from bitrate, this may be inaccurate

Input #0, rtsp, from ‘rtsp://myadress:1935/live/desktop’:

Metadata:

title : desktop

Duration: N/A, start: 0.022018, bitrate: N/A

Stream #0:0: Audio: aac, 44100 Hz, stereo, s16

Stream #0:1: Video: h264 (High 4:4:4 Predictive), yuv420p, 728x438, 24 tbr, 90k tbn, 180k tbc

[STREAM]

index=0

codec_name=aac

codec_long_name=AAC (Advanced Audio Coding)

profile=unknown

codec_type=audio

codec_time_base=1/44100

codec_tag_string=[0][0][0][0]

codec_tag=0x0000

sample_fmt=s16

sample_rate=44100

channels=2

bits_per_sample=0

id=N/A

r_frame_rate=0/0

avg_frame_rate=0/0

time_base=1/44100

start_time=0.022018

duration=N/A

bit_rate=N/A

nb_frames=N/A

nb_read_frames=N/A

nb_read_packets=N/A

[/STREAM]

[STREAM]

index=1

codec_name=h264

codec_long_name=H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10

profile=High 4:4:4 Predictive

codec_type=video

codec_time_base=1/180000

codec_tag_string=[0][0][0][0]

codec_tag=0x0000

width=728

height=438

has_b_frames=2

sample_aspect_ratio=0:1

display_aspect_ratio=0:1

pix_fmt=yuv420p

level=30

timecode=N/A

is_avc=0

nal_length_size=0

id=N/A

r_frame_rate=24/1

avg_frame_rate=0/0

time_base=1/90000

start_time=0.304000

duration=N/A

bit_rate=N/A

nb_frames=N/A

nb_read_frames=N/A

nb_read_packets=N/A

[/STREAM]

My iPhone just says: “The operation could not be completed”. There’s a disconnect for the cuppertino device after 20 seconds (maybe a timeout).

Any idea?

The video is using High Profile. You want Baseline Profile, Level 3

Richard

Thanks Richard,

now it works!