Nov 22 2012
Dealing with FFMPEG Error while opening codec for output stream…
Quick post about the ffmpeg error message: “Error while opening codec for output stream #0.0 – maybe incorrect parameters such as bit_rate, rate, width or height” .
We received some video files from a partner in the Safecity project, which did not play in all media players.
We tried VLC, windows media player, and a variety of other players but nothing worked.
Checking the file with a hex editor, I saw there was data within the video, and thought to try converting with FFMPEG using commands such as:
ffmpeg -i “damaged_file.avi” converted_file.mp4
However, ffmpeg failed with the following error message:
Error while opening codec for output stream #0.0 – maybe incorrect parameters such as bit_rate, rate, width or height
Aug 11 2016
Reducing RTMPT disconnects on RED5
Chris Georgoulis and I extensively debugged this for a project and were able to reduce the disconnection rate from 90% to 40% for connections that lasted over 5 minutes. This was for a teleconferencing application that required 4 RTMPT streams in total (2 outgoing, 2 incoming) with a maximum buffer of 200ms.
RED5 by default has a maximum of 100 keep-alive requests. On the 100th request the server returns connection-close . By setting the limit to infinite we were able to improve the performance. RTMPT is quite vulnerable to disconnections and closing and reopening the socket connection plays a role.
As described by Chris, please go to /{red5_folder}/conf/jee-container.xml and modify the following element group with the extra <property> tags(this should be at line 21), and then restart red5:
By Menelaos Bakopoulos • Multimedia, Servers (*ix , scripting), Video, Web 0 • Tags: red5, rtmpt