Hello all, I’m trying to convert a video and change these parameters:
resolution from 1.280x720 to 640x360 pixels
average bitrate: from 1.410 to 300 kb/s
maximum bitrate: from 1.680 to 2500 kb/s
Sampling rate : from 48.0 to 44.1 kHz
Bit rate audio: 128 kb/s
I used this string with ffmpeg vers. 4.3.2-2021-02-20 full build:
Code:ffmpeg -i input.mp4 -c:v -vf scale=640:360 libx264 -b:v 300k -maxrate 2500k -bufsize 2500k -crf 25 -c:a -ar 44100 libfdk_aac -b:a 128k output.mp4
I get the error: “ffmpeg unable to find a suitable output format for scale ‘640:360’ scale 640:360: invalid argument”. Could you help me pleae?
Below is the original file analyzed by MediaInfo, thanks!
Code:General Complete name : C:\Users\parvares\Desktop\input.mp4 Format : MPEG-4 Format profile : Base Media Codec ID : isom (isom/iso2/avc1/mp41) File size : 424 MiB Duration : 38 min 21 s Overall bit rate : 1 545 kb/s Writing application : Lavf58.64.100 Video ID : 1 Format : AVC Format/Info : Advanced Video Codec Format profile : High@Level3.1 Format settings : CABAC / 4 Ref Frames Format settings, CABAC : Yes Format settings, Reference frames : 4 frames Codec ID : avc1 Codec ID/Info : Advanced Video Coding Duration : 38 min 21 s Bit rate : 1 410 kb/s Maximum bit rate : 1 680 kb/s Width : 1 280 pixels Height : 720 pixels Display aspect ratio : 16:9 Frame rate mode : Constant Frame rate : 25.000 FPS Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Bits/(Pixel*Frame) : 0.061 Stream size : 387 MiB (91%) Writing library : x264 core 161 r3027 4121277 Encoding settings : cabac=1 / ref=2 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=6 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=1 / keyint=250 / keyint_min=125 / scenecut=40 / intra_refresh=0 / rc_lookahead=125 / rc=crf / mbtree=1 / crf=20.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=1680 / vbv_bufsize=8400 / crf_max=0.0 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:1.00 Color range : Limited Color primaries : BT.709 Transfer characteristics : BT.709 Matrix coefficients : BT.709 Codec configuration box : avcC Audio ID : 2 Format : AAC LC Format/Info : Advanced Audio Codec Low Complexity Codec ID : mp4a-40-2 Duration : 38 min 21 s Bit rate mode : Constant Bit rate : 129 kb/s Channel(s) : 2 channels Channel layout : L R Sampling rate : 48.0 kHz Frame rate : 46.875 FPS (1024 SPF) Compression mode : Lossy Stream size : 35.3 MiB (8%) Default : Yes Alternate group : 1
+ Reply to Thread
Results 1 to 11 of 11
-
Last edited by parvares; 12th Apr 2021 at 03:22.
-
Thanks, ProWo, I'm getting this error
unknown encoder 'libfdk_aac'
libfdk_aac to
aac
Now I get a warning with the resulting file:
unknown encoder 'libfdk_aac'Last edited by parvares; 8th Apr 2021 at 07:07.
-
Just "-c:a aac" instead of "-c:a libfdk_aac" then. Or get a version of ffmpeg with libfdk_aac.
-
Thanks, when I get the output video analyzed by Media info I get 285 kb/s for average bitrate (instead of 300 kb/s) and I don't get the maximum bit rate (2500 kb/s). Does this depend on the bufsize value I set (2500k)? Which value should I change? Thanks very much!
Last edited by parvares; 8th Apr 2021 at 15:16.
-
ProWo, thanks a lot. The output gives me now an average bitrate of 486 kb/s, but trying without -crf and -maxrate commands I get exactly the average rate output I need, 300 kb/s.
Code:ffmpeg -i input.mp4 -vf scale=640:360 -c:v libx264 -b:v 300k -bufsize 2500k -c:a aac -ar 44100 -b:a 128k output.mp4
ffmpeg\bin\output.mp4: permission deniedLast edited by parvares; 9th Apr 2021 at 14:37.
-
-
I need to concat the output with another video with the same parameters I wrote (average bitrate: 300 kb/s, maximum bitrate: 2500 kb/s). If not I get the concatenated video 'pixelated'...
-
-
I tried your string, but when I concat the second video with MKVToolNix it comes grainy and pixalated.
I had to add a parameter:
Code:-preset fast
--rc-lookahead 30 --ref 2 --subme 6
Code:ffmpeg -i input.mp4 -vf scale=640:360 -c:v libx264 -preset fast -crf 25 -ar 44100 output.mp4
Now there is no problem joining the videoes.
Thanks again for your help!Last edited by parvares; 16th Apr 2021 at 01:53.
Similar Threads
-
How to crop Video with FFMPEG without changing bitrate ?
By DonSeenu in forum Video ConversionReplies: 7Last Post: 17th Jun 2020, 14:58 -
HELP: FFMPEG Scale and Chromakey syntax?
By DotMatrix in forum Newbie / General discussionsReplies: 0Last Post: 20th May 2020, 11:54 -
FFmpeg is changing the frame rate to Variable when copying video?
By kkiller23 in forum Newbie / General discussionsReplies: 5Last Post: 1st Dec 2019, 13:14 -
FFmpeg changing video ratio aspect
By jseo13579 in forum EditingReplies: 4Last Post: 18th Nov 2018, 00:18 -
FFMpeg scale filter makes video lose color
By FEWP in forum Video ConversionReplies: 3Last Post: 19th Apr 2018, 08:37