Opened 12 years ago
Closed 12 years ago
#3502 closed defect (fixed)
Sample Aspect Ratio width must be greater than 0 (libx265)
| Reported by: | Bernardo | Owned by: | |
|---|---|---|---|
| Priority: | normal | Component: | undetermined |
| Version: | git-master | Keywords: | libx265 |
| Cc: | Blocked By: | ||
| Blocking: | Reproduced by developer: | no | |
| Analyzed by developer: | no |
Description
Summary of the bug:
I was trying h.265 encoding with libx265 and for the video files I tried, it showed an error:
x265 [error]: Sample Aspect Ratio width must be greater than 0
The only way to make it start encoding was to use the "setsar" filter, but the final video is not playable. This is the output when playing the file (repeated some 1000x):
[hevc @ 0x911020] PPS id out of range: 0
[hevc @ 0x911020] Error parsing NAL unit #0.
Is there a simple command line that is known to work with libx265 for sure?
How to reproduce:
ffmpeg -y -i Madeon_filtered.mp4 -c:v libx265 -b:v 500K -c:a copy -strict experimental Madeon_H265.mp4
ffmpeg version N-50947-gc05065a Copyright (c) 2000-2014 the FFmpeg developers
built on Mar 26 2014 08:05:26 with gcc 4.8 (Ubuntu/Linaro 4.8.1-10ubuntu9)
configuration: --enable-gpl --enable-libass --enable-libfaac --enable-libfdk-aac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libspeex --enable-librtmp --enable-libtheora --enable-libvorbis --enable-libvpx --enable-x11grab --enable-libx264 --enable-nonfree --enable-version3 --enable-libfreetype --enable-libopus --enable-shared --enable-libx265
libavutil 52. 69.100 / 52. 69.100
libavcodec 55. 54.100 / 55. 54.100
libavformat 55. 35.101 / 55. 35.101
libavdevice 55. 11.100 / 55. 11.100
libavfilter 4. 3.100 / 4. 3.100
libswscale 2. 5.102 / 2. 5.102
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Madeon_filtered.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf55.2.100
Duration: 00:03:55.20, start: 0.046440, bitrate: 6766 kb/s
Stream #0:0(und): Video: h264 (High 4:4:4 Predictive) (avc1 / 0x31637661), yuv444p, 640x358, 6632 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
Metadata:
handler_name : SoundHandler
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
x265 [error]: Sample Aspect Ratio width must be greater than 0
[libx265 @ 0xd3e320] Cannot open libx265 encoder.
Output #0, mp4, to 'Madeon_H265.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf55.2.100
Stream #0:0(und): Video: hevc, yuv444p, 640x358, q=2-31, 500 kb/s, 90k tbn, 23.98 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac, 44100 Hz, stereo, 128 kb/s (default)
Metadata:
handler_name : SoundHandler
Stream mapping:
Stream #0:0 -> #0:0 (h264 -> libx265)
Stream #0:1 -> #0:1 (copy)
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Attachments (1)
Change History (5)
comment:1 by , 12 years ago
| Keywords: | libx265 added |
|---|
by , 12 years ago
| Attachment: | Madeon_small.mp4 added |
|---|
First 2 seconds of the file used before. Shows the same problem.
comment:2 by , 12 years ago
| Status: | new → open |
|---|---|
| Summary: | Sample Aspect Ration width must be greater than 0 (libx265) → Sample Aspect Ratio width must be greater than 0 (libx265) |
comment:3 by , 12 years ago
Arch Linux wiki suggests setting -aspect manually as a workaround: https://wiki.archlinux.org/index.php/FFmpeg#x265
comment:4 by , 12 years ago
| Resolution: | → fixed |
|---|---|
| Status: | open → closed |
cant reproduce, i assume it has been fixed by derek in cdd21f1f03c5d59aad8f0244b1be0f864d8416a7



Please provide a (short) input sample.