[FFmpeg-user] Using SDL with live stream

Gil Yoder gil.yoder at oabs.org
Sun Apr 2 01:04:09 EEST 2017


Moritz,

Thanks for responding to my question, and please accept my apologies for not being clear.

You wrote,

"Wouldn't it be interesting for us to know what that error message is?
In other words, command line and complete, uncut console output missing. (And, when producing that for us, please omit "-hide_banner".)"

Here is the output after adding "-f sdl bla" to my command:

C:\Users\Gil>ffmpeg -hide_banner -f dshow -sample_rate 11025 -video_size qvga -i video="HP Deluxe Webcam KQ246AA":audio="Microphone (Logitech USB Headset)" -f flv -b:v 96K -b:a 16K -vf fps=fps=15 rtmp://***.*****.***/live/yoder -f sdl "title"
Guessed Channel Layout for Input Stream #0.1 : stereo
Input #0, dshow, from 'video=HP Deluxe Webcam KQ246AA:audio=Microphone (Logitech USB Headset)':
  Duration: N/A, start: 175840.430000, bitrate: N/A
    Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 320x240, 30 fps, 30 tbr, 10000k tbn, 10000k tbc
    Stream #0:1: Audio: pcm_s16le, 11025 Hz, stereo, s16, 352 kb/s
[dshow @ 00000000025436c0] real-time buffer [HP Deluxe Webcam KQ246AA] [video input] too full or near too full (75% of size: 3041280 [rtbufsize parameter])! frame dropped!
    Last message repeated 1 times
[dshow @ 00000000025436c0] real-time buffer [HP Deluxe Webcam KQ246AA] [video input] too full or near too full (85% of size: 3041280 [rtbufsize parameter])! frame dropped!
    Last message repeated 1 times
[dshow @ 00000000025436c0] real-time buffer [HP Deluxe Webcam KQ246AA] [video input] too full or near too full (95% of size: 3041280 [rtbufsize parameter])! frame dropped!
    Last message repeated 2 times
[dshow @ 00000000025436c0] real-time buffer [HP Deluxe Webcam KQ246AA] [video input] too full or near too full (101% of size: 3041280 [rtbufsize parameter])! frame dropped!
    Last message repeated 13 times
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> flv1 (flv))
  Stream #0:1 -> #0:1 (pcm_s16le (native) -> mp3 (libmp3lame))
  Stream #0:0 -> #1:0 (rawvideo (native) -> rawvideo (native))
Press [q] to stop, [?] for help
Output #1, sdl,sdl2, to 'title':
  Metadata:
    encoder         : Lavf57.67.100
    Stream #1:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 320x240, q=2-31, 36864 kb/s, 30 fps, 30 tbn, 30 tbc
    Metadata:
      encoder         : Lavc57.86.103 rawvideo
av_interleaved_write_frame(): Operation not permitted
Finishing stream 0:1 without any data written to it.
Output #0, flv, to 'rtmp://bbb.oabs.org/live/yoder':
  Metadata:
    encoder         : Lavf57.67.100
    Stream #0:0: Video: flv1 (flv) ([2][0][0][0] / 0x0002), yuv420p, 320x240, q=2-31, 96 kb/s, 15 fps, 1k tbn, 15 tbc
    Metadata:
      encoder         : Lavc57.86.103 flv
    Side data:
      cpb: bitrate max/min/avg: 0/0/96000 buffer size: 0 vbv_delay: -1
    Stream #0:1: Audio: mp3 (libmp3lame) ([2][0][0][0] / 0x0002), 11025 Hz, stereo, s16p, 16 kb/s
    Metadata:
      encoder         : Lavc57.86.103 libmp3lame
[flv @ 00000000025f3c00] Failed to update header with correct duration.
[flv @ 00000000025f3c00] Failed to update header with correct filesize.
frame=    0 fps=0.0 q=0.0 Lq=-0.0 size=       0kB time=00:00:00.93 bitrate=   2.8kbits/s speed=8.44x
video:150kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
real-time buffer [HP Deluxe Webcam KQ246AA] [video input] too full or near too full (101% of size: 3041280 [rtbufsize parameter])! frame dropped!
[dshow @ 00000000025436c0] real-time buffer [HP Deluxe Webcam KQ246AA] [video input] too full or near too full (101% of size: 3041280 [rtbufsize parameter])! frame dropped!
Conversion failed!

> And what did you do to produce SDL output?

I tried several things, but basically what you suggested. Sometimes I moved it to be the first output rather than the last.

> How can I modify the arguments to see the video with SDL?

Just add "-f sdl bla" to the very end of the command line.

As you can see above, "-f sdl bla" at the end of the line didn't work. FWIW without sdl my command works flawlessly until ended with ctrl-C. As you can see here:

C:\Users\Gil>ffmpeg -hide_banner -f dshow -sample_rate 11025 -video_size qvga -i video="HP Deluxe Webcam KQ246AA":audio="Microphone (Logitech USB Headset)" -f flv -b:v 96K -b:a 16K -vf fps=fps=15 rtmp://***.****.***/live/yoder
Guessed Channel Layout for Input Stream #0.1 : stereo
Input #0, dshow, from 'video=HP Deluxe Webcam KQ246AA:audio=Microphone (Logitech USB Headset)':
  Duration: N/A, start: 176230.584000, bitrate: N/A
    Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 320x240, 30 fps, 30 tbr, 10000k tbn, 10000k tbc
    Stream #0:1: Audio: pcm_s16le, 11025 Hz, stereo, s16, 352 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> flv1 (flv))
  Stream #0:1 -> #0:1 (pcm_s16le (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
Output #0, flv, to 'rtmp://bbb.oabs.org/live/yoder':
  Metadata:
    encoder         : Lavf57.67.100
    Stream #0:0: Video: flv1 (flv) ([2][0][0][0] / 0x0002), yuv420p(progressive), 320x240, q=2-31, 96 kb/s, 15 fps, 1k tbn, 15 tbc
    Metadata:
      encoder         : Lavc57.86.103 flv
    Side data:
      cpb: bitrate max/min/avg: 0/0/96000 buffer size: 0 vbv_delay: -1
    Stream #0:1: Audio: mp3 (libmp3lame) ([2][0][0][0] / 0x0002), 11025 Hz, stereo, s16p, 16 kb/s
    Metadata:
      encoder         : Lavc57.86.103 libmp3lame
frame=   34 fps=0.0 q=11.7 size=      99kB time=00:00:03.06 bitrate= 264.3kbits/
frame=   42 fps= 41 q=8.6 size=      99kB time=00:00:03.60 bitrate= 225.2kbits/s
frame=   49 fps= 32 q=8.8 size=     159kB time=00:00:04.06 bitrate= 319.6kbits/s
frame=   58 fps= 29 q=10.8 size=     159kB time=00:00:04.66 bitrate= 278.5kbits/
frame=   64 fps= 25 q=9.2 size=     159kB time=00:00:05.06 bitrate= 256.5kbits/s
frame=   72 fps= 24 q=9.4 size=     159kB time=00:00:05.60 bitrate= 232.1kbits/s
frame=   79 fps= 22 q=8.8 size=     209kB time=00:00:06.06 bitrate= 282.2kbits/s
frame=   88 fps= 22 q=9.9 size=     209kB time=00:00:06.66 bitrate= 256.8kbits/s
frame=   94 fps= 21 q=9.1 size=     209kB time=00:00:07.06 bitrate= 242.3kbits/s
frame=  102 fps= 20 q=9.1 size=     209kB time=00:00:07.60 bitrate= 225.3kbits/s
frame=  109 fps= 20 q=8.3 size=     274kB time=00:00:08.06 bitrate= 278.2kbits/s
frame=  118 fps= 20 q=9.2 size=     274kB time=00:00:08.66 bitrate= 259.0kbits/s
frame=  124 fps= 19 q=9.9 size=     274kB time=00:00:09.06 bitrate= 247.6kbits/s
frame=  132 fps= 19 q=9.5 size=     274kB time=00:00:09.60 bitrate= 233.8kbits/s
frame=  139 fps= 18 q=10.8 size=     324kB time=00:00:10.06 bitrate= 263.8kbits/
frame=  148 fps= 18 q=10.3 size=     324kB time=00:00:10.66 bitrate= 249.0kbits/
[flv @ 0000000000e83900] Failed to update header with correct duration.
[flv @ 0000000000e83900] Failed to update header with correct filesize.
frame=  148 fps= 18 q=10.3 Lsize=     363kB time=00:00:10.66 bitrate= 278.9kbits/s speed=1.32x
video:338kB audio:20kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.577558%
Exiting normally, received signal 2.

Gil



More information about the ffmpeg-user mailing list