Video player plays flv with error flv: Unsupported audio codec IDX: 7

1、 Detailed error reporting information is as follows:

[TransmuxingController] > DemuxException: type = CodecUnsupported, info = Flv: Unsupported audio codec idx: 7
Uncaught (in promise) Error: Unhandled error. (undefined)
    at EventEmitter.emit (events.js:135)
    at EventEmitter.eval (flv-player.js:453)
    at EventEmitter.emit (events.js:144)
    at eval (transmuxer.js:729)

Flv: Unsupported audio codec.

2、 Solution

Analysis: there is no error in the front end
reason: Google does not prohibit video, but audio, but the video contains audio information, so it depends on whether the playback stream contains audio operations

Here, modify the streaming command to solve the problem:
Original:

ffmpeg -i rtsppath -vcodec copy -s 704x576 -acodec copy -f flv rtmp:/****/rtmplive/test

After modification:

ffmpeg -i rtsppath -vcodec copy -an -s 704x576 -acodec copy -f flv rtmp:/****/rtmplive/test

3、 Summary

when ffmpeg streaming is used, the audio coding is forced to AAC format.

Read More: