libx264

FFMPEG - Width/ Height Not Divisible by 2 (Scaling to Generate MBR Output)

允我心安 提交于 2021-02-11 13:44:18
问题 I am trying to generate multilple variants of videos in my library (Mp4 formats) and have renditions planned ranging from 1080p to 240p and popular sizes in between. For that I am taking a video with a AxB resolution and then running through a code (on bash) which scales them to desired following sizes - 426x240 640x360 842x480 1280x720 1920x1080, with different bitrates of course, and then saves as Mp4 again. Now, this works just fine if source video has height and width divisible by 2, but

Encoding H.264 CBR videos with FFmpeg

主宰稳场 提交于 2021-02-06 02:36:46
问题 I'm trying to encode a video with ffmpeg into H.264 (via the libx264 library) with a constant bit rate. I know, I know, VBR is often preferred, but for this specific job I'm required to use CBR (just as long as it's so many kilobytes per second; it doesn't have to be an exact kilobytes per frame, afaik). My sample video I'm using to test is from here: http://a1408.g.akamai.net/5/1408/1388/2005110403/1a1a1ad948be278cff2d96046ad90768d848b41947aa1986/sample_iTunes.mov.zip (it comes from http:/

Encoding H.264 CBR videos with FFmpeg

∥☆過路亽.° 提交于 2021-02-06 02:33:47
问题 I'm trying to encode a video with ffmpeg into H.264 (via the libx264 library) with a constant bit rate. I know, I know, VBR is often preferred, but for this specific job I'm required to use CBR (just as long as it's so many kilobytes per second; it doesn't have to be an exact kilobytes per frame, afaik). My sample video I'm using to test is from here: http://a1408.g.akamai.net/5/1408/1388/2005110403/1a1a1ad948be278cff2d96046ad90768d848b41947aa1986/sample_iTunes.mov.zip (it comes from http:/

Conversion from mjpeg to mp4 (libx264) with FFmpeg

那年仲夏 提交于 2021-01-29 10:56:57
问题 If you convert from mjpeg to mp4 (libx264) with FFmpeg, Playback can not be performed on Windows · Mac. Thumbnails are not displayed on the icon. However, with the HTML5 Video tag, playback is possible. Why? Please tell me if you understand. Thank you. ffmpeg -i source_file.mov -b 4000k -vcodec libx264 destination_file.mp4 回答1: The usual reason for this is the pixel format. The MJPEG may have 4:2:2 or 4:4:4 chroma sampling which most players don't support in H264. So try ffmpeg -i source_file

I can't use libx265 or hevc with ffmpeg in nginx

我的梦境 提交于 2020-03-26 06:12:29
问题 exec_push /usr/bin/ffmpeg -re -i rtmp://10.254.20.186:1935/$app/$name ar 44100 -vcodec libx264 -g 25 -f flv rtmp://10.254.20.186/live/$name_hi; I can use this code in my nginx server. this is code running but dont run while write libx264 instead libx265. The interesting thing is that I can run the following commands on my linux computer without problems. ffmpeg -i input.mp4 -c:v libx264 -crf 28 -c:a aac -b:a 128k output.mp4 ffmpeg -i input.mp4 -c:v libx265 -crf 28 -c:a aac -b:a 128k output