The discussion on StackOverflow <https://stackoverflow.com/questions/52390694/video-moves-sideways-when-captured-raw-from-camera-and-piped-into-ffplay?noredirect=1#comment91816164_52390694> shed some light on what's going on and provided one possible solution. I one uses `-vsync 2` or `-vsync vfr` option, the frame size would be correct:
$ ffmpeg -f avfoundation -pixel_format 0rgb -framerate 25 -video_size 1280x720 -i "0" -map 0:v -vsync vfr -f rawvideo -vframes 1 /tmp/frame.0rgb $ wc -c /tmp/frame.0rgb 3686400 /tmp/frame.0rgb The possible explanation, I believe, is this: "*avfoundation is reporting the framerate of the source as 1000k tbr i.e. a million, and for constant frame rate muxers, ffmpeg will duplicate frames to get that rate if input rate is lacking. -vsync vfr or 2 disables that behaviour. *". So, is it a muxer's fault? And should we expect the original command to yield correct frame sizes? Thanks, On Wed, 19 Sep 2018 at 14:50, Peter <gpeet...@gmail.com> wrote: > Yes, > it is default internal camera. > > > -- > Peter Gusev > *gpeet...@gmail.com <gpeet...@gmail.com>* > *+1 213 5872748 <+1%20213%205872748>* > *peetonn_ (skype)* > > On Sep 19, 2018, at 2:31 PM, Carl Eugen Hoyos <ceffm...@gmail.com> wrote: > > 2018-09-19 15:33 GMT+02:00, Peter Gusev <gpeet...@gmail.com>: > > As a part of figuring out the problem I have with ffplay > > < > https://stackoverflow.com/questions/52390694/video-moves-sideways-when-captured-raw-from-camera-and-piped-into-ffplay/52399554#52399554 > >, > > I noticed, that ffmpeg adds 32 bytes to raw 0rgb frames when capturing from > > a camera (macOS 10.12): > > > Is this an internal camera? > > Carl Eugen > _______________________________________________ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-user > > To unsubscribe, visit link above, or email > ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". > > -- Peter Gusev <https://www.linkedin.com/in/peter-gusev-8135441a/> *gpeet...@gmail.com <gpeet...@gmail.com>* *+1 213 587-27-48* *Research Scholar @ REMAP UCLA <http://www.remap.ucla.edu/home/about>Video streaming/ICN networks/Creative Coding/Interactive Media* *dj peetonn <https://soundcloud.com/peter-gusev>* _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".