Cloudflare Stream ffmpeg error input/output

I use a simple code to stream a .mp4 video to rtmp:…/live

$ ffmpeg -i video.mp4 -f flv -flvflags no_duration_filesize rtmps://<stream_key>

I think the stream key is correct.

The same code to youtube works perfectly.

I tried it adding
-acodec aac -b:a 128k -vcodec libx264
whit the same result.


Error in the push function.
av_interleaved_write_frame(): Input/output error
Error writing trailer of rtmps://<stream_key>: Input/output error

Cloudflare stream dashboard appears as green connected but the player shows a message: Stream has not started yet.

What can be the problem?


Nobody can help?

You can steal my ffmpeg oneliner which works. You probably need to strip out the watermark options and tweak the input devices. Also, this is Windows so you won’t have a use for the dshow devices, unless you use Windows too.

C:\ffmpeg.exe -loglevel info -f dshow -rtbufsize 1024M -i video="Osprey-230 Video Device 1":audio="Osprey-2X0 Audio 1 Balanced" -f image2 -loop 1 -i c:\watermark.png -preset medium -pix_fmt yuv420p -filter_complex "[0] crop=in_w:in_h-144","overlay=10:10" -acodec aac -strict experimental -ar 44100 -ac 2 -b:a 128k -vcodec libx264 -r 30 -b:v 700k -f flv "rtmps://"

Hi, thanks for your help. I did’t see the answer.
I am on mac :grimacing:

But now, making some changes that worked!!
My goal is a video mp4 not the desktop and changing some things it worked.

ffmpeg -loglevel info -rtbufsize 1024M -i thevideo.mp4 -f image2 -loop 1 -i thewatermark.png -preset medium -pix_fmt yuv420p -filter_complex “[0] crop=in_w:in_h-144”,“overlay=10:10” -acodec aac -strict experimental -ar 44100 -ac 2 -b:a 128k -vcodec libx264 -r 30 -b:v 700k -f flv “rtmps://”

Tis worked.