PS: if you know a reliable way in JS to know the number of frames of a given video, I'm also interested.Ĭoncerning the idea to cut the video before hand on the desktop, this could be used. But as you can see, sometimes when going on the next frame it "freezes" a bit: I guess this is when the stop happens right before the seekTo. So far, I avoid this issue by stopping one frame before the end and then using seekTo (not sure how sound this is), as demonstrated here. This may result in incorrect timestamps in the output file.įrame= 67 fps=8.6 q=-1.0 Lsize=N/A time=00:00:13.00 bitrate=N/A speed=1.67x Non-monotonous DTS in output stream 0:0 previous: 0, current: 0 changing to 1.
#Youtube ad skipper code
Fix your code to set the timestamps properly
This is deprecated and will stop working in the future.
Timestamps are unset in a packet for stream 0. Output #0, segment, to '/home/short.mp4':
Ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developersĬonfiguration: -disable-stripping -enable-pic -enable-shared -enable-pthreads -cross-prefix=aarch64-poky-linux-ld='aarch64-poky-linux-gcc -march=armv8-a+crc -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -sysroot=/home/ubuntu/przemoch/safeway-by-sternkraft/build/tmp/work/aarch64-poky-linux/ffmpeg/4.2.2-r0/recipe-sysroot' -cc='aarch64-poky-linux-gcc -march=armv8-a+crc -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -sysroot=/home/ubuntu/przemoch/safeway-by-sternkraft/build/tmp/work/aarch64-poky-linux/ffmpeg/4.2.2-r0/recipe-sysroot' -cxx='aarch64-poky-linux-g++ -march=armv8-a+crc -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -sysroot=/home/ubuntu/przemoch/safeway-by-sternkraft/build/tmp/work/aarch64-poky-linux/ffmpeg/4.2.2-r0/recipe-sysroot' -arch=aarch64 -target-os=linux -enable-cross-compile -extra-cflags=' -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/ubuntu/przemoch/safeway-by-sternkraft/build/tmp/work/aarch64-poky-linux/ffmpeg/4.2.2-r0=/usr/src/debug/ffmpeg/4.2.2-r0 -fdebug-prefix-map=/home/ubuntu/przemoch/safeway-by-sternkraft/build/tmp/work/aarch64-poky-linux/ffmpeg/4.2.2-r0/recipe-sysroot= -fdebug-prefix-map=/home/ubuntu/przemoch/safeway-by-sternkraft/build/tmp/work/aarch64-poky-linux/ffmpeg/4.2.2-r0/recipe-sysroot-native= -march=armv8-a+crc -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -sysroot=/home/ubuntu/przemoch/safeway-by-sternkraft/build/tmp/work/aarch64-poky-linux/ffmpeg/4.2.2-r0/recipe-sysroot' -extra-ldflags='-Wl,-O1 -Wl,-hash-style=gnu -Wl,-as-needed -fstack-protector-strong -Wl,-z,relro,-z,now' -sysroot=/home/ubuntu/przemoch/safeway-by-sternkraft/build/tmp/work/aarch64-poky-linux/ffmpeg/4.2.2-r0/recipe-sysroot -libdir=/usr/lib -shlibdir=/usr/lib -datadir=/usr/share/ffmpeg -disable-mipsdsp -disable-mipsdspr2 -cpu=generic -pkg-config=pkg-config -disable-static -enable-alsa -enable-avcodec -enable-avdevice -enable-avfilter -enable-avformat -enable-avresample -enable-bzlib -disable-libfdk-aac -enable-gpl -disable-libgsm -disable-indev=jack -disable-libvorbis -enable-lzma -disable-libmfx -disable-libmp3lame -disable-openssl -enable-postproc -disable-sdl2 -disable-libspeex -enable-swresample -enable-swscale -enable-libtheora -disable-vaapi -disable-vdpau -disable-libvpx -enable-libx264 -disable-libx265 -enable-libxcb -enable-outdev=xv -enable-zlibĭuration: N/A, start: 0.200000, bitrate: N/A