0

I am trying to stream h265 video to aws s3 from ffmpeg, here is the command that i use:

ffmpeg -f gdigrab -i desktop -r 1 -vframes 5 -c:v libx265 -crf 40 -f mp4 pipe:1 | aws s3 cp -  s3://videosbuket-009212/d5.mp4

and error information:

[mp4 @ 000001c49541bb40] muxer does not support non seekable output
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:0 --

what's wrong here?

herb
  • 139
  • 8
  • i wonder if it is possible to stream h265 at all... – herb Jun 22 '20 at 05:34
  • btw, `-f hevc` completes without error, but generated video file cannot play in vlc and other players. – herb Jun 22 '20 at 05:51
  • also tried `-f mp4 -movflags frag_keyframe+empty_moov`, it completes without error, but uploaded video can't play neither. – herb Jun 22 '20 at 06:07

1 Answers1

1

What’s wrong is that mp4 does not support non seekable output. Just like the error reads. Use a format that doesn’t not requires seeking, like mkv. If you require mp4, then you must make a local copy first.

szatmary
  • 29,969
  • 8
  • 44
  • 57
  • `[NULL @ 000002a8d8f1c200] Requested output format 'mkv' is not a suitable output format pipe:1: Invalid argument`, i finally make -f hevc work by upgrading to latest vlc... – herb Jun 23 '20 at 02:09