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

Time to seek to is not properly handled #220

Open
Zakret opened this issue Feb 24, 2023 · 0 comments
Open

Time to seek to is not properly handled #220

Zakret opened this issue Feb 24, 2023 · 0 comments

Comments

@Zakret
Copy link

Zakret commented Feb 24, 2023

It seems that the thumbnail taken does not come from a set time by the user, but from the nearest quotient n*x greater than that time (I noticed that 'x' is different for the same video encoded differently). If this is intended behavior, I think that the user should be informed about it (e.g. in the --help option).
I generated 20s video:

x265 variant:

Stream #0:00x1: Video: hevc (Main) (hvc1 / 0x31637668), yuv420p(tv, smpte170m), 640x480 [SAR 1:1 DAR 4:3], 278 kb/s, 29.97 fps, 29.97 tbr, 30k tbn (default)

x264 variant:

Stream #0:00x1: Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, smpte170m, progressive), 640x480 [SAR 1:1 DAR 4:3], 333 kb/s, 29.97 fps, 29.97 tbr, 30k tbn (default)

Expected result:

ffmpeg -ss 00:00:10 -i ./time_test_x265.mp4 -frames:v 1 -q:v 2 ./time_test_x265_ffmpeg_10sec.jpg
time_test_x265_ffmpeg_10sec
ffmpeg -ss 00:00:10 -i ./time_test_x264.mp4 -frames:v 1 -q:v 2 ./time_test_x264_ffmpeg_10sec.jpg
time_test_x264_ffmpeg_10sec

Results (presented side by side: x265/x265):

ffmpegthumbnailer -t 00:00:01 -i ./time_test_x265.mp4 -o ./time_test_x265_ffmpethumbnailer_1sec.jpg
ffmpegthumbnailer -t 00:00:01 -i ./time_test_x264.mp4 -o ./time_test_x264_ffmpethumbnailer_1sec.jpg
time_test_x265_ffmpethumbnailer_1sec time_test_x264_ffmpethumbnailer_1sec
ffmpegthumbnailer -t 00:00:04 -i ./time_test_x265.mp4 -o ./time_test_x265_ffmpethumbnailer_4sec.jpg
ffmpegthumbnailer -t 00:00:04 -i ./time_test_x264.mp4 -o ./time_test_x264_ffmpethumbnailer_4sec.jpg
time_test_x265_ffmpethumbnailer_4sec time_test_x264_ffmpethumbnailer_4sec
ffmpegthumbnailer -t 00:00:06 -i ./time_test_x265.mp4 -o ./time_test_x265_ffmpethumbnailer_6sec.jpg
ffmpegthumbnailer -t 00:00:06 -i ./time_test_x264.mp4 -o ./time_test_x264_ffmpethumbnailer_6sec.jpg
time_test_x265_ffmpethumbnailer_6sec time_test_x264_ffmpethumbnailer_6sec
ffmpegthumbnailer -t 00:00:18 -i ./time_test_x265.mp4 -o ./time_test_x265_ffmpethumbnailer_18sec.jpg
Seeking in video failed Operation not permitted, will use first frame.
ffmpegthumbnailer -t 00:00:18 -i ./time_test_x264.mp4 -o ./time_test_x264_ffmpethumbnailer_18sec.jpg
time_test_x265_ffmpethumbnailer_18sec time_test_x264_ffmpethumbnailer_18sec

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