avidemux3_cli 2.6.1 changes frame rate for mp4 files from constant to variable

Started by videofan, January 13, 2013, 09:16:29 AM

Previous topic - Next topic

videofan

I am loading a very short mp4 and appending a duplicate of this mp4 to test the output of avidemux 2.6.1. The result ends up having variable frame rate when in fact the source is 25 fps constant frame rate material. The previous version of avidemux (2.5.x) preserved constant frame rate material when joining it, is there anything I can do to keep the proper frame rate? The command I used is below.

avidemux3_cli --load 1.mp4 --append 2.mp4 --output-format MP4 --save output.mp4

mean


videofan

I used source_r8385.tar.gz  [13-Jan-2013 03:04   16M] from http://www.avidemux.org/nightly/snapshot/. Same result. Was the code supposed to have the patch the other thread mentioned or did I use the wrong one (it seemed like the newest)? Thanks

Frame rate mode                          : Variable
Frame rate                               : 24.983 fps
Original frame rate                      : 25.000 fps
Minimum frame rate                       : 8.333 fps
Maximum frame rate                       : 25.000 fps

Jan Gruuthuse

My guess you need to set codec in GUI and create/save a project file and call that project from your command line.
Something along the line I used for audio, basic explanation: 2.6 audio track switching in job.py

videofan

I'd much rather use the patch it seems a lot less complex/confusing. I'm not sure what your link did (looks like it has to do with audio) but my issue is the frame rate is being altered and I want to prevent that.

If anyone can help me with where to save the two patch files from link below would appreciate it. Thanks

http://avidemux.org/smuf/index.php/topic,11670.0.html

Jan Gruuthuse

Quote8376 -  Modified Wed Jan 9 06:37:09 2013 UTC (4 days, 4 hours ago) by mean
[videoCopy] Fixup dts in copy mode when there is a hole, patch by jfx

As I understand this patch is already committed. Did write along the lines, example is audio, is only example how to call saved project. References to loaded video should be edited out of saved project.
http://www.avidemux.org/admWiki/doku.php?id=using:command_line_usage
http://www.avidemux.org/admWiki/doku.php?id=tutorial:batch_processing

videofan

Quote from: Jan Gruuthuse on January 13, 2013, 10:50:44 AM
My guess you need to set codec in GUI and create/save a project file and call that project from your command line.
Something along the line I used for audio, basic explanation: 2.6 audio track switching in job.py

I used the GUI and exported to both output formats (mp4 and mp4v2), they still produced variable frame rate results. The below are created via GUI (latest build r8385). It seems this bug is not fixed entirely then? You can reproduce this by just attempting to join a small mp4 with all unique frames to a copy of itself.

output MP4 Muxer:
Frame rate mode                          : Variable
Frame rate                               : 24.975 fps
Original frame rate                      : 25.000 fps
Minimum frame rate                       : 6.250 fps
Maximum frame rate                       : 25.025 fps

output MP4v2 Muxer:
Frame rate mode                          : Variable
Frame rate                               : 24.975 fps
Original frame rate                      : 25.000 fps
Minimum frame rate                       : 6.250 fps
Maximum frame rate                       : 25.007 fps

videofan

I've run into issues with 2.5.6 that I found documented on the web that didn't really have answers... so I think 2.6.1 is my best bet since it actually was able to produce an output file when joining mp4 files. Jan using your method will it join the mp4 files together and keep a constant frame rate (25fps)? I looked at the link and I guess i didn't see how it will preserve constant frame rate. If I provided a source sample here would someone be able to see if they can append it to itself and still have a constant frame rate?

If I output it to an AVI container the frame rate remains constant, but I need to use output format MP4 at a constant frame rate (the source is constant already).

Jan Gruuthuse

The method using saved Project and loading these, will not work. As far as I can see currently you can't set a fixed FPS in 2.6.# . Even not when using the change FPS filter.
Perhaps developer(s) can enlighten more on this.

When using the cutting [A ] [ B] [Ctrl X] and only using copy for video/audio. The FPS stays the same as in the original. No re-encoding takes place.
When re-encoding in the newer codecs, the FPS shows deviations/or is variable as you noticed.
I found currently no other way.