Patients and physicians report that communication about chronic pain and opioids is often challenging, but there is little empirical research on whether patient–physician communication about pain affects patient and physician visit experience. This study video recorded 86 primary care visits involving 49 physicians and 86 patients taking long-term opioids for chronic musculoskeletal pain, systematically coded all pain-related utterances during these visits using a custom-designed coding system, and administered previsit and postvisit questionnaires. Multiple regression was used to identify communication behaviors and patient characteristics associated with patients' ratings of their visit experience, physicians' ratings of visit difficulty, or both. After adjusting for covariates, 2 communication variables—patient–physician disagreement and patient requests for opioid dose increases—were each significantly associated with both worse ratings of patient experience and greater physician-reported visit difficulty. Patient desire for increased pain medicine was also significantly positively associated with both worse ratings of patient experience and greater physician-reported visit difficulty. Greater pain severity and more patient questions were each significantly associated with greater physician-reported visit difficulty, but not with patient experience. The association between patient requests for opioids and patient experience ratings was wholly driven by 2 visits involving intense conflict with patients demanding opioids. Patient–physician communication during visits is associated with patient and physician ratings of visit experience. Training programs focused on imparting communication skills that assist physicians in negotiating disagreements about pain management, including responding to patient requests for more opioids, likely have potential to improve visit experience ratings for both patients and physicians.