Keep encoding format:
ffmpeg -i test.mp4 -vcodec copy -acodec copy test_copy.ts
ffmpeg -i test.mp4 -codec copy test_copy2.ts
Change the encoding format:
ffmpeg -i test.mp4 -vcodec libx265 -acodec libmp3lame out_h265_mp3.mkv
Modify the frame rate:
ffmpeg -i test.mp4 -r 15 output2.mp4
Modify the video bit rate:
ffmpeg -i test.mp4 -b 400k output_b.mkv (此时音频也被重新编码)
Modify the video bit rate:
ffmpeg -i test.mp4 -b:v 400k output_bv.mkv
Modify the audio bit rate:
ffmpeg -i test.mp4 -b:a 192k output_ba.mp4
如果不想重新编码video,需要加上-vcodec copy
Modify the audio and video bit rate:
ffmpeg -i test.mp4 -b:v 400k -b:a 192k output_bva.mp4
Modify video resolution:
ffmpeg -i test.mp4 -s 480x270 output_480x270.mp4
Modify the audio sample rate:
ffmpeg -i test.mp4 -ar 44100 output_44100hz.mp4
I recommend a Lingsheng Academy project class. I personally think the teacher taught it well. I would like to share it with you:
Lingsheng Platinum Learning Card (including infrastructure/high-performance storage/golang cloud native/audio and video/Linux kernel)
https://xxetb.xet .tech/s/VsFMs