Open AudreyBeard opened 1 year ago
From Audrey:
This code should do it, she stopped using it for some reason, and doesn't remember why - so test and investigate it: https://github.com/AudreyBeard/compressure/blob/main/compressure/dataproc.py#L18
The function compressure.dataproc.reverse_video
seems to work just fine, so it probably just needs to be integrated
The main script should allow users to specify just a single video (either forward or backward), and the main script should generate the counterpart by reversing the video.
Ultimately, this should also be added to the persistence object, but that can safely be handled in another ticket.
Question: Do you want to implement the persistent caching mechanism too, or just the video reversal? ANSWER: just reversal, caching is scoped in #15
Verified reversing video works! The process is not able to complete because the file never gets encoded:
Found manifest at /Users/keroppi/.cache/compressure/manifest.json with 0 source
No video found in persistent storage - creating now
SubprocessError('Subprocess `ffmpeg -y -v error -i /Users/keroppi/projects/clips/sunset_ice_floes.mov -g 6000 -strict -2 -c:v libx264 -preset veryslow -qp 31 -bf 0 /Users/keroppi/.cache/compressure/encodes/sunset_ice_floes_transcoded_g=6000_libx264_preset=veryslow_qp=31_bf=0.avi` failed with the following error: \n/Users/keroppi/.cache/compressure/encodes/sunset_ice_floes_transcoded_g=6000_libx264_preset=veryslow_qp=31_bf=0.avi: No such file or directory\n')
The manifest.json sources is empty and there is no encodes
folder. A little surprised the process doesn't try to complete - like if encoding failed due to no cache, it would try to use the original video and warn the user, etc.
SubprocessError('Subprocess `ffmpeg -y -v error -i /Users/keroppi/projects/clips/sunset_ice_floes.mov -g 6000 -strict -2 -c:v libx264 -preset veryslow -qp 31 -bf 0 /Users/keroppi/.cache/compressure/encodes/sunset_ice_floes_transcoded_g=6000_libx264_preset=veryslow_qp=31_bf=0.avi` failed with the following error:
/Users/keroppi/.cache/compressure/encodes/sunset_ice_floes_transcoded_g=6000_libx264_preset=veryslow_qp=31_bf=0.avi: No such file or directory
)
ah yeah probably the persistent cacher didn't create the encodes
folder. That's my fault. I just implemented this, which should solve the problem. Could you pull it down and confirm?
@ugotsoul what's the status of this? Should I remove you from the Assignees list?
Currently required to supply
--fpath_forward
and--fpath_backward
. Let's implement a reversal block & persistence of it such that users can supply just a single--fpath_source
.Likely Targets in Code
main.main
main.CompressureSystem
persistence.CompressureManifest
persistence.CompressurePersistence