Recorded videos are saving as corrupted files

Recorded videos are saving as corrupted files

  1. Platform under test (android / ios)
  2. Appium version
  3. Os version (macOS / win / … )
  4. Your code with start, stop and save video
  5. Appium server logs

1)android
2) 1.7.0
3) windows
4)driver.start_recording_screen()
vide_name=driver.current_activity + time.strftime("%Y_%m_%d_%H%M%S")
#create filepath
filepath = os.path.join(“C:/Users/CH40043575/PycharmProjects/p1/video/”, vide_name+ “.mp4”)
video_rawdata=driver.stop_recording_screen()
with open(filepath,“wb”) as vd:
vd.write(base64.b64decode(video_rawdata))

appium-server-logs.txt (90.1 KB)

1.7.0 Appium? Why so old?

It will not be fixed. Try with latest 1.18 or 1.19 beta.

and in logs we see start but no end command to record.