ranger-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ranger-users] Video files: thumbnail previews


From: Joshua Landau
Subject: Re: [Ranger-users] Video files: thumbnail previews
Date: Sun, 28 Jul 2013 22:24:57 +0100

On 28 July 2013 20:22, Germain Zouein <address@hidden> wrote:
On 07/28/2013 08:53 PM, Joshua Landau wrote:
The branch doesn't work for me (and I don't want to put time in quite atm, sorry) and the ASCII preview takes ages. Are you sure you don't just want to take the first frame for speed?
Might as well display a black frame for all videos if I want to only take the first frame...
How does it not work? Did you set preview_videos and preview_images to true in your rc.conf? (and more importantly, are normal images actually displaying correctly using w3m?)

Scratch everything I said. I've no idea what I've changed, but it works now, if unreliably. I can only tell you that I had already set preview_videos and preview_images. What else changed is a mystery.


It's still slow to seek, but there's a faster way (!). Yes, I have beaten the Gods¹ and climbed mountains higher than the sky² and have made the most hackedly-hacky hack that probably I've ever done:

ffmpeg -i INPUT_FILE -frames 1 -vcodec copy -ss 10 -v quiet -y TEMPOARY_VIDEO.mkv
ffmpeg -i TEMPOARY_VIDEO.mkv -v quiet -frames 1 -y OUTPUT.png

Yes -- two passes. The problem is that ffmpeg seems to always want to seek slowly or something -- but can seek fast if you force it not to decode any frames. Hence you need to do the seeking *within* the video. Or something. I don't really know why it works. This takes about 1.1 seconds, whereas:

ffmpeg -itsoffset 10 -i INPUT_FILE -vframes 1 -y OUTPUT.png

takes around 10 to 11 seconds. So it's a 10x speed up (that's more like the peak speed-up, to be fair). I have no idea how robust this is, but it seems to work on the two files I've tried.

¹ Never happened
² Also never happened

reply via email to

[Prev in Thread] Current Thread [Next in Thread]