lossless-cut
lossless-cut copied to clipboard
Reverse playback
I'm not sure if it's really possible with the html player, but it has been requested. J should make it go reverse and see #570
Commenting since I realized I've almost done this before elsewhere (but scrapped it from the final implementation). It is possible, but you cannot do reverse playback at full frame rate. Basically you seek the video with your own code timers but keep it in the "stopped" state. It seemed to work decently for the sake of "single step" in reverse, if I recall correctly.
I find myself using "reverse" in other video apps (e.g., QuickTime 7 Pro) in order to go back to something I just saw while fast-forwarding. Possibly J could be configured to "skip back" some amount of time? (Or another key, if J re-mapping isn't an option.)
The ideal amount of time to go back would be relative to the current playback speed. (If speed is 1x → just pause, 2x → back 2 seconds, 10x → back 5 seconds, etc.) I've been struggling to find this phenomenon described anywhere online (my Googling of video terminology is so poor that it took me a year or two of searching for replacements for QT7 because I didn't think to search for "lossless...") but perhaps someone here may have more success. I recall this being an option on my Xfinity DVR back in the states a few years ago. In that case I think it was if, while playing back at a fast speed, you hit the play button, it'd jump back the amount of time it takes most humans to react to something they see on screen.
Maybe when J
is pressed so many times that speed goes under e.g. 0.1, then it starts skipping backwards for each keypress instead, but it begs the question: should the video be playing forward while skipping backwards, or shouldit be paused, and how fast should it be playing...
I'm curious.. is it possible to losslessly export video segments (and its audio track(s)) in reverse? Not sure if there are any users who have requested this!
I would also like to see if it is possible to duplicate a segment and set it to play in reverse and export both so you can have the 2 segments play forwards and backwards.
I don't think it is possible losslessly reverse a video
I found this command: ffmpeg -i input.mp4 -filter_complex "[0:v]reverse,fifo[r];[0:v][0:a][r] [0:a]concat=n=2:v=1:a=1 [v] [a]" -map "[v]" -map "[a]" output.mp4 The input.mp4 is a very short clip intended to create a ping pong effect. It was extracted from a larger video using loosslescut. Then I opened the output.mp4 back in losslesscut and duplicated it several times. BINGO!!! a short video that goes back and forth to the beginig. My question is, can mifi incorporate the whole process into his -I must say-wonderful losslesscut?
Just because you can create it using ffmpeg
does not mean it is created lossless-ly. The hallmark of lossless with ffmpeg in my experience is if it can run the command almost instantly. If it says anything about processing it means it's not lossless and out of scope of this app.
Yes filter_complex requires a decode/encode which is slow and not lossless, so it probably won’t be included any time soon.
You're right. It is slower. But in the short clips I've tried (6 sec) I haven't noticed any loss in quality, however, I'm far from knowing all the intricacies of ffmpeg. For instance, this command produced quite acceptable results:
ffmpeg -i input.mp4 -filter_complex "[0:v]reverse,fifo[r];[0:v][0:a][r] [0:a]concat=n=2:v=1:a=1 [v] [a]" -map "[v]" -map "[a]" output.mp4 ; ffmpeg -stream_loop 6 -i output.mp4 -c copy output6.mp4
But you're the expert.
Maybe you can include it with the warning "It's not lossless and may be problematic with long segments."
@hrprada it won't be supported any time soon. It's not about a loss of quality but rather literally how ffmpeg and LosslessCut work. LosslessCut does not do anything with ffmpeg that requires it to decode and re-encode video hence what we call "Lossless."
I understand now what you mean and totally agree with you. The integrity of the app which is based on loss lessness would be compromised by adding a feature that is lossy. Keep up the good work.