Generating report with mp4 video doesn't allow video to play in served report
See original GitHub issueDescribe the bug Upon generating a report that include a video attached to a test, the served Allure report does not allow the mp4 video to be played
To Reproduce Steps to reproduce the behavior: Attached video with the following code snippet (Python):
with open(os.path.join(VIDEO_RECORDINGS_DIR, _video_name), "rb") as video_file:
allure.attach(video_file.read(), name="video", attachment_type=allure.attachment_type.MP4)
Attached generated Allure results dir - mp4 video is included and plays successfully independently and the report recognises that the there is a video attached to a test, but the video cannot be played
Expected behavior Video in report plays as when playing the video independently as a separate file in a media player.
Screenshots
Environment (please complete the following information):
| Allure version | 2.14.0 | | Test framework | pytest@6.2.4 | | Allure adaptor | allure-pytest@2.9.43 | | Generate report using | allure@2.14.0 |
Additional context Attached generated allure results dir with all artefacts: sample-allure.zip
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (5 by maintainers)
Top GitHub Comments
@jsa34 great!
Interesting - I hadn’t considered the video type…
MP4 doesn’t work, but I swapped out the mp4 to be webm, and all is fine - only code change from Allure’s side is:
Obviously also rendered the video with vp09 codec (webm) instead of mp4, but no other changes - mp4 and webm videos both were playing fine outside of Allure report, even the video in the results dir