Ffmpeg error with video stream

Asked

Viewed 298 times

6

I’m trying to stream using a webcam as data input with Ffmpeg, but I need that in addition to the stream it record a video. The two features with the same command for a few minutes.

(If placed separately the recording code works perfectly already the streaming does not work and presents the same error.)

I did the test with two different code versions and got the same error regarding the streaming output URL.

It is also important to say that everything is all right with the server.

Ffmpeg:

ffmpeg -f dshow -rtbufsize 2048M -i "video=Integrated Webcam" -t 300 -c:v libx264 
-segment_atclocktime 1 -segment_format mp4 meuvideo.mp4 -f mpegts -q:v 5 -codec:v 
mpeg1video https://urlexemplo.com.br:8081/rota

Log:

    ffmpeg started on 2017-11-20 at 15:52:22
Report written to "ffmpeg-20171120-155222.log"

ffmpeg version 3.3.3 Copyright (c) 2000-2017 the FFmpeg developers

built with gcc 7.1.0 (GCC)
  configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib

  libavutil      55. 58.100 / 55. 58.100
  libavcodec     57. 89.100 / 57. 89.100
  libavformat    57. 71.100 / 57. 71.100
  libavdevice    57.  6.100 / 57.  6.100
  libavfilter     6. 82.100 /  6. 82.100
  libswscale      4.  6.100 /  4.  6.100

libswresample   2.  7.100 /  2.  7.100
  libpostproc    54.  5.100 / 54.  5.100

Input #0, dshow, from 'video=Integrated Webcam':
  Duration: N/A, start: 9581.085000, bitrate: N/A

Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 640x480, 30 fps, 30 tbr, 10000k tbn, 10000k tbc

https://urlexemplo.com.br:8081/rota: Unknown error

(The application is being written with Node.js and Electron)

I executed the -report command and generated a report. You can’t paste it directly here because it is too big, it can be found in the link:

https://www.dropbox.com/s/ow76gddst98iolt/ffmpeg-20171120-155222.log?dl=0

Regardless of how I write Ffmpeg code always gives error in output url. Is there a specific way to stream video with HTTP? Any missing commands that justify the error?


Edit 1:

To test, I put the address udp://@xxx.x.x.x:1234 (xxx.x.x.x -> IP) in place of the url and the command rotated, watched streaming with VLC and he still recorded the video appropriately during the requested five minutes.

The doubt remains: Is there a special parameter to work with HTTP addresses?

  • 1

    From the log there seems to be nothing wrong with the command itself... The listening server at port :3030 is a re-lay or a client direct? Is it in the air? You said the recording code works by itself, the stream also works by itself?

  • Yes, the server is in the air and not the stream code does not work by itself it displays the same error. "Unknown error" in the url

  • In case you can record what’s on the webcam, right? The problem happens when inserting the second stream, right?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.