zebrunner / appium

Enhanced Appium for Elastic Selenium Grid/MCloud services
8 stars 3 forks source link

Investigate possibility to detect and heal corrupted mp4 video files with ffmpeg #379

Closed azarouski closed 4 months ago

azarouski commented 5 months ago

subj

azarouski commented 5 months ago

to check file integrity:

ffprobe -v trace video.mp4

to make recording more fail safe add movflags : (https://superuser.com/a/1530949)

ffmpeg ... -movflags +frag_keyframe+separate_moof+omit_tfhd_offset+empty_moov ... video.mp4

this option increases the output file size by ~2-3%

azarouski commented 5 months ago

done to test this issue you need to try to break process of video recording

dhreben commented 5 months ago

Reopened:

Tested:

Screenshot 2024-05-09 at 19 02 14

Uploader log:


waiting for 3db539d2-a5a7-4c7e-bc19-90ac3ac7c760 to upload
waiting for 3db539d2-a5a7-4c7e-bc19-90ac3ac7c760 to upload
upload: tmp/log/3db539d2-a5a7-4c7e-bc19-90ac3ac7c760/video.log to s3://zbr-test/artifacts/test-sessions/3db539d2-a5a7-4c7e-bc19-90ac3ac7c760/video.log
waiting for 3db539d2-a5a7-4c7e-bc19-90ac3ac7c760 to upload
upload: tmp/log/3db539d2-a5a7-4c7e-bc19-90ac3ac7c760/session.log to s3://zbr-test/artifacts/test-sessions/3db539d2-a5a7-4c7e-bc19-90ac3ac7c760/session.log
waiting for 3db539d2-a5a7-4c7e-bc19-90ac3ac7c760 to upload
upload: tmp/log/3db539d2-a5a7-4c7e-bc19-90ac3ac7c760/wda.log to s3://zbr-test/artifacts/test-sessions/3db539d2-a5a7-4c7e-bc19-90ac3ac7c760/wda.log

Appium log:

2024-05-09 16:01:23:542 - [HTTP] <-- POST /wd/hub/session/3db539d2-a5a7-4c7e-bc19-90ac3ac7c760/timeouts 200 1 ms - 14
2024-05-09 16:01:23:543 - [HTTP] 
2024-05-09 16:01:25:107 - [HTTP] --> DELETE /wd/hub/session/3db539d2-a5a7-4c7e-bc19-90ac3ac7c760
2024-05-09 16:01:25:108 - [HTTP] {}
2024-05-09 16:01:25:108 - [AppiumDriver@aa2b] Removing session 3db539d2-a5a7-4c7e-bc19-90ac3ac7c760 from our master session list
2024-05-09 16:01:26:161 - [DevCon Factory] Releasing connections for e18f63dd2e441bea17f95a50b1073bbbdeaddba8 device on any port number
2024-05-09 16:01:26:162 - [DevCon Factory] Found cached connections to release: ["e18f63dd2e441bea17f95a50b1073bbbdeaddba8:8100"]
inwRecordArtifactId=3db539d2-a5a7-4c7e-bc19-90ac3ac7c760
stop recording artifact 3db539d2-a5a7-4c7e-bc19-90ac3ac7c760
2024-05-09 16:01:26:170 - [HTTP] <-- DELETE /wd/hub/session/3db539d2-a5a7-4c7e-bc19-90ac3ac7c760 200 1061 ms - 14
2024-05-09 16:01:26:170 - [HTTP] 
[MCLOUD] File /tmp/log/.recording-artifact-3db539d2-a5a7-4c7e-bc19-90ac3ac7c760 removed successfully.
[info] [Share] Sharing file: /tmp/log/wda.log
[info] [Share] Video recording file:
ls: cannot access '/tmp/3db539d2-a5a7-4c7e-bc19-90ac3ac7c760.mp4': No such file or directory
mv: cannot stat '/tmp/3db539d2-a5a7-4c7e-bc19-90ac3ac7c760.mp4': No such file or directory
2024-05-09 16:01:27:010 - [HTTP] --> HEAD /wd/hub/status
2024-05-09 16:01:27:010 - [HTTP] {}
2024-05-09 16:01:27:011 - [HTTP] <-- HEAD /wd/hub/status 200 1 ms - 110
2024-05-09 16:01:27:011 - [HTTP] 
2024-05-09 16:01:27:137 - [HTTP] --> GET /wd/hub/status
2024-05-09 16:01:27:137 - [HTTP] {}
azarouski commented 4 months ago

Minio was configured correctly and video files were appeared

dhreben commented 4 months ago

Verified.