I used nginx to build a simple flv and mp4 streaming media server. When playing a certain mp4, there is only image and no sound, but there is sound when playing it directly locally. What may be the reason?
PHP中文网2017-05-16 17:25:31
How to troubleshoot:
1. Can the browser directly open the file you have online (such as visiting http://xxx.com/a.mp4)? Can I download or play it directly through the url? Chrome and Firefox will not judge cross-domain issues, but IE and Safari have access restrictions. You first need to visit the URL of the MP4 resource in each browser to see what the HTTP response is.
2. On the basis of 1, if (a) cannot be accessed, then it must be an nginx configuration error, and tail nginx log troubleshooting (usually there is no chmod permission). (b) If only some browsers have problems, it may be a cross-domain problem, and Google search will solve it. (c) If you can all access it, then there is a problem with the configuration of your media player. Troubleshoot. If it doesn't work, just change the player.
大家讲道理2017-05-16 17:25:31
If there are no problems with the encoding and player, the problem may occur on the network. If the network speed is too slow, such a problem may occur, because streaming media is divided into video and audio parts, and the bit rate of audio is generally relatively low. When the network speed cannot be guaranteed, there will usually be a problem of sound but no image.