Is there any way to automate position for crossfade (last second of the video)?
Not with ffmpeg alone (yet at least–there is a patch that never got applied that would simplify this). You can use ffprobe to get the duration of each input and use that to determine the values for setpts and fade.
Example ffprobe command:
ffprobe -v error -show_entries ...
You could do this by looping over the videos in a subshell, and piping to another copy of ffmpeg to generate the RTMP stream. For example:
(for j in *.mp4; do
ffmpeg -threads 2 -re -fflags +genpts -i $j \
-i '/c/Users/user/Desktop/ffmpeg_logo/mylogo.png' -filter_complex 'overlay=W-w-50:H-h-25' \
-vcodec libx264 -profile:v baseline -b:v ...
You can do either method.
Take up less file space.
Files are already cut.
Long continuous shot
Easier method when shooting, but more work in post.
Easier to sync a continuous audio stream such as from an external mic.
This is the Gyan's solution, and it works:
ffmpeg -ignore_editlist 1 -i input.mp4 -map_metadata -1 -c copy output.mp4
The important part here is the -ignore_editlist 1 option (yet undocumented).
The reason is that the original video contains for its video stream an edit list (elst box) with entryCount value set to 2 (which is ignored by some media ...
This might be a bit late but if it helps I've got a working PowerShell script that I use to create chapterized m4b files which I am assuming you are trying to do since you list m4b.
I use the following command for mp3 format files
ffmpeg -f concat -safe 0 -i list.txt -vn -y -b:a 64k -acodec aac -ac 2 temp.m4a
If its already in AAC format (MP4) it's even ...
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 ...
Non sequential series
If they image inputs are not sequential then use the glob wildcard:
ffmpeg -framerate 5 -pattern_type glob -i "*.png" output.mp4
The glob pattern may not be supported by Windows. In that case rename your images or ...
Commands are instructions sent from an interface external to the filter, usually an external program using a ZMQ protocol. There is a filter that can execute commands which is what I'll use here.
Base syntax is
ffmpeg -i in -af "asendcmd=c='0.0 afftdn@n sn start; 1.0 afftdn@n sn stop',afftdn@n" noiseout.wav
To use another source for noise profile, you'll ...
pts_time=6.506000 means an absolute presentation timestamp of 6.506 seconds. It's relative presentation time depends on the start_time of the file, for which use -show_entries format=start_time.
ffprobe seeks to keyframes, so it will seek to the nearest KF at or before the specified time and then print info for the stated number of packets.
Basic syntax is
ffmpeg -i in -vf "split=2[pip][full];[pip]crop=W:H:X:Y[pip];[full][pip]overlay=W-w:H-h,crop=iw-M:ih:M:0" -c:a copy out
where W,H,X,Y are as per your diagram. M is the margin from the left edge which needs to be cropped out. Select M so that iw-M results in an even number.
Use the overlay video filter:
find "/video path" -name "*.mp4" | xargs -I $ "/ffmpeg path" -y -re -i $ -i watermark.png -filter_complex overlay -c:a copy -f flv rtmp://xxx.xxx.xx/live/
You can't filter video (-filter_complex or -vf) and stream copy (-vcodec copy) the same stream. If you try you'll get an error:
Streamcopy requested for output stream 0:0,...
According to FFmpeg it supports multiple outputs created out of the same input(s) in the same process. The usual way to accomplish this is:
ffmpeg -i input1 -i input2 \
-acodec … -vcodec … output1 \
-acodec … -vcodec … output2 \
-acodec … -vcodec … output3
This way ffmpeg can create several different outputs out of the same input(s).
It's a bug in ffmpeg. When you explicitly specify a type of the HW acceleration (i.e. cuvid), ffmpeg assigns 0 to CUVIDDECODECREATEINFO::ulNumDecodeSurfaces and to CUVIDDECODECREATEINFO::ulNumOutputSurfaces. Consequently, a call to cuvidCreateDecoder fails, since NVDEC doesn't have surfaces to output decoded pictures.
The main reason lays in selecting an appropriate stream (audio or video) for filterchains with no input labels, for example
The first filterchain [0:v]hue=s=0,split=2[outv1][outv2] has specified input label ([1:v]) but two others not.
for the fade filter will be selected the first unused ...
ffmpeg -i "source.mov" -map_metadata 0 -pix_fmt yuv422p10le -c:v prores_ks -profile:v 4 -c:a pcm_s24le -movflags write_colr "out.mov"
this will create ProRES (10bit) MOV file (map_metadata allows to keep recording dates). Audio will be PCM 24bit. Timecode will be also copied by default.
If you want to flag ProRES as full range you add: -color_range pc. By ...
Similar to Gyan's overlay answer, a slightly simpler version can use a basic -filter_script with the "swaprect" and "crop" filters. Move the crop target to 0,0 and then crop the target area at 0,0. The target has to be swapped to 0,0 as otherwise the other swapped rect can overlap. This worked with ffmpeg version 3.4.6-0ubuntu0.18.04.1
Make sure the ...
According to the wiki, you are likely to get worse results with the default AAC encoder when using VBR. See: https://trac.ffmpeg.org/wiki/Encode/AAC
One suggestion would be to use libfdk_aac. The other would be to demux the audio, re-encode it using a different encoder, and then remux that file back in to the video using ffmpeg.