What is the FFmpeg parameters for encode video which looks like the specifications?

1

1

Is there anyway to encode video by these specifications? (Main & level 3.1 & ReFrames: 3 frames & Chroma subsampling: 4:2:0 , ... )

FFmpeg:

Stream #0:0: Video: h264 (Main), yuv420p(progressive), 768x576, 358 kb/s, 25 fps, 25 tbr, 1k tbn, 50 tbc
Stream #0:1: Audio: aac (LC), 48000 Hz, stereo, fltp, 49 kb/s

MediaInfo:

Format                                   : Flash Video
File size                                : 2.70 MiB
Duration                                 : 1 min 0 s
Overall bit rate                         : 420 kb/s    

Video
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : Main@L3.1
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 3 frames
Codec ID                                 : 7
Duration                                 : 1 min 0 s
Bit rate                                 : 350 kb/s
Width                                    : 768 pixels
Height                                   : 576 pixels
Display aspect ratio                     : 4:3
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.032

Audio
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : LC
Codec ID                                 : 10
Duration                                 : 1 min 0 s
Bit rate                                 : 48.0 kb/s
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 spf)
Compression mode                         : Lossy    

AbdolAliE

Posted 2017-02-28T07:19:26.087

Reputation: 25

Have you done any research before asking this question? Next time, please show what you've already tried. – slhck – 2017-02-28T12:09:14.490

@slhck Yes, I've done a lot research! I downloaded many videos from a live stream site & need to add video note to the end of them by concatenating without re-encoding. But when I concatenate them to each other, my video note doesn't play! – AbdolAliE – 2017-02-28T20:45:09.803

1Ah, I see. That is the question/problem you should have asked about instead of asking how to create a certain video that fits some requirements. It's always better to ask about the actual problem rather than the solution you think you have. Please remember that for the future and always tell us what you're really trying to achieve. – slhck – 2017-03-01T08:41:59.027

Answers

0

Use

ffmpeg -i in.mp4 -c:v libx264 -pix_fmt yuv420p -profile:v main -level:v 3.1 -refs 3 -x264opts b-pyramid=0 -c:a copy out.mp4

Gyan

Posted 2017-02-28T07:19:26.087

Reputation: 21 016

Thank you. This command produced a video but MediaInfo says that its ReFrames is 4. I need to add video notes to the end of my files by concatenating without re-encoding. But after concatenating them to each other, my video note section doesn't play!!! – AbdolAliE – 2017-02-28T20:55:54.117

1

See edited command. Avoid asking XY problems. What's the full properties of both your videos - mediainfo and ffprobe?

– Gyan – 2017-03-01T05:14:27.190