Avidemux Forum

Avidemux => Windows => Topic started by: picard2 on November 22, 2017, 07:11:48 PM

Title: Wrong aspect ratio after cutting/copy mp4 SD with Avidemux 2.7.0
Post by: picard2 on November 22, 2017, 07:11:48 PM
Since Avidemux 2.7.0 SD mp4-videos are not longer cut (without conversion) correctly, but HD does.
The source file is shown with VLC-player correct in 16:9 format, but after cutting it is compressed horizontally to 4:3.
Originally 4:3 format mp4 files are cut correctly, like 16:9 HD (720p).
I used just copy audio and video and output format MP4 Muxer.
The data of an example-source file (from www.youtv.de) is:
Codec 4CC:      H264
Auflösung:      720 x 576
Seitenverhältnis:   PAL 16:9 (64:45)
Bildrate:                  25.000 fps
Gesamtdauer:      00:00:20,040
ExtraData-Länge:   43
Extra data:      01 4D 40 1E FF E1 00 1C 67 4D

Cutting with 2.6.9 works correct , but there were other bugs.
I use the windows version Win7 64 bit.

Many thanks,
Picard
Title: Re: Wrong aspect ratio after cutting/copy mp4 SD with Avidemux 2.7.0
Post by: eumagga0x2a on November 23, 2017, 12:06:36 AM
If you remux videos as MKV, you could enable "force display width" --> "1024" in the MKV muxer configuration. I don't know how PAR (pixel aspect ratio) could be set in a MP4 at the container level.
Title: Re: Wrong aspect ratio after cutting/copy mp4 SD with Avidemux 2.7.0
Post by: Jan Gruuthuse on November 23, 2017, 06:26:34 AM
Perhaps ffmpeg? However no idea if this can be used in avidemux?
See ffmpeg 10.146 setdar, setsar (https://ffmpeg.org/ffmpeg-filters.html#setdar_002c-setsar)
Title: Re: Wrong aspect ratio after cutting/copy mp4 SD with Avidemux 2.7.0
Post by: AQUAR on November 23, 2017, 12:38:48 PM
You could use a utility like MP4BOX to change the PAR metadata in an MP4 container.
Title: Re: Wrong aspect ratio after cutting/copy mp4 SD with Avidemux 2.7.0
Post by: picard2 on November 23, 2017, 06:23:58 PM
Thanks for your answers, but converting is no solution, it need to much time.
I hope the error will be fixed in the next version of avidemux. This should be possible, because it was no error in the last version of avidemux.
Title: Re: Wrong aspect ratio after cutting/copy mp4 SD with Avidemux 2.7.0
Post by: eumagga0x2a on November 23, 2017, 11:46:47 PM
I can't say anything about 2.6.9 – it is too ancient. It doesn't look like the MP4 muxer ever had an ability to set pixel (in FFmpeg terms: sample) aspect ratio. The default is 1:1.

Are you really sure that the behaviour changed with 2.7.0? The last version before that was 2.6.21.

AQUAR has suggested a tool to modify metadata only, no reencoding needed.
Title: Re: Wrong aspect ratio after cutting/copy mp4 SD with Avidemux 2.7.0
Post by: eumagga0x2a on November 26, 2017, 05:12:03 PM
I've added an option (https://github.com/mean00/avidemux2/commit/9056cebade4e4a59cd8108a4098ebd2f2dc1ba1e) to set pixel aspect ratio to the MP4 muxer implemented as a menu with popular display aspect ratios 4:3, 16:9, 18:9 and 64:27. There is no automatism, e.i. if you want anything different from 1:1, check the "force aspect ratio (DAR)" checkbox in the muxer config.

If you don't build Avidemux from source yourself, you'll have to wait for a fresh set of Windows nightlies (http://avidemux.org/nightly/win64/) to use this feature.
Title: Re: Wrong aspect ratio after cutting/copy mp4 SD with Avidemux 2.7.0
Post by: picard2 on December 27, 2017, 12:26:04 PM
Sorry for my late answer, eumagga0x2a.
I tested the nightly build with your added flag for aspect ratio.
It works fine, thanks!

picard