Extract video frames display time and frame number
830
Try filter showinfo. Seems like it's what you need. Example:
ffmpeg -i 1.ts -vf "showinfo" -f null /dev/null
Related videos on Youtube
Author by
florian_
Updated on September 18, 2022Comments
-
florian_ over 1 year
I am trying to write a test for the following Nuxt 3 composable (useLinkToSlug).
import { computed } from 'vue'; export default function () { const route = useRoute(); return computed(() => route?.params?.slug ? `/${route.params.slug}` : undefined); }
To keep the code as lean as possible, I tried to mock the vue-router module and set the return of
useRoute()
manually.My test looks like this:
import { vi, it, expect, describe } from 'vitest'; import useLinkToSlug from '~~/composables/useLinkToSlug'; describe('useLinkToSlug', () => { it('should return link to slug', () => { vi.mock('vue-router', () => ({ useRoute: () => ({ params: { slug: 'abc' } }) })); const link = useLinkToSlug(); expect(link.value).toEqual('/abc'); }); it('should return null', () => { vi.mock('vue-router', () => ({ useRoute: () => ({ params: { slug: undefined } }) })); const link = useLinkToSlug(); expect(link.value).toBeNull(); }); });
The first one succeeds, but the later one fails, with:
AssertionError: expected '/abc' to be null
I don't get why and what to do, to make this work.
Using: Nuxt3 with Vitest
-
stib about 10 yearsWhen you say extract, do you mean to save the frame as an image?
-