czechball / discord-video Goto Github PK
View Code? Open in Web Editor NEWSimple bash and batch scripts that use ffmpeg to compress videos to fit under 25 MB (Discord free upload limit)
License: MIT License
Simple bash and batch scripts that use ffmpeg to compress videos to fit under 25 MB (Discord free upload limit)
License: MIT License
I can't use absolute paths in the command. No matter if it is in quotation marks or not.
C:\Users\user\Desktop\Programs\discord-video>discord-video.bat C:\Users\user\Videos\OBS\2021-03-25 11-55-25.mp4
Error: "C:\Users\user\Videos\OBS\2021-03-25" is not a video file
C:\Users\user\Desktop\Programs\discord-video>discord-video.bat "C:\Users\user\Videos\OBS\2021-03-25 11-55-25.mp4"
Error: ""C:\Users\user\Videos\OBS\2021-03-25 11-55-25.mp4"" is not a video file
Neato script!
This line uses %VIDEO_BITRATE%
(towards the end). Should it be $VIDEO_BITRATE
?
Script failed on my Linux machine until tweaking this. Error message:
[libvpx-vp9 @ 0x55961f169840] [Eval @ 0x7fff73449e70] Undefined constant or missing '(' in '%VIDEO_BITRATE%'
[libvpx-vp9 @ 0x55961f169840] Unable to parse option value "%VIDEO_BITRATE%"
[libvpx-vp9 @ 0x55961f169840] Error setting option b to value %VIDEO_BITRATE%.
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Started to compress a video sized at 16.9mb, ended with 53.7mb file. This was on the windows .bat file.
"C:\Users\dygdy\Downloads\2DiscordVideo\1.mp4" is a video file and is 68.415533 seconds long
video should have a bitrate of 2941175 kbps
Unrecognized option 'row-mt'.
Error splitting the argument list: Option not found
"Done."
C:\Users\dygdy>ffmpeg -version
ffmpeg version 2024-03-20-git-e04c638f5f-full_build-www.gyan.dev Copyright (c) 2000-2024 the FFmpeg developers
built with gcc 13.2.0 (Rev5, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --pkg-config=pkgconf --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-dxva2 --enable-d3d11va --enable-libvpl --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
libavutil 59. 3.100 / 59. 3.100
libavcodec 61. 2.100 / 61. 2.100
libavformat 61. 0.100 / 61. 0.100
libavdevice 61. 0.100 / 61. 0.100
libavfilter 10. 0.100 / 10. 0.100
libswscale 8. 0.100 / 8. 0.100
libswresample 5. 0.100 / 5. 0.100
libpostproc 58. 0.100 / 58. 0.100
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.