Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Analysis of Chinese parameters in ffmpeg

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article shows you the analysis of ffmpeg Chinese parameters, which is concise and easy to understand, which will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.

1. Ffmpeg pushes video files, and the encoding format of audio and video can only be H264 or AAC.

Ffmpeg-re-I "E:\ source\ Avengers 720p.mov"-vcodec copy-acodec copy-f flv rtmp://192.168.11.75/live/test1

Ffmpeg-re-I "E:\ source\ Avengers 720p.mov"-vcodec copy-acodec copy-f flv rtmpt://192.168.11.75:8080/live/test1

2. Webcam rtsp stream pushes rtmp LVB (however, if there is packet loss, please give us more advice)

Ffmpeg-I rtsp://ip address/original-crf 30-preset ultrafast-acodec aac-strict experimental-ar 44100-ac 2-b preset ultrafast a 96k-vcodec libx264-r 25-b flv rtmp://ip address/live/stram v 500k-s 640mm 480-f flv rtmp://ip address/live/stram

Ffmpeg parameter description:

Basic options:-formats output all available formats-f fmt specified format (audio or video format)-I filename specifies the input file name, of course, under linux: 0.0 (screen recording) or camera-y overwrite existing files-t duration recording length sets the file size limit for t-fs limit_size-ss time_off starts at a specified time (s) The format of [-] hh:mm:ss [.xxx] also supports-itsoffset time_off setting time offset (s), which affects all subsequent input files. This offset is added to the timestamp of the input file, and defining a positive offset means that the corresponding stream is delayed by offset seconds. The format of [-] hh:mm:ss [.xxx] also supports-title string title-timestamp time timestamp-author string author-copyright string copyright Information-comment string comment-album stringalbum name-v verbose related to log-target type sets the target file type ("vcd", "svcd", "dvd", "dv", "dv50", "pal-vcd", "ntsc-svcd") ...)-dframes number sets the number of frames to record video option:-b specifies the bit rate (bits/s) It seems that ffmpeg automatically VBR, specifies about the average bit rate-bitexact uses standard bit rate-vb specifies video bit rate (bits/s)-vframes number sets how many frames of video (frame) to convert-r rate frame rate (fps) (can be changed, confirm that non-standard frame rate will cause audio and picture to be out of sync So only set to 15 or 29.97)-s size specify resolution (320x240)-aspect aspect set video aspect ratio (4:3, 16:9 or 1.3333) 1.7777)-croptop size set top cut size (in pixels)-cropbottom size set bottom cut size (in pixels)-cropleft size set left cut size (in pixels)-cropright size set right cut size (in pixels)-padtop size set top make up size (in pixels)-padbottom size bottom complete (in pixels)-padleft size left complete (in pixels)-padright size right complete (in pixels)-padcolor color fill band color (000000- FFFFFF)-vn cancels video-vcodec codec forces the use of codec codec ('copy' to copy stream)-sameq uses the same video quality as the source (VBR)-pass n selects the number of times to be processed (1 or 2). Coding twice is very useful. The first pass generates statistics, and the second pass generates the exact bitrate of the request-passlogfile file selects a two-time record file named file-newvideo to add a new video stream after the current video stream

Advanced video option-pix_fmt formatset pixel format, 'list' as argument shows all the pixel formats supported-intra is only suitable for intra coding-qscale Q quality-based VBR, value is 0.01255.The smaller the quality, the better-loop_input sets the number of cycles of the input stream (currently valid only for images)-loop_output sets the number of cycles of the output video. For example, setting gif to 0 indicates infinite loop-g int sets image group size-cutoff int sets cutoff frequency-qmin int sets minimum quality, which is shared with-qmax (set maximum quality), such as-qmin 10-qmax 31-qmax int sets maximum quality-maximum deviation between qdiff int quantization scales (VBR)-bf int uses frames B frame, supports mpeg1,mpeg2,mpeg4 audio option:-ab sets bit rate (in bit/s) Maybe the old version is kb/s) front-when ac is set to stereo, it should be set at half the bit rate, for example, if 192kbps is set to 96, the conversion default bit rate is low, and it is recommended to set it above 160kbps (80) to hear a higher quality sound. -aframes number sets how many frames (frame) of audio to convert-aq quality sets audio quality (specify encoding)-ar rate sets audio sampling rate (in Hz), PSP only recognizes 24000-ac channels sets the number of channels, 1 is mono, 2 is stereo, TVrip for mono conversion can use 1 (save half the capacity) For high-quality DVDrip, you can use 2-an to cancel audio-acodec codec to specify audio encoding ('copy' to copy stream)-vol volume sets the recording volume (default is 256). Some DVDrip have very low AC3 track volume, which can be used to increase the volume during conversion. For example, 200 is twice as much as the original-newaudio adds a new audio stream subtitle option after the current audio stream:-sn cancels the subtitle-scodec codec sets the subtitle encoding ('copy' to copy stream)-newsubtitle adds after the current subtitle-slang code sets the ISO 639 encoding (3 letters) Audio/Video capture option:-vc channel sets the video capture channel (DV1394 only)-tvstd standard setting

Convert to flv:

Ffmpeg-I test.mp3-ab 56-ar 22050-b 500-r 15-s 320x240 test.flv

Ffmpeg-I test.wmv-ab 56-ar 22050-b 500-r 15-s 320x240 test.flv

While converting the file format, capture the thumbnail:

Ffmpeg-I "test.avi"-y-f image2-ss 8-t 0.001-s 350x240 'test.jpg'

Capture pictures of existing flv:

Ffmpeg-I "test.flv"-y-f image2-ss 8-t 0.001-s 350x240 'test.jpg'

Convert to 3gp:

Ffmpeg-y-I test.mpeg-bitexact-vcodec h363-b 128-r 15-s 176x144-acodec aac-ac 2-ar 22500-ab 24-f 3gp test.3gp

Ffmpeg-y-I test.mpeg-ac 1-acodec amr_nb-ar 8000-s 176x144-b 128-r 15 test.3gp

The above content is the analysis of ffmpeg Chinese parameters. Have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report