Residence time distribution (RTD) is an important factor in melt extrusion as it strongly influences the product quality. It can cause degradation of the active pharmaceutical ingredient (API), which can be reduced by shorter mean residence times, and the content uniformity, which can be improved by broadening the RTD caused by axial mixing. In our study, we developed an inline video analysis that to date has mainly been applied offline. For extrusion, hydrophilic polymer and a surfactant were used as a molten matrix, in which an API was embedded. The video analysis consisted of four steps: (1) segmentation of the image to mask the strands, (2) calculation of average color values for the segmented pixels of each frame, (3) fitting of the obtained color curve with an analytical solution, and (4) calculating several RTD measures (e.g., the minimal and mean RT) for better comparison of the results. The RTD measures were responses in the design of experiments (DoE), which included the process parameters screw design, screw speed, and throughput. This analysis clearly showed that screw design had the strongest effect on the RTD measures. The results suggest that video analysis is a suitable tool for inline RTD measurements. POLYM. ENG. SCI., 58:170–179, 2018. © 2017 Society of Plastics Engineers