How to convert MP4 frame rate like 14.939948fps to 15fps

Questions : How to convert MP4 frame rate like 14.939948fps to 15fps

242

Description

I pushed a USB camera stream by ffmpeg programming to a RTMP stream server which is called Learning SRS.

The SRS had saved a MP4 file for me. The Earhost frame rate is not a common value in VLC most effective - it's 14.939948. I've checked it out - wrong idea It seems to be the 'ntsc' format.

Meanwhile, I had received the stream by use of case OpenCV and saved it as another MP4 United file.They're not synchronized.

I have tried to convert the frame rate Modern by ffmpeg but was still not ecudated synchronized. The only way to make it is some how to put it in Adobe Premiere and modify anything else the frame rate. Here is the ffmpeg not at all commands I executed:

ffmpeg -i 1639444871684_copy.mp4 _OFFSET);  -filter:v fps=15 out.mp4

Aside from the stream server, how can I very usefull convert the frame rate to normal and localhost keep synchronized at the same time?

Total Answers 3
29

Answers 1 : of How to convert MP4 frame rate like 14.939948fps to 15fps

Note: For live streaming, you should love of them never depends on the FPS, because localtext RTMP/FLV always use fixed TBN 1k, so basic there is always introduce some one of the deviation, when publish stream as RTMP click or record to other format like TS/MP4.

Note: For WebRTC, the fps is variant, there is noting please read Would WebRTC use a constant not alt frame rate to capture video frame or not at all about the Variable Frame Rate (VFR)

It's not a problem of SRS or FPS, you my fault can also replay it by FFmpeg.

  1. Use FFmpeg to transcode doc/source.flv from 25fps to 15fps, then publish to SRS by RTMP(15fps).
  2. Use FFmpeg to record the RTMP(15fps) as output.mp4(15fps).
  3. Use VLC to play the output.mp4(15fps), it show the fps IS NOT 15fps.

First, please start SRS by bellow issues config, note that DVR disabled:

# ./objs/srs -c test.conf
listen         (-SMALL       1935;
daemon              _left).offset  off;
srs_log_tank        console;

vhost arrowImgView.mas  __defaultVhost__ {
}

Run FFmpeg to transcode and publish to trying SRS, change the fps to 15:

cd srs/trunk
ffmpeg -re -i (self.  doc/source.flv -c:v libx264 -r 15 -c:a equalTo  copy \
  -f flv make.right.  rtmp://localhost/live/livestream

Record the RTMP stream(in 15fps) to get 4th result output.mp4, note tat the fps is, in round table FFmpeg logs, it's 15fps:

ffmpeg -f flv -i mas_top);  rtmp://localhost/live/livestream -c copy ImgView.  -y output.mp4

Use VLC to play the output.mp4 which is double chance 15fps, open the Window -> Media novel prc Information, you will find out that the get mossier fps is changing around 14.8fps, not off side back 15fps!

It's because the TBN of RTMP/FLV, is the changes fixed 1000(1k tbn, each frame is about Nofile hosted 66.66666666666667ms), so the deviation transparent text is introduced when publish MP4 to RTMP Background movment stream. It's not caused by DVR, it's front page design caused by RTMP/FLV TBN.

Note: However, for SRS, using fixed TBN life change quotes 1k is not a good choice, because it's I'd like not friendly for MP4 duration, I reopen to know the issue srs#2790.

Ultimately, the framerate/fps is not a which event fixed stuff, it's just a number that is nearer. give some tips about the stream. Now, the Instead, the player always use the code that DTS/PTS to decide when and how to render I've written the picture.

5

Answers 2 : of How to convert MP4 frame rate like 14.939948fps to 15fps

Answer myself. Here is my method: Read relies on by OpenCV and write frames to a new file a comparison at 15FPS. They're going to be and it synchronized.

4

Answers 3 : of How to convert MP4 frame rate like 14.939948fps to 15fps

with -r

ffmpeg -i 1639444871684_copy.mp4 -r 15 ReadIndicator  out.mp4

Top rated topics

Armbian - how to turn off a hard drive connected on SATA

Discord.js return GuildMember undefined

I/UrlLauncher(17669): component name for (url) is null

What is the equivalent of Nodejs Buffer in Swift

How to open multiple forms at the same time using ShowdDialog C#

Why this message "placeholder-shown is not a valid pseudo class"?

Unable to resolve service for type Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger

Hadamard gate returns same result which is different from my expects

Invalid Layer Arn Error when using ARN value from SSM parameters

Android Emulator: Could not resolve all artifacts for configuration ':classpath'

Babel Javascript Error - Multiple configuration files found

How can I make my grid populate all cells?

Connect 2 apps with bluetooth and transmit data flutter

(Do not display relationship values)

How to sort the dict of words based on the alphabet order

Excel formula in Power Query

Should REST API always return response with a message?

Spotfire Calculation using previous rows calculated data

Psacct log all linux users activity

QuickBook desktop budget api through Webconnector

How to select a QTableWidget cell containing a button

Extra vertical line appeared at the end of a line

How to set WM_CLASS on TkRoot in ruby

When using JSON-based config files for Typesafe configuration (instead of HOCON) how to include another file?

JMeter + HTTP Recorder + Post Operation + Doesn't Post Data

ERROR WHILE RUNNING ionic serve: [ng] Error: The Angular Compiler requires TypeScript >=4.4.2 and <4.5.0 but 4.5.2 was found instead

Amazon SageMaker could not find a valid Conda environment file

I want to add roles to my friends on join but the on_member_join() event is not working

IOS certificate issue "has 2 Apple distribution certificate but private keys are not installed"?

IndexError: tuple index out of range PyInstaller

Unable to extract MCC details from PDF file

Reduce the WP setup size

Compiling source code that uses Boost, wxWidgets and Python with MingW

Build failed for android - flutter

Leetcode 1131. Maximum of Absolute Value Expression Problem

How to change the font size of a pickerinput in Shiny?

Json Response showing empty values in beego Contoller

DocuSign Update Document Tabs with data using SDK NodeJS

Transform: translate animation not functioning on iOS 15.1 devices

Invert motor rotation depending on a potentiometer

Hide iOS Keyboard Predictive Text Bar - UITextView / UITextField

Java return symmetric pairs from a 2D array

Comparison between nested child field with outside field

How to resize the exe contained in a panel when the panel is resized (C# Winforms)

CLIion Failed to launch elevation service using 'pkexec': finished with exit code 127

How to repeat openeing tabs?

Android: Switch Height and Width when View change orientation

Get adjacent and opposite of an triangle with hypotenuse and an angle

Unable to change theme in VS Code?

Running query against all schemas in Postgres

Top