Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sporadic Error happens towards the end of processing video files #24

Open
jtyoung84 opened this issue Jan 2, 2025 · 0 comments
Open

Comments

@jtyoung84
Copy link
Contributor

Describe the bug
Sometimes when a transform job is requested, an error happens with the following stack trace:

ERROR:root:FFmpeg conversion failed for /allen/aind/scratch/vr-foraging/data/754582/754582_20241114T111630/behavior-videos/FaceCamera/video.mp4
Command: ffmpeg -y -v warning -hide_banner -i /allen/aind/scratch/vr-foraging/data/754582/754582_20241114T111630/behavior-videos/FaceCamera/video.mp4 -vf setparams=color_primaries=bt709:color_trc=linear:colorspace=bt709,scale=out_color_matrix=bt709:out_range=full:sws_dither=none,format=yuv420p10le,colorspace=ispace=bt709:all=bt709:dither=none,scale=out_range=tv:sws_dither=none,format=yuv420p -c:v libx264 -preset veryslow -crf 18 -pix_fmt yuv420p -metadata author=Allen Institute for Neural Dynamics -movflags +faststart+write_colr /allen/aind/stage/svc_aind_airflow/prod/behavior_754582_job_1735686516_28a95/behavior-videos/FaceCamera/video.mp4
Return code: 1
Error output:
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55a37a1ef040] moov atom not found
/allen/aind/scratch/vr-foraging/data/754582/754582_20241114T111630/behavior-videos/FaceCamera/video.mp4: Invalid data found when processing input


Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/local/lib/python3.11/site-packages/aind_behavior_video_transformation/etl.py", line 186, in <module>
    job_response = job.run_job()
                   ^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aind_behavior_video_transformation/etl.py", line 156, in run_job
    self._run_compression(convert_video_args)
  File "/usr/local/lib/python3.11/site-packages/aind_behavior_video_transformation/etl.py", line 119, in _run_compression
    raise RuntimeError(
RuntimeError: One or more Ffmpeg jobs failed. See error logs.

To Reproduce
Steps to reproduce the behavior:

  1. Difficult to reproduce, but try running the compression on the file listed in the stack trace
  2. See error

Expected behavior
If the file itself is corrupt, then I'm not sure what the expected behavior should be. Should we just copy the file as is?

Additional context
This might be something with the base docker image being used in ghcr.io/allenneuraldynamics/aind-behavior-video-transformation:0.1.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant