Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VideoFileClip opens file with wrong width #48

Closed
reidoda opened this issue Jun 20, 2014 · 6 comments
Closed

VideoFileClip opens file with wrong width #48

reidoda opened this issue Jun 20, 2014 · 6 comments

Comments

@reidoda
Copy link

reidoda commented Jun 20, 2014

I have a video file that is 426x240, but is opened as 320x240. Is there a way to specify the proper size?

@Zulko
Copy link
Owner

Zulko commented Jun 20, 2014

It may be complicated to change the size a posteriori. Could you provide the file ? Or at least run

ffmpeg -i yourfile.mp4

and paste the output here ? So that I can see if the bug can be fixed.

@reidoda
Copy link
Author

reidoda commented Jun 20, 2014

Wow. Thanks for the quick response. The file is here:

https://www.dropbox.com/s/rd84ofj6qoda5fb/test.MP4

And the output of ffmpeg -i test.MP4 is:

ffmpeg version 2.2.3 Copyright (c) 2000-2014 the FFmpeg developers
built on Jun 3 2014 06:47:04 with Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
configuration: --prefix=/usr/local/Cellar/ffmpeg/2.2.3 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-avresample --enable-vda --cc=clang --host-cflags= --host-ldflags= --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libxvid
libavutil 52. 66.100 / 52. 66.100
libavcodec 55. 52.102 / 55. 52.102
libavformat 55. 33.100 / 55. 33.100
libavdevice 55. 10.100 / 55. 10.100
libavfilter 4. 2.100 / 4. 2.100
libavresample 1. 2. 0 / 1. 2. 0
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 'test.MP4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf55.33.100
Duration: 00:03:49.21, start: 0.021333, bitrate: 908 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 320x240 [SAR 4:3 DAR 16:9], 821 kb/s, 24 fps, 24 tbr, 12288 tbn, 48 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 82 kb/s (default)
Metadata:
handler_name : SoundHandler

@reidoda
Copy link
Author

reidoda commented Jun 20, 2014

Actually, don't spend any time on this just yet. I might know what the problem is.

@Zulko
Copy link
Owner

Zulko commented Jun 21, 2014

Tell me when/if I can close the issue.

@reidoda
Copy link
Author

reidoda commented Jun 22, 2014

This can be closed. It was caused because I made an error when using ffmpeg change the frame size. Thanks a lot for the responsiveness.

@reidoda reidoda closed this as completed Jun 22, 2014
@davidwdw
Copy link

davidwdw commented Oct 4, 2020

Hi, I'm having the same issue. It appears that @reidoda 's video is an anamorphic widescreen [SAR 4:3 DAR 16:9], where the sample and display aspect ratios are different. I'm am encountering the same issue with my anamorphic widescreen compressed videos and I did not see an option in the VideoFileClip source code to resize according to DAR not SAR. Could you reopen this issue and include automatic resizing to DAR instead of SAR? If not, could you recommend how I work with such data? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants