While you might be able to achieve this by manually using ffmpeg's crop filter, the stereo3d filter is designed specifically for this purpose. You didn't specify the exact 3d format you have. There are several possibilities as documented at the the stereo3d link above. Assuming that input.mkv is the relatively common sbsl (side-by-side left eye on left),
I realise this question is pretty old now but it still comes up quite high in search results so I would like to document how I got the "sr" to work (August 2020) in case it can help someone else. Before proceeding it is worth saying that I was not overly impressed by the result. I felt on my test videos that lanczos did an ever so slightly better ...
Since Google Summer of Code 2018, FFMpeg has supported the sr filter for applying super-resolution methods based on convolutional neural networks. However, as you have discovered, few super-resolution tutorials exist, and compiling FFMpeg with proper libraries and preparing models for super-resolution requires expert knowledge.
To make super-resolution in ...
ffmpeg -i "input.mov" -vf
-vcodec libx264 -b:v 1600k -bufsize:v 1600k -r 30000/1001 output.mp4
The scale filters use the conditional if(a,b,c) expression i.e. if a then b else c. I check if the ...
-vf "scale=iw*min(1920/iw\,1080/ih):ih*min(1920/iw\,1080/ih), pad=1920:1080:(1920-iw*min(1920/iw\,1080/ih))/2:(1080-ih*min(1920/iw\,1080/ih))/2"
This code evaluates which ratio to apply for scaling, then scales it and finally applys the requisite amount of padding.
Filter complex isn't needed. When a series of filters are to be applied to a single input in sequence, they are to be separated with a comma and passed along as a single filterchain (-vf, -af). You already did that with the setsar. So,
ffmpeg -i input.m2t -vf "scale=852:480,setsar=1,eq=brightness=0.1:saturation=1.5" -crf 24 -c:a aac -b:a 48k -ac 1 -...
The scale filter will adjust the sample aspect ratio to maintain the original display aspect ratio, which is 16:9 for your input. Use the SAR filter to reset the SAR after scaling.
ffmpeg -i 1.mp4 -vf scale=2000:100,setsar=1 2.mp4
If all you need to do is superscale an image, going through the trouble of training neural networks is re-inventing the wheel. By all means, if you're studying computer science and are interested in AI/ML, I'd encourage you to look into it, but to just superscale an image, you don't need to train a neural network. There are tools available.
In DaVinci ...
If you're using an older Version of Premiere:
As mentioned above, you can apply the maximum scale on the original clip,
then nest the clip (right click > Nest), and here apply another scale transformation.
With every iteration of this step you will gain 300%.
Hope this helps.
I dug further and after reading the entire topic at Personal View, I found that user willyfan suggested to add in_range=full to both first scale arguments to correct a color shift that he also observed. And it works. So here is the full ffmpeg code, adapted from karl's script, for windows:
ffmpeg -i "input.MP4" -filter_complex "extractplanes=y+u+v[y][u][v]; ...
Changing the preference doesn't change any clip settings retroactively. But once you have set it, and then create a new project and a new sequence, and when you freshly import your 4K clip and drop that freshly imported clip onto your freshly created sequence in your freshly created project, it should work as you expect. And if you right click on the clip, ...
In order to maintain the aspect ratio of the source movie through FFMpeg's scaler, you have to specify a scale with an unknown:
ffmpeg -i input.mp4 -an -vcodec libx264 -profile:v main \
-pass 2 -vf scale=-1:180 -pix_fmt (etc...)
The "-1" will tell the scaler to make the output 180px high, and however many pixels wide the output must be to preserve it's ...
ffmpeg -i input.mp4 -vf "scale=1920:1080:flags=lanczos,setsar=1" output.mp4
This will stretch the video to 1920x1080.
ffmpeg -i input.mp4 -vf "scale=-1:1080:flags=lanczos,setsar=1,pad=1920:1080:(ow-iw)/2:(oh-ih)/2" output.mp4
This will keep the aspect ratio but place black bars on the left and right.
The flag in the scale filter determines ...
Scale to Frame Size
Scales the clip to fit the size used in the current sequence whilst retaining the original aspect ratio to fit within the frame. Essentially, the clip has been rasterized to match the resolution used on the current sequence.
Despite adjustments to the size of the clip, the scale setting in the Video Effects panel for the clip will ...
Try adding the -pix_fmt yuv420p10le option (e.g. before -vf). Or only -pix_fmt + for using the same pixel format as the input video has.
If it doesn't help, you obviously have an inappropriate, albeit more common FFmpeg version — only for 8-bit colors. (Your original video uses 10-bit colors, and FFmpeg will try use the best 8-bit pixel format in ...
ffmpeg -i file.mp4 -i image.jpg -filter_complex "[1:v]pad=iw*2:ih*2:(ow-iw)/2:(oh-ih)/2:c=black@0,zoompan='1+on/125':x='(iw-iw/zoom)/2':y='(ih-ih/zoom)/2':d=125:s=WxH,format=gbrap,fade=t=in:d=5:alpha=true:st=0[im];[0:v][im] overlay=x=10:y=10:enable='between(t,0,5)'" out.mp4
The image is padded to double width and height with the padding colour being ...
Use the print_info flag to see what the scaler is doing, example from an actual conversion:
Part of the relevant output:
[Parsed_scale_0 @ 000001d8187fef00] w:1280 h:-2 flags:'print_info+bicubic' interl:0
[swscaler @ 000001d819bc7fc0] bicubic scaler, from yuv420p to yuv420p using MMXEXT
[swscaler @ ...
There's the setsar and setdar filters for this purpose
Since you know the output display ratio, it's convenient to use setdar here, although both filters only alter the SAR.
That's very easy. Simply select all images, press right click -> Nest.
Give it a name and you are done. Now on this single "clip" apply your movement.
If you want to edit the single images, double click the new clip.
The scale filter has no effect on the encoder's bitrate control.
Yes, a scaled down video should have a lower bitrate if it is encoded with the same encoder settings as the source. In your command, since no encoder parameters are explicitly set, ffmpeg defaults to encoder x264 with rate-control mode CRF with value 23. Apparently, this results in the same ...
Since the resulting projected image is 3240 px wide, that's the size you should create. Then output two "halves" -- the leftmost 1920 px, then the rightmost 1920 px. There will be 600 px that appear in both parts. That's the overlap.
I found a reference on this forum.
ffmpeg -i './a3dmovie.mp4' -vf "crop=w=iw/2:h=ih:x=0:y=0,scale=w=2*iw:h=ih,setdar=2" -y ./a2dmovie.mp4
The important part is the -vf "crop=w=iw/2:h=ih:x=0:y=0,scale=w=2*iw:h=ih,setdar=2"
It essentially halves the output and rescales as ...
I just found out how to solve my problem. The H.264 codec is the issue, it somehow does not work with it and AE gives you a warning: Output file will be resized from 2085 x 2560 (1.0 PAR) to 2000 x 2000 (1.0 PAR) to meet format constraints.
I went with the MPEG4 codec and it worked as I wanted.
Ok, I read your mind. What you are talking about called Quality and Sampling. You can find it in the timeline on your layer when "Switches" are activated:
Adjust it to pixelated view, and you will be able to reach your goal without any effects.
Upscaling at playback time is done by graphics hardware, not the CPU, so your assumption turns out to be false. Good software players will feed the video through high-quality hardware scaling (e.g. mpv's opengl-hq video-out). HW upscaling might still default to bilinear, though, so it's worth thinking about this.
Upscaling before encode spreads the detail ...
This depends on how much resources you are willing to invest into upscaling content. The default setting for libswscale in VLC seems to be bicubic, if you intend to use more sophisticated resizing filters and a particular target resolution then you should upscale the video during encode this way you also don't have to rely on the capabilities and customizing ...
Premiere CC lets you adjust the dimensions of the sequence. It will keep the same scale changes (zoom in & out) in the timeline. So increase the dimensions of the sequence to accommodate the larger clip, then replace the small clip with the large clip.
This isn't a perfect solution. For example, titles will appear very small, and will not be in the ...