0

Im trying to stream my desktop to ffsever server with ffmpeg and I discovered that browser does not wont to play H.264 (High profile) videos only main and lowers so I added

-c:v libx264 -profile:v high -level:v 4.0

to my CLI bit Im getting an error

Undefined constant or missing '(' in 'high'

here is my CLI

ffmpeg -probesize 1000M -framerate 60 -video_size 1680x1050 -f x11grab -i :0.0 -f alsa -i default -c:a aac -c:v libx264 -profile:v high http://localhost:8090/feed1.ffm

and here is whole log

Press [q] to stop, [?] for help
[x11grab @ 0x55b5676c39e0] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
[mpeg1video @ 0x55b567710920] [Eval @ 0x7ffe6c87d5d0] Undefined constant or missing '(' in 'high'
[mpeg1video @ 0x55b567710920] Unable to parse option value "high"
[mpeg1video @ 0x55b567710920] Error setting option profile to value high.
Error initializing output stream 0:1 -- Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height
[aac @ 0x55b56771d3e0] Qavg: -nan
[alsa @ 0x55b5676ccc00] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
Conversion failed!

EDIT: So here is my CLI

./ffmpeg -probesize 1000M -framerate 60 -video_size 1680x1050 -f x11grab -i :0.0 -f alsa -i default -c:a aac -c:v libx264 http://localhost:8090/feed1.ffm

And here is mine ffserver.conf

<Stream h264>
Format webm
Feed feed1.ffm
VideoCodec libx264
VideoFrameRate 24
VideoBitRate 100
VideoSize 480x272
#AVPresetVideo default
#AVPresetVideo baseline
AVOptionVideo profile main
PixelFormat yuv420p
#
AudioCodec aac
AudioBitRate 32
AudioChannels 2
AudioSampleRate 22050
AVOptionAudio flags +global_header
</Stream>

and setup like that does not show up video in browser

llogan
  • 63,280

1 Answers1

0

You are encoding with mpeg1video, not libx264.

mpeg1video does not support -profile:v high.

I'm guessing -c:v, and all other output options, are ignored for FFM output and the encoder is determined by VideoCodec in ffserver.conf. (But I was lazy and didn't confirm and have no experience with ffserver.) If you have no VideoCodec set then a default encoder will likely be selected determined by the chosen Format in ffserver.conf.

To your <Stream> section add:

VideoCodec libx264
AudioCodec aac
AVOptionVideo profile main
PixelFormat yuv420p
llogan
  • 63,280