Ffmpeg swscaler

agree with told all above..

Ffmpeg swscaler

GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community. Already on GitHub? Sign in to your account. Also I keep getting this msg every frame. I'm thinking if I can figure this out and remove the reason why this could be happening, it would speed up the frame grabbing by some bit at least.

It should be noted that out of all the phones I tested, this is the slowest one and seems to be the only one that gives this msg. Are you suggesting getting raw yuv data from the video, frame by frame, and assuming it's yuv convert it via RenderScript?

Also I try not to make assumptions with Android devices. And I ask humbly as you're clearly quite experienced! RenderScript and OpenGL are portable across devices yes. See this comment: comment.

Openwrt ax router

Skip to content. Dismiss Join GitHub today GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.

Sign up.

ffmpeg swscaler

New issue. Jump to bottom. Labels duplicate question. Copy link Quote reply. This comment has been minimized. Sign in to view. That would speed up things quite a bit. Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment.

Linked pull requests. You signed in with another tab or window.The FFmpeg rescaler provides a high-level interface to the libswscale library image conversion utilities. In particular it allows one to perform image rescaling and pixel format conversion. Options may be set by specifying - option value in the FFmpeg tools, with a few API-only exceptions noted below.

Set the scaler flags.

ffmpeg swscaler

This is also used to set the scaling algorithm. Only a single algorithm should be selected. Select Lanczos rescaling algorithm.

The default width alpha is 3 and can be changed by setting param0. If value is set to 1indicates source is full range. Default value is 0which indicates source is limited range. If value is set to 1enable full range for destination.

Default value is 0which enables limited range. Set scaling algorithm parameters. The specified values are specific of some scaling algorithms and ignored by others. The specified values are floating point number values. Set the dithering algorithm. Accepts one of the following values. Set the alpha blending to use when the input has alpha but the output does not.

Surse de energie conventionale

This document was generated on April 16, using makeinfo. Hosting provided by telepoint.VideoHelp Forum. Remember Me? Download free trial! Forum Video Video Conversion swscaler warning: data is not aligned. Results 1 to 11 of Hello folks. Just a quick question here. When combining downscaling and cropping, the following warning may appear "[swscaler bd] Warning: data is not aligned!

This can lead to a speed loss". I understand why this happens, but I am unfamiliar with its exact effect. Is it a speed loss on encode only?

Can it have some other side effect? I'm pretty sure it's about RAM usage and only effects encoding speed.

Cardboard fire log press

I'm no expert, but there's some info in the align description here Avisynth 's crop function. If it's ffmpeg you're using it might have a similar option. Well, I just discovered something. This warning was triggered because I was cropping the video before downscaling it, when working the other way around the warning does not appear because I downscale to p But now it begs the question.

When downscaling a p to p, would you rather crop before or after? I don't use ffmpeg for that sort of thing so I'm not familiar with it, but the advantage of cropping first is you can crop to a particular aspect ratio, such asand then resize to any dimensions. Or resize to a particular with or height. When you resize and then crop, it's much harder to do. If you don't care about the output being a specific aspect ratio etc, it doesn't matter. Standard practice for Avisynth would be something like this just inventing numbers.

Crop 4, 6, -4, -6 Spline36ResizeThat example crops to x which is 1. This would be pretty close - Crop 10, 6, Or you can specify a width and height but I'd have to play around to find out whether it can stretch the picture or ffmpeg prevents that by default etc. One thing I'm not sure about with ffmpeg, is always determining the default. How do you know what the default one is? YV12 video must have dimensions divisible by at least 2, but some programs default to 4 for backwards compatibility, and in the XVid days sticking to 16 was safest, but for example After cropping, the resized height to prevent distortion should be The program defaults to a mod4 height so it resizes to x You can maybe adjust the cropping a little, or fudge the pixel aspect ratio to compensate it'll be encoded at x but should display as x or you accept some distortion, which in this example is not enough to care about, but I'm not sure what ffmpeg does by default.

An easy way to check if the storage resolution and display aspect ratio are different is to ask MPC-HC. If they're not the same, the display aspect ratio is shown in brackets. The main advantage of cropping second is it's hard to go wrong with standard formats. You know x can be resized to x as they're the same aspect ratio, and from there you can crop freely without having to worry about distorting the picture. Attached Thumbnails.

Encoding Problem with swscaler

In this example my source is bluray stored at x so PAR is I however just find out that it does nothing to ensure that the final resolution will be mod2, resulting for example in a x resolution and forcing me to play with the cropping until the downscale is mod2, not ideal.

Last edited by ZetaStax; 24th Aug at By using our site, you acknowledge that you have read and understand our Cookie PolicyPrivacy Policyand our Terms of Service. Video Production Stack Exchange is a question and answer site for engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation.

It only takes a minute to sign up. I believe that libx is now capable of doing bit encodings, but I can't seem to get it to work. I'm using ffmpeg info belowand I've also tried the x encoder directly. I've tried. So it can do at 10 bit depth, and even at 10 bits apparently, but there's no indication of how to set the output bit depth. If using ffmpeg you can see what pixel formats and bit depths are supported by libx See Unify 8-bit and bit CLI and libraries for more info. I didn't compile it with swscale.

It was unhappy about an RGB pix fmt in libavutil or something. It errors out if the input colorspace doesn't match --output-csp iwhich is actually nice if you don't want to accidentally have x downsample the chroma. It worked fine when I fed it a few frames of yuvp14le.

Boruto box set 6 release date

It can truncate bit depth, but not downsample chroma without swscale. I obviously didn't try to see anything visually with those quality settings. I just wanted it to run fast, and not waste a bunch of disk space since I always end up making lots of output files when trying variations on things. Not piping the massive y4m data to a separate x process made it go 14 fps instead of 12, so a decent speedup for ultrafast.

Slower encodes will dwarf that overhead. My source is 48bit RGB. Even with -qp 0so I wasn't losing it to rounding error.

ffmpeg swscaler

Or ssdeep -p. There is one ffmpeg swscaler flag that matters, if you're letting ffmpeg downsample your chroma: lanczos instead of the default bicubic. I assume lanczos is still regarded as the best choice for high quality? Haven't read up for a while. Actually, ffmpeg's libx driver always insists on feeding x exactly the bit-depth it's compiled for. I think internally x the CLI always has to up-convert pixel formats, the code doesn't have 8bit input, 10bit output versions of every function.

I'm curious what happens when you feed the API input where there are higher bits set I'll go report that upstream Anyway, it turns out it was pretty darn easy to build myself a dual-bit-depth environment for ffmpeg, or any other program you want to run with high-bit-depth-compiled versions of libx, libx, and anything else you want. That's why I called it "highdepth", not just "10bit" for a shorter name.

Tried this myself, since you didn't try with a cmdline that tried to feed high bit depth input to x HiPP is the only profile that supports predictive lossless coding, which x uses for -qp 0 or -crf 0.

Anyway, here's a bunch of useless output from a command that doesn't work because I didn't recompile my local x But it should work with recompiled xIt can also convert between arbitrary sample rates and resize video on the fly with a high quality polyphase filter. Anything found on the command line which cannot be interpreted as an option is considered to be an output url.

Selecting which streams from which inputs will go into which output is either done automatically or with the -map option see the Stream selection chapter. To refer to input files in options, you must use their indices 0-based. Similarly, streams within a file are referred to by their indices.

Also see the Stream specifiers chapter. As a general rule, options are applied to the next specified file. Therefore, order is important, and you can have the same option on the command line multiple times. Each occurrence is then applied to the next input or output file. Exceptions from this rule are the global options e.

Do not mix input and output files — first specify all input files, then all output files. Also do not mix options which belong to different files. All options apply ONLY to the next input or output file and are reset between files.

The transcoding process in ffmpeg for each output can be described by the following diagram:. When there are multiple input files, ffmpeg tries to keep them synchronized by tracking lowest timestamp on any active input stream. Encoded packets are then passed to the decoder unless streamcopy is selected for the stream, see further for a description.

After filtering, the frames are passed to the encoder, which encodes them and outputs encoded packets. Finally those are passed to the muxer, which writes the encoded packets to the output file. Before encoding, ffmpeg can process raw audio and video frames using filters from the libavfilter library.

Several chained filters form a filter graph. Simple filtergraphs are those that have exactly one input and output, both of the same type. In the above diagram they can be represented by simply inserting an additional step between decoding and encoding:. Simple filtergraphs are configured with the per-stream -filter option with -vf and -af aliases for video and audio respectively. A simple filtergraph for video can look for example like this:.Gentoo users can now install using 'emerge ffmpeg-php'.

Debian users can now install using 'apt-get install php5-ffmpeg'. A big thanks to Raphael Geissert for all his work on this, and for all the tips on getting ffmpeg-php to play well with Debian's packaging system. A unoffical package for PHP4 is available at his personal repository. Email ffmpeg. CVS is still available from the command line but will no longer be updated.

Ffmpeg must be configured and compiled without the '--enable-swscale' flag. Some users have posted Windows builds to the ffmpeg-php google group. I hear from folks that they work great but I haven't had time to test them personally yet. Apparently there is some sort of conflict between the php IMAP extension and ffmpeg-php in certain cases.

ffmpeg swscaler

Features Simple object oriented interface. Ability to grab frames from movie files and return them as images that can be manipulated using PHP's built-in image functions.

This is great for automatically creating thumbnails for movie files. Has the ability to use ffmpeg's excellent re-sampling and cropping features on returned frames. Provides access to data from mp3 files such as duration, bit rate and track meta information. Sites Using ffmpeg-php Here's a list of some of my favorite sites using ffmpeg-php.

A: The ffmpeg-php extension uses ffmpeg libraries for access to video info. Some movie types have limited support in ffmpeg. Some encoders create non-standard movies which may cause problems for ffmpeg. If the movie can't be read correctly by ffmpeg then it won't work with ffmpeg-php. Consult the ffmpeg documentation for more info on supported formats. If ffmpeg-php won't read a movie, try using the ffmpeg command line program to convert the movie to another type.

If it fails, then ffmpeg and thus ffmpeg-php don't support your movie type. If ffmpeg converts it correctly then the problem is most likely in ffmpeg-php, in which case you can bug me about it. Ffmpeg-php was written specifically for a project I was working on and have now finished.

There is no ongoing development at all beyond just keeping it compatible with the ever changing ffmpeg API and even then I just wait for someone to complain. That said, I am available for hire if you need further development or customization as long as the resulting code is made open source also.

Q: I can't get it to install. What's the deal? Ffmpeg-php can sometimes be a pain to install. Sometimes this fails for no apparent reason. Add to that the ever changing ffmpeg SVN and it can get even more tricky. If you get stuck, ask on the Google group and someone can probably talk you through it. I'll need ssh root access to the machine and about 45 minutes.Search everywhere only in this topic.

Advanced Search.

Play Audio File From Terminal With ffmpeg ffplay

Classic List Threaded. Warning: data is not aligned! This can lead to a speedloss. Hello, The following command seems to execute fine with no perceptible loss in audio sync but there is a warning issued: [swscaler 0x7ffc8a] Warning: data is not aligned!

What is causing it and how can I eliminate it? Thank you, Kevin. If you are not the intended recipient of this e-mail, you are notified that any dissemination, distribution or copying of it including any attachmentsor taking any actions based on it, is prohibited.

If you have received this e-mail in error, please immediately notify the sender by reply e-mail, delete the original, and destroy any copies or printouts. Thank you. Moritz Barsnick. Re: Warning: data is not aligned!

swScaler: Unknown format is not supported as input pixel format

It means that one of the input or output dimensions when scaling is not multiple of Thereby, the accelerated scaling code e. IMHO, it's nothing you should worry about nor anything you would do something about. It does sometimes hint at another issue: If the final dimensions aren't multiples of 8, 16, 32 depending on codecthe codec may behave suboptimally.

So you need to choose your target size wisely sometimes. This is not an issue in your quoted case though. I feel privileged now! Search everywhere only in this topic Advanced Search Warning: data is not aligned! Free forum by Nabble. Edit this page.


thoughts on “Ffmpeg swscaler

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top