Opened 12 years ago
Last modified 2 years ago
#3674 open defect
WMP does not accept sample aspect ratio close to 1 but != 1 in mov
| Reported by: | mfz | Owned by: | |
|---|---|---|---|
| Priority: | important | Component: | avcodec |
| Version: | git-master | Keywords: | mov libx264 regression |
| Cc: | Blocked By: | ||
| Blocking: | Reproduced by developer: | yes | |
| Analyzed by developer: | no |
Description
Summary of the bug:
I have a screen recorded video with frame rate 15, video codec H.264 (MP4) and AAC as audio. The target via FFmpeg should contain frame rate 25, height of 720 pixel and the codecs without change.
After encoding, the file is playable in VLC player, Chrome browser (HTML5 video tag) and Firefox. In Windows Media player I just get the audio played (no video to see) and in Internet Explorer 11, I get an error ("Unknown source.")
How to reproduce:
% ffmpeg -i input_file.mp4 -vf "scale='(trunc((out_h*a)/2)*2):(min(720, in_h))'" output_file.mp4 VERSION: N-63439-g96470ca N-63439-g96470ca
Strange is: If I encode the video with a height of 718 or 722 (or any other height I tried), the video is playable anywhere - without problems.
Test video file for input (short, length of 1 second):
http://www.datafilehost.com/d/1ca920ac
Attachments (5)
Change History (11)
by , 12 years ago
| Attachment: | ffmpeg-20140526-110709.log added |
|---|
by , 12 years ago
| Attachment: | h264_height_720_only_audio_in.mp4 added |
|---|
comment:1 by , 12 years ago
| Keywords: | mov added; height audio windows media player internet explorer removed |
|---|---|
| Summary: | Just audio without video in windows decoder → WMP does not accept sample aspect ratio close to 1 but != 1 in mov |
| Version: | unspecified → git-master |
The issue can be reproduced with the following command line:
$ ffmpeg -f lavfi -i testsrc=s=1280x832 -pix_fmt yuv420p -t 10 -vcodec h264 -vf scale=1106x720 out.mp4
Work-around is to specify -vf setsar=1
Since so many players have no problem with the sample aspect ratio: Did you report the problem to Micrososft?
comment:2 by , 12 years ago
I could successfully use your specified workaround to get it working. Thanks a lot!
I have not yet reported the issue to Microsoft but will do exactly that in a minute.
comment:3 by , 12 years ago
| Keywords: | libx264 regression added; h264 removed |
|---|---|
| Priority: | normal → important |
| Reproduced by developer: | set |
| Status: | new → open |
Seems to be a regression since 4557d7d0 related to ticket #570.
by , 12 years ago
| Attachment: | different.mp4 added |
|---|
by , 12 years ago
| Attachment: | equal1.mp4 added |
|---|
by , 12 years ago
| Attachment: | equal2.mp4 added |
|---|
comment:4 by , 12 years ago
I attached three addtional samples to make an analysis slightly simpler (and to show that the issue is not the different video and container sample aspect ratio):
Only equal1.mp4 can be played with WMP, both different.mp4 and equal2.mp4 fail.
The issue is not just a DAR overflow, I created a file with the following properties that plays fine:
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x962 [SAR 1309:1307 DAR 837760:628667], 123 kb/s, SAR 7200:7189 DAR 833978:625829, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
comment:5 by , 12 years ago
$ ffmpeg -i equal1.mp4 -i equal2.mp4 -i different.mp4
ffmpeg version N-63441-g99d742a Copyright (c) 2000-2014 the FFmpeg developers
built on May 26 2014 16:51:14 with gcc 4.7 (SUSE Linux)
configuration: --enable-gpl --enable-libx264
libavutil 52. 86.100 / 52. 86.100
libavcodec 55. 65.100 / 55. 65.100
libavformat 55. 41.100 / 55. 41.100
libavdevice 55. 13.101 / 55. 13.101
libavfilter 4. 5.100 / 4. 5.100
libswscale 2. 6.100 / 2. 6.100
libswresample 0. 19.100 / 0. 19.100
libpostproc 52. 3.100 / 52. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'equal1.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf55.41.100
Duration: 00:00:10.00, start: 0.000000, bitrate: 98 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1106x720 [SAR 7200:7189 DAR 20:13], 94 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'equal2.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf55.41.100
Duration: 00:00:10.00, start: 0.000000, bitrate: 98 kb/s
Stream #1:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1106x720 [SAR 1309:1307 DAR 723877:470520], 94 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Input #2, mov,mp4,m4a,3gp,3g2,mj2, from 'different.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf55.41.100
Duration: 00:00:10.00, start: 0.000000, bitrate: 98 kb/s
Stream #2:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1106x720 [SAR 1309:1307 DAR 723877:470520], 94 kb/s, SAR 7200:7189 DAR 20:13, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
At least one output file must be specified
comment:6 by , 2 years ago
Legacy Windows Media player in windows 11 plays it just fine. So this was a bug in old windows.



Report output for test case