0

lets say i have 10 video files, encoded with the following command in ffmpeg

ffmpeg -i input.mp4 -c:v libx264 -preset medium -maxrate 6000k -bufsize 6000k -vf "scale=1280:-1,format=yuv420p" -g 50 -c:a aac -b:a 128k -ac 2 -ar 44100 file.flv

now that all files match in codec, what i want to do is stream all those files via RTMP. for that, I'll need to create a concat list. i also want the stream to infinitely repeat those 10 files. to do all these things, I use this command:

ffmpeg -threads 2 -re -fflags +genpts -stream_loop -1 -i mylist.txt -c copy -f flv rtmp://link.to/RTMP

when doing that, I get the following error output:

 ffmpeg -threads 2 -re -fflags +genpts -stream_loop -1 -i mylist.txt -c copy -f flv rtmp://link.to/RTMP
ffmpeg version 3.4.4-0ubuntu0.18.04.1 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
  configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
Input #0, tty, from 'mylist.txt':
  Duration: 00:00:00.24, bitrate: 40 kb/s
    Stream #0:0: Video: ansi, pal8, 640x400, 25 fps, 25 tbr, 25 tbn, 25 tbc
[flv @ 0x560ec7662920] ***Video codec ansi not compatible with flv
Could not write header for output file #0 (incorrect codec parameters ?): Function not implemented***
Stream mapping:
  Stream #0:0 -> #0:0 (copy)

ffmpeg is giving me the error Video codec ansi not compatible with flv Could not write header for output file #0 (incorrect codec parameters ?): Function not implemented what am i doing wrong? thanks for the help.

0

The extension txt signals ffmpeg to use the teletype demuxer, although, for security reasons, this was recently changed and the demuxer has to be expressly set.

Concat demuxer will be used if file extension is ffconcat. For other extensions, format has to be expressly set, so

ffmpeg -threads 2 -re -fflags +genpts -f concat -stream_loop -1 -i mylist.txt ...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.