



3.6 Gb to 62 Mb, quality "good enough"/acceptable 👍.ffmpeg -i input.mp4 -s 1280x720 -acodec copy -y output.mp4.ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 out.mp4.the issue with this is that it's still not widely adapted and sites like discord can't play itĬommands using Linux with ffmpeg to shrinking big MP4 video file to smaller sizes if you only want to save your video on your pc then use the new mp4 codec 265 -c:v libx265, it has better compression, and just ike 264, nearly lossless.you can lower the resolution with -vf scale=1280:720.if the output is not enough then use 2/3 of the original video bitrate with -b:v and keep lowering until you reach a desired size.I'd recommend that you first let ffmpeg compress it automatically without any arguments ffmpeg -i input.ext output.mp4 not all videos will look good with a video bitrate of 700kb it depends on the resolution, the original codec used and whether there's a lot of movement / particles.for audio it's better to specify the bitrate rather than the codec, 96Kb is good enough -b:a 96k.in the time of writing this (jan 2023) you don't need to specify h264 as the video codec in ffmpeg when the output is mp4 since that's the default codec.String deviceName = "video=GENERAL WEBCAM" įfmpeg.avformat_open_input(&pFormatContext, deviceName, ffmpeg.av_find_input_format("dshow"), null) įor both variants of device names, I get an error: No such file or directory.įfmpeg -video_size 1280x720 -framerate 30 -f dshow -i video="GENERAL WEBCAM":audio="Microphone (3- GENERAL WEBCAM)" -c:v libx264 -crf 30 -preset ultrafast ffmpegvideo. This is how I'm trying to get the video: string deviceName = "GENERAL WEBCAM"

Now I want to use this function for USB video device.įFmpeg outputs this device name: ffmpeg -list_devices true -f dshow -i dummy I used the ffmpeg-function (from library FFmpeg.AutoGen) to show video from rtsp-stream:įfmpeg.avformat_open_input(&pFormatContext, "rtsp://127.0.0.1:8554/abc", iformat, null) This question was migrated from Super User because it can be answered on Stack Overflow.
