text:
Stripping metadata sometimes doubles video, the second half of (doubled) video is without sound
I use this command for stripping metadata:
ffmpeg -i input.mp4 -map_metadata -1 -c copy output.mp4

Sometimes it works fine but occasionally the result is as
+----------------+----------------+
| Original video | Original video |
+----------------+----------------+
| Original sound |    No sound    |
+----------------+----------------+

I saved one output of such unsuccessful stripping:
ffmpeg -i ridiculousjump.mp4 -map_metadata -1 -c copy ridiculousjumpnomet.mp4
ffmpeg version N-85750-ga75ef15 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 6.3.0 (GCC)
  configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nv
enc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libblur
ay --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-
libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-lib
rtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amr
wbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enabl
e-libxvid --enable-libzimg --enable-lzma --enable-zlib
  libavutil      55. 61.100 / 55. 61.100
  libavcodec     57. 93.100 / 57. 93.100
  libavformat    57. 72.101 / 57. 72.101
  libavdevice    57.  7.100 / 57.  7.100
  libavfilter     6. 88.100 /  6. 88.100
  libswscale      4.  7.101 /  4.  7.101
  libswresample   2.  8.100 /  2.  8.100
  libpostproc    54.  6.100 / 54.  6.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'ridiculousjump.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42isom
    creation_time   : 2016-09-28T00:49:17.000000Z
    encoder         : mp4creator 1.6.1d
  Duration: 00:00:26.56, start: 0.000000, bitrate: 822 kb/s
    Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 636x396 [SAR 1:1 DAR 53:33], 694 kb/s, 25 fps, 25
 tbr, 90k tbn, 50 tbc (default)
    Metadata:
      creation_time   : 2016-09-28T00:49:17.000000Z
      encoder         : VC Coding
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default)
    Metadata:
      creation_time   : 2016-09-28T00:49:17.000000Z
Output #0, mp4, to 'ridiculousjumpnomet.mp4':
  Metadata:
    encoder         : Lavf57.72.101
    Stream #0:0: Video: h264 (Constrained Baseline) ([33][0][0][0] / 0x0021), yuv420p, 636x396 [SAR 1:1 DAR 53:33], q=2-31, 694 kb/s, 25
 fps, 25 tbr, 90k tbn, 90k tbc (default)
    Stream #0:1: Audio: aac (LC) ([64][0][0][0] / 0x0040), 44100 Hz, stereo, fltp, 125 kb/s (default)
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 1328 fps=0.0 q=-1.0 Lsize=    4929kB time=00:00:53.08 bitrate= 760.8kbits/s speed= 915x
video:4504kB audio:405kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.416591%

(I'm currently not able to find that input video but I will post it as soon as I will find it — or similar one.)
Had someone a similar experience or knows where is or may be the problem?
EDIT
I found a video with the same problem, only 430 KiB: Bubble_burst.mp4.

Is the video interlaced?

No, the input video is progressive but it is created by the previous transcoding from an interlaced video (very probably by Any Video Converter Free 3.5.8).

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 players — but not by FFmpeg, which interprets it as repeating the video stream twice).
The Gyan's explanation (see ticket #8456):

The video stream in this file has an edit list that says that the video should be displayed twice. So actually looping the video is the correct behavior. But I think the file is actually invalid, as the duration of the track in the tkhd and the mdhd box both shows 6s, although it is double that after applying the edit list.

Note:
 I tried several videos converted by Any Video Converter into the H.264 format (as input files), and the same problem occurred with most of them.


text:
How to use match group in Python to take a values and ignore comma mark
I have a function working very well by getting the frames from the filename.
But it takes only the last number (frame) from the file name.
An example:
Filename:
1200,4500.avi
The code made to get the last number (frames), and it can import multiple avi files from specific folder.
Here's the code:
def insert_types(out, dir):
    for root, dirs, files in walk(dir):
        for f in files:
            match = search(r"(\d*)\.avi$", f)
            if match:
                startframe = match.group(1)
                out = InsertSign(out, join(root, f), int(startframe))
    return out

out = jpop.mkv
out = insert_types(out, r"D:\path\avi_folder")
return out

InsertSign() function have an option to put the start & end frame of the file (if I'm doing it manually).
An example:
video = jpop.mkv
sign = 1200,4500.avi
startframe = 1200
endframe = 4500
final = InsertSign(video,sign, startframe,endframe)
return final

I tried many times and to find out how to change the insert_types function to take the first & last number (1200, 4500) from the file name (1200,4500.avi) at the same time ignoring the comma mark (,) which is in the file name.
I tried to do it by myself but its beyond my means ^^"
Hope someone can help me with that
Regards.

Instead of
            match = search(r"(\d*)\.avi$", f)
            if match:
                startframe = match.group(1)
                out = InsertSign(out, join(root, f), int(startframe))

use
            match = search(r"(\d+),(\d+)\.avi$", f)
            if match:
                startframe = match.group(1)
                endframe = match.group(2)
                out = InsertSign(out, join(root, f), int(startframe), int(endframe))

You're welcome. Please upvote and/or accept my answer if it was useful for you.

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
Using ffmpeg to convert files to OVG (libtheora) on Windows 10 results in corrupted Video Files

ffmpeg version 4.2.2 win64 static

I'm using this command in Windows 10 to convert a file from mp4 to ogv:
ffmpeg -i input.mp4 -c:v libtheora -q:v 10 -c:a libvorbis -q:a 10 output.ogv

The result is a jumbled mess of colors:

However, when executing the same command on Ubuntu(20.04 LTS) it works just fine.
The pic shown is a snapshot of the result played in VLC. When playing the same video in Windows' “Film & TV” application, it just skips the frames that have these artifacts (which is very often).
Any idea what could cause this Windows specific problem?

I don't have an answer, but why output the old, legacy Theora + Vorbis in OGV instead of VP9 + Opus in WebM?

@llogan The reason is because I'm using the OGV format for a project in the Godot Engine. You see, WebM is a problematic format in Godot Engine(specifically on Linux). It has problems such as not being able to play WebM videos that have a framerate above 30.
Such problems do not exist in the OGV format for the Godot Engine.

Please provide the complete log from the command. Does the issue occur with all files, or only certain ones? To clarify, does the video output from Windows also look bad on Ubuntu? Does the same output video look bad on VLC on Windows?

According to this thread: https://old.reddit.com/r/ffmpeg/comments/fy2618/need_someone_to_test_libtheora_encoder_on_64bit/
The theora encoder is currently broken in the 64bits versions.
I tried this with the 32bits version and it now works as expected.
32bits builds can be found here: https://ffmpeg.zeranoe.com/builds/win32/static/
Greetings

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Where are the After Effects workspaces saved?
Is there a way to import custom workspaces from another computer?

According to Adobe:
Workspaces are stored in XML files in the preferences folder. With some caveats regarding monitor size and layout, these workspaces can be moved to another computer and used there.
Windows:
[drive]:\Users\[user_name]\AppData\Roaming\Adobe\After Effects\[version]\ModifiedWorkspaces
Mac OS:
[drive]/Users/[user_name]/Library/Preferences/Adobe/After Effects/[version]/ModifiedWorkspaces


text:
Audio without video is OK, but WITH video it is delayed
I have this audio filterchain (for repetitive short part of the original audio):
[1:a] atrim=start=2.52:end=1:38.0, aloop=100:7700 [audio]

When I used it without video, i. e. in the ffmpeg command I mapped only audio:
-map "[audio]"

then it fulfilled my intent - it started playing immediately (from 0:00)
But when I mapped video, too
-map 0:v -map "[audio]"

then the audio started at 2.52 - the same value as in my atrim filter.
(I tried changing this value and the starting time changed appropriately, too.)
What is the reason for it and how I can fix it?

You've to reset the timestamps:
[1:a]atrim=start=2.52:end=1:38.0,aloop=100:7700,asetpts=N/SR/TB[audio]

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
FFmpeg - dropping duplicate frames
FFmpeg knows about duplicate frames in the input video stream as it outputs a message like this:

More than 1000 frames duplicated

Is there some way to tell it: "Not include duplicates into the output stream, please?"
EDIT (ADDED):
I tried this command (thanks to Mulvya):
ffmpeg -i scene.mkv -profile:v baseline -level 3.1 -vsync 0 -map 0:v  scene.mp4

and obtained the target video scene.mp4 with the same duration and (almost) identical in playback with original.
The command with full output of it is here:
>ffmpeg -i scene.mkv -profile:v baseline -level 3.1 -vsync 0 -map 0:v  scene.mp4
ffmpeg version N-83585-ga5c1c7a Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 5.4.0 (GCC)
  configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nv
enc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libblur
ay --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-
libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-lib
rtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amr
wbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enabl
e-libxvid --enable-libzimg --enable-lzma --enable-zlib
  libavutil      55. 47.100 / 55. 47.100
  libavcodec     57. 80.101 / 57. 80.101
  libavformat    57. 66.102 / 57. 66.102
  libavdevice    57.  2.100 / 57.  2.100
  libavfilter     6. 73.100 /  6. 73.100
  libswscale      4.  3.101 /  4.  3.101
  libswresample   2.  4.100 /  2.  4.100
  libpostproc    54.  2.100 / 54.  2.100
Input #0, matroska,webm, from 'scene.mkv':
  Metadata:
    encoder         : libmkv 0.6.5
    TITLE           : New Project
    DIRECTOR        : Big Mac
    COMPOSER        : Big Mac
    DESCRIPTION     : This video is about New Project
  Duration: 00:03:11.93, start: 0.000000, bitrate: 1025 kb/s
    Stream #0:0(eng): Video: h264 (High), yuv420p(tv, smpte170m/smpte170m/bt709, progressive), 640x480 [SAR 1:1 DAR 4:3], 30 fps, 30 tbr
, 1k tbn, 180k tbc (default)
    Stream #0:1(eng): Audio: aac (LC), 48000 Hz, stereo, fltp (default)
    Stream #0:2(eng): Audio: ac3, 48000 Hz, stereo, fltp, 224 kb/s
[libx264 @ 00000000005c6c40] using SAR=1/1
[libx264 @ 00000000005c6c40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 00000000005c6c40] profile Constrained Baseline, level 3.1
[libx264 @ 00000000005c6c40] 264 - core 148 r2762 90a61ec - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.h
tml - options: cabac=0 ref=3 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 t
rellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 i
nterlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40
 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'scene.mp4':
  Metadata:
    DESCRIPTION     : This video is about New Project
    TITLE           : New Project
    DIRECTOR        : Big Mac
    COMPOSER        : Big Mac
    encoder         : Lavf57.66.102
    Stream #0:0(eng): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 640x480 [SAR 1:1 DAR 4:3], q=-1--1, 30 fps, 15360 tbn, 30
 tbc (default)
    Metadata:
      encoder         : Lavc57.80.101 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Press [q] to stop, [?] for help
frame= 4602 fps=185 q=-1.0 Lsize=   10688kB time=00:03:11.90 bitrate= 456.3kbits/s speed= 7.7x
video:10651kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.349428%
[libx264 @ 00000000005c6c40] frame I:24    Avg QP:20.07  size: 27706
[libx264 @ 00000000005c6c40] frame P:4578  Avg QP:21.30  size:  2237
[libx264 @ 00000000005c6c40] mb I  I16..4: 20.4%  0.0% 79.6%
[libx264 @ 00000000005c6c40] mb P  I16..4:  2.0%  0.0%  2.4%  P16..4: 22.9%  4.2%  1.3%  0.0%  0.0%    skip:67.3%
[libx264 @ 00000000005c6c40] coded y,uvDC,uvAC intra: 47.9% 84.7% 30.2% inter: 4.5% 23.4% 0.6%
[libx264 @ 00000000005c6c40] i16 v,h,dc,p: 36% 26% 11% 26%
[libx264 @ 00000000005c6c40] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 31% 23% 13%  5%  7%  8%  5%  5%  3%
[libx264 @ 00000000005c6c40] i8c dc,h,v,p: 39% 26% 27%  8%
[libx264 @ 00000000005c6c40] ref P L0: 82.8% 10.5%  6.7%
[libx264 @ 00000000005c6c40] kb/s:454.58

Without any details, my guess would be to add -vsync 0 as an output option.

@Mulvya - Thanks - by your answer it seems that I misunderstood the cited message. It probably says about duplicated time stamps and not about identical frames - which is my problem. I have many groups of identical frames and my goal is to put only 1 exemplar of successive identical frames into the output stream.

@Mulvya - To be honest I don't know if I really have groups of identical frames - I deducted it only from playback of the video. Your -vsync 0 didn't help.

Need to see command and full console log.

@Mulvya - Thank for your goodwill, I added them into my question.

Don't see any frames duplicated. BTW, the message you quoted - More than 1000 frames duplicated - is not ffmpeg's analysis of the input. ffmpeg duplicates or drops frames when the input and output framerates differ. You need to use the mpdecimate filter to remove duplicates in the input.

@Mulvya Yes, it is precisely what I need, thank you very, very much! I'm glad to have opportunity upvote at least that your answer (but I'll upvote this, too, if you rewrite it as an answer).

Don't see any frames duplicated. The message you quoted - More than 1000 frames duplicated - is not ffmpeg's analysis of the input. FFmpeg duplicates or drops frames when the input and output framerates differ. You need to use the mpdecimate filter to remove duplicates in the input:
ffmpeg -i input.mp4 -vf mpdecimate,setpts=N/FRAME_RATE/TB out.mp4

I used above command but voice and video are not sinked

Use ffmpeg -i input.mp4 -vf mpdecimate -c:a copy -vsync vfr out.mp4. The duration will be the same but the duplicate frames will be gone.

did not work
I have a bad problem with DVB mpg recorded files.
FFMPG can not edit these files.
 I've used above command then video has converted but sound and video not sink

I tried the solution here and none of them seem to work when you need to trim the video and keep the audio. I found a solution I explained here

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
What does it mean "This filter supports the following commands"?
In the FFmpeg Filters Documentation some filters have a subsection "Commands" which begins with the sentence

This filter supports the following commands:

e. g. in the section 6.68 volume.
Filters have parameters; it is understandable. But what is the meaning of filter commands and how and when are they used?

Commands allow you to change the parameters during execution of the command. This is primarily useful when working with streaming media e.g. if the volume gets too loud during a broadcast, send a command to the volume filter to lower it.
To issue commands to filters which support it from outside, ffmpeg has to be compiled with libzmq support. See the docs for the zmq filter for details.
To issue commands from the terminal, press c
The 'command prompt' will be shown :
Enter command: <target>|all <time>|-1 <command>[ <argument>]

Enter a command as per the given format and press Enter.
e.g. overlay@logo -1 x 100

Thank you very much, I intensively searched for it without a success.


text:
Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
I am using below command to push the video to Wowza server, since we are pushing raw H.264 video, the RTP packet does not have the timestamp,  and we could observe audio video sync issue while playing video using VLC Media Player. While executing the FFmpeg command, there is a warning showing as

[rtsp @ 0xb754bda0] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly

IS there any option available in FFmpeg to add timestamp in RTP packet and push the video and audio?
$ffmpeg -f h264 -i /tmp/enc_sd_stream.h264 -f aac -i /tmp/aud_rec_stream  -acodec copy -vcodec copy -r 23 -f rtsp
 rtsp://shafi:shafi@192.168.1.135:1935/live/myStream

Input #0, h264, from '/tmp/enc_sd_stream.h264':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: h264 (Baseline), yuv420p, 720x576, 25 fps, 25 tbr, 1200k tbn, 50 tbc
Input #1, aac, from '/tmp/aud_rec_stream':
  Duration: N/A, bitrate: 57 kb/s
    Stream #1:0: Audio: aac (LC), 32000 Hz, mono, fltp, 57 kb/s
[udp @ 0xb7553290] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[udp @ 0xb7553320] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[udp @ 0xb754c520] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[udp @ 0xb758d670] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
Output #0, rtsp, to 'rtsp://shafi:shafi@192.168.1.135:1935/live/myStream':
  Metadata:
    encoder         : Lavf57.25.100
    Stream #0:0: Video: h264, yuv420p, 720x576, q=2-31, 25 fps, 25 tbr, 90k tbn, 15 tbc
    Stream #0:1: Audio: aac (LC), 32000 Hz, mono, 57 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #1:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
[h264 @ 0xb752e2b0] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)

    [rtsp @ 0xb754bda0] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly

[aac @ 0xb75f7880] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
frame=10213 fps= 14 q=-1.0 Lsize=N/A time=00:06:48.80 bitrate=N/A speed=0.574x

this worked for me as an option to ffmpeg: -use_wallclock_as_timestamps 1

If your read speed is different than stream framerate, output playback speed (and audio sync) will be wrong. Add -re before both video and audio input to avoid that.

The usual solution for this situation: -fflags +genpts
It should eliminate the warning, but there's no guarantee your sync issues will be solved.

This worked better than -use_wallclock_as_timestamps 1 when mashing a pair of avi files together.  The resulting file synced up perfectly with the subtitle (.sub & .idx) files I had.

This error can also be eliminated in some situations (VFR source files with unusual timebases) by using -vsync 0 -enc_time_base -1

As an input option -r ignore[s] any timestamps [...] and instead generate[s] timestamps assuming constant frame rate fps.
ffmpeg -r 25 -i "udp://...
Source:ffmpeg Documentation: Video Options: -r
This was the only option that worked for me.


text:
Increase volume with ffmpeg
I have the code below I want it to automatically increment up like this:
(t, 30,33) and (t, 60,63), (t, 90,93) and so on it adds 30 units.
     ffmpeg -i in.mov -vcodec copy -af "volume=enable='between(t,30,33)':volume=0"out2.mov

Use
-af "volume=enable='gte(t,30)*lt(mod(t,30),3)':volume=0"

Can you explain the parameters for me? Thank you so much

lt(mod(t,30),3) selects first 3 seconds of every 30 seconds, gte(t,30) starts selection from  t=30s, so that the first 3 seconds (0-3) aren't selected.


text:
Unable to reduce size in Adobe Premier Pro 2020
Today, I've used Adobe Premier Pro 2020 for reducing a video size.
I have a video of size 400 MB that I have imported into Adobe Premier to reduce its size.

Here the estimated file size is shown is : 167 MB but when I exported successfully with same settings the size of new video is 1 GB.
My questions are:

I'm unable to know — why it is not converting to the estimated size shown in the software, and how can I reduce the size without much reducing the quality of the video?

I wanted to know if Premier Pro is the best option to use to reduce file,  or some basic video editing stuffs or other software
like Media Encode / After Effects is better?

I have seen this behaviour before and it is possible that you are experiencing the same issue. With some GPUs, the hardware acceleration is buggy, so that the target and maximum bitrate is ignored. This also depends on the codec. As a workaround, in the export dialog, go to the Video tab and under Encoding Settings try to switch from "Hardware Encoding" to "Software Encoding". Now, the rendering will take a lot longer, but you should get a smaller file.
Try to update to the very latest version of Premiere and update the driver for your GPU. If this doesn't help, you cannot do much about it. You could try different codecs or stick with software encoding. Report the bug to Adobe and hope they can fix it some day.
Using Media Encoder won't help to fix that problem, however it's more convenient to send the render jobs to the queue of Media Encoder and let it work in the background. After Effects is specialized for animations and not well suited for general video editing.

Handbrake is good option for reducing size but other editing cannot be done with it .What have you tried about it to resolve this issue in Premier??

I've just seen it on someone's laptop. However, personally, I'm not affected by this, that's why I haven't taken action.


text:
FFmpeg crop (cut out) a view direction from 360° video sphere
I have a 360×180° equirectangular video.
I want to cut out a part of it, to make it a “normal” video using FFmpeg.
Is there something like this? For example, I have a direction vector as a parameter for the region to cut out (e.g. Vector(0, 0, 1) would cut out the sky)

that's good to hear. I had this challenge recently, and ended up using a 3D animation package. I made a sphere, used the video as the surface colour and filmed it with the virtual camera. Was faster and better quality than After Effects.

Solved with this filter:
https://ffmpeg.org/ffmpeg-filters.html#v360
See section "flat" and the second example to convert any 360 footage to a flat view.


text:
FFmpeg convert 1 JPEG frame to 10 sec video
I have a 952×600 JPEG image, generated by a PHP script. I want to create another PHP script that uses ffmpeg, which converts that JPEG image to a MP4 video, which has only 1 frame that lasts for 10 seconds.
Which options should I provide to FFmpeg, if the input JPEG is called input.jpeg and the video output.mp4?

The simplest way is
ffmpeg  -loop 1  -t 10  -i input.jpg  output.mp4

The explanation and additions:
Your input file (an image) will go through the default image2 demuxer, which makes a video stream from it.

By default, this video stream will contain only 1 frame (the input picture), and its framerate will be 25 FPS (frames per second), so the duration of this stream will be only 40 miliseconds (= 1/25 s).
To repeat your input image for obtaining more frames, I used the options -loop 1:

-loop 1: The number 1 means true for infinite looping, i.e. for repeating your input picture “infinitely” many times to obtain next and next frame in the case of need.

You need to limit the number of generated frames (otherwise your ffmpeg command will run forever).
As you want the 10-second video, I used the -t 10 option to limit the number of generated frames indirectly by the duration of the target video.
ffmpeg  -loop 1  -t 10  -i input.jpg  output.mp4

If you are not satisfied with the default framerate (25 fps), you may use the -framerate option, for example
ffmpeg  -loop 1  -framerate 15  -t 10  -i input.jpg  output.mp4

found here: https://talotics.com/post/videos/ffmpeg-add-call-to-action-image-after/
Create a 5 second video from a png as follows:
ffmpeg -loop 1 -i image.png -pix_fmt yuv420p -t 5 promo-image.mp4

This will create a video called {promo-image.mp4} from {image.png} with a duration of {5 seconds}


text:
Filtering video and adding metadata in one step failed
I want to filter a video stream
-vf crop=300:ih,mpdecimate

and add metadata for it to the output video:
-metadata:s:v:0 rotate=90

This command filter it, but the metadata are NOT added:
ffmpeg -to 6 -i input.3gp -vf crop=300:ih,mpdecimate \
       -metadata:s:v:0 rotate=90 \
        output.mp4

But I do the same in 2 steps  (using a temporary output as input),
the result is OK, the metadata ARE added:
ffmpeg -to 6 -i input.3gp -vf crop=300:ih,mpdecimate \
       temp.mp4

ffmpeg -i temp.mp4 -c copy \
       -metadata:s:v:0 rotate=90 \
        output.mp4

My question is:

Is it impossible to filter a video and add some metadata in one step?

Part of FFprobe output:
For the successful 2-steps method:

    Metadata:
      handler_name    : Core Media Video
      vendor_id       : [0][0][0][0]
    Side data:
      displaymatrix: rotation of 90.00 degrees

For the 1-step method, the last 2 rows are missing.

Yes, the rotate tag is ignored for encoded video streams.
Should be patched in git master within a couple of days.


text:
Using ffmpeg to cut videos with more precision than key frames allow
I'm trying to cut a video (a debate on TV) with FFmpeg without re-encoding, and I need to cut between 2 sentences a guy pronounce. I think the precise moment is between two keyframes, because whatever the timestamp I try to cut at, I always get too much sound (and video) or too few. Here is my ffmpeg command line :
ffmpeg -i video.mp4 -ss 0:0:0.9 -vcodec copy -acodec copy videoB.mp4 -y

I'm aware that the position of the -ss option in the command line matters: here, it is supposed to give me all the accuracy FFmpeg can offer. I know I'm probably trying to cut my video neither on a I-frame, nor on P- or B-frames.
So is there a way to get the closest (P- or B-) frame, doing some calculations with the preceding I-frame to generate a new I-frame, then start the video with this brand new I-frame and no sound, until the correct timestamp is reached. Then the video could go on normally.
I really don't want to bother me with re-encoding (which is an use of FFmpeg I don't master on command line). I'm using FFmpeg version 2.5.8-0ubuntu0.15.04.1.
Thanks.

You only wish to re-encode the split GOPs - that's called smart rendering. AFAIK, that's tricky to do manually with ffmpeg. Try SolveigMM Video Splitter - http://www.videohelp.com/software/SolveigMM-Video-Splitter

Thanks but I'm under Linux. Any other tool which would be more suitable to my environment ?

Also SolveigMM video splitter seems to not be free anymore ;D

"without re-encoding". Not going to happen on any keyframe based file type, with any tool. Only possible on non-keyframe based files. Just re-encode with high fidelity. If you do this a lot, reconsider your workflow to include non-keyframe based files, or port directly from your source files to your end-user file with a single encode (difficult to create a workflow like that, but well worth it if you can).

You can't do it simply, but here's a pretty good work around.
First, cut near the desired position (at keyframes) with stream copy and then re-encode the frame-exact part of the video. Let's say:
ffmpeg -ss 120 -t 40 -i input.mp4 -c copy -y temp.mp4
ffmpeg -i temp.mp4 -vcodec h264 -crf 21 -acodec mp3 -ss 1.080 -t 38.480 -y final.mp4

Thus, temp.mp4 starts before 120 sec and has a duration of at least 40 seconds
and final.mp4 has a duration of exactly 38.48 seconds.
When processing my home videos and stuff recorded from television, I use (-2s) for the desired start position and (+4s) for the duration. During re-encoding, I use milliseconds.

No
There is no way to precisely cut a video with FFmpeg if you need to cut outside an I-frame without re-encoding.
You could try software that can handle "smart rendering", but I am not aware of any such software for Linux. On Windows, you could use "TMPGEnc MPEG Smart Renderer" or SolveigMM Video Splitter. The latter has serious performance issues. I highly recommend TMPGEnc, but it is not free.


text:
Simple FFMPEG Concatenation
I'm trying to program an automation process to add a message at the beginning and end of an input video in Windows. I have a png being looped into a mp4 with a silent audio stream added on. This is the filter complex that I'm using:
    ffmpeg -i messageWithSilence.mp4 -i gif.mp4 -filter_complex "[0:v]scale=1920:1080:force_original_aspect_ratio=decrease,format=yuv420p,pad=1920:1080:-1:-1,setsar=1[video_1];
    [0:a]aformat=sample_fmts=fltp:sample_rates=44100:channel_layouts=stereo[audio_1];
    [1:a]aformat=sample_fmts=fltp:sample_rates=44100:channel_layouts=stereo[audio_2];
    [video_1][1:v][video_1]concat=n=3:v=1:a=0[v_concat];
    [audio_1][audio_2][audio_1]concat=n=3:v=0:a=1[a_concat]" -map "[v_concat]" -map "[a_concat]" -c:v libx264 -c:a aac -r 30 -shortest "%output_name%.mp4"

Any ideas as to why I would be getting the error

Stream specifier 'video_1' in filtergraph description matches no streams

?

In this part of your filtergraph
[video_1][1:v][video_1]concat=n=3:v=1:a=0[v_concat];

you used the link label [video_1] twice. The first occurrence of it “consumes” the previously defined output pad [video_1] output, so the second one has no chance to connect to it.

Solution:
You may append the split filter to your first filterchain (i.e. just before the [video_1] output pad label)
...,setsar=1,split[video_1][video_2];

to create 2 identical video outputs, and then replace the second occurrence of [video_1] with [video_2] in your concat filter:
[video_1][1:v][video_2]concat=n=3:v=1:a=0[v_concat];

Note:
You have to perform a similar procedure for your [audio_1] label – you used it twice as input label, too.


text:
ffmpeg input -ss accuracy
As from FFmpeg version 2.1, -ss used as an input option should be frame accurate (when transcoding, not stream-copying).
I tried it with different versions of FFmpeg, up to recent ones, and with MPEG-TS files doesn't look accurate to me. I still get the cut (or the frame extraction) at the first I-frame after the specified timestamp.
Is it an exception for MPEG-TS files, or am I missing something?

MPEG-TS don't have a global keyframe index ,so even input -ss will seek to the next KF after the ss timestamp.
Add -copyts -start_at_zero and seek to a few seconds earlier. Then add a trim filter with the exact timestamp.

tnx gyan,
more or less understood. I'll have to try.
problem started with recent versions of ffmpeg (5.1 & above); up to version 4.3 to extract a frame at exact timestamp, without waiting log time for output -ss seeking, I finally found that combining input -ss (up to at least before the previous keyframe) and adding output -ss up to the desired timestamp was correct IF TS file had only video track, otherwise was shifted by the difference between video_track start_time and earliest starting audio-track; calculating that difference with ffprobe and adding to output -ss gave the correct frame.
with recent versions behaviour is different: if video-only TS file, than it's easy (no shift, and sum of the two -ss), but with audio-video files looks like it's initially reaching the first KF after input -ss, than if output -ss is less than input -ss returns that KF, otherwise if larger it returns the frame at output -ss timestamp (from beginning of file).
so old procedure cannot be applied anymore.
I will deep study what you suggested.
thanks


text:
FFMPEG COLORHOLD FILTER NOT WORKING. VIDEOS WON'T PLAY
I am trying to do black and white video, while leaving just one color / color range.  I was told "ColorHold" filter can do this.  But, when I run it with different encoders; I either get a video that doesn't play.  Or one that nothing has been modified at all it seems.
This is the Command Line statement I'm running.  I know my logging isn't right.  But it still logged.  LOL.  It won't let me post my log.  Thanks.
ffmpeg  -i MVI_7523.MP4 -filter_complex "colorhold=color=0xE60000:similarity=1:blend=0.0"     -r 59.94     -b 60M -crf 0 output-leave-color-005.mp4 > "outputlog.txt"

Add -pix_fmt yuv420p and check.

@Gyan I either get a video that won't play.  Plays but is all black.  Or, plays fine but has not been modified.  Using no encoder specified, h264_qsv & h264_nvenc.  Even with pix_fmt, it still gives the "ARGB" Swscaler warnings.  Also this warning...   [mov,mp4,m4a,3gp,3g2,mj2 @ 0000027c7d971340] st: 0 edit list: 1 Missing key frame while searching for timestamp: 1001
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000027c7d971340] st: 0 edit list 1 Cannot find an index entry before timestamp: 1001.

Add -ignore_editlist true before -i

@Gyan It turns out the warning isn't the problem.  There is little info on ColorHold filter.  And the settings are extremely sensitive.  We simply were plugging in values that cause it to ignore everything.  LOL.    This works with these super low values.  ffmpeg -hwaccel cuda -i MVI_3318_FINAL.mp4 -filter_complex "colorhold=color=red:similarity=0.332:blend=0.01" -vcodec h264_qsv -r 59.94 -b:v 60M -crf 0 output-leave-color-0020.mp4.  See here.  Pretty dope!  https://youtu.be/J6J2_4Bf9q4?si=sBfQv_M5-4ditHN5

@Gyan What does " -ignore_editlist true" do?  I am in learning mode, because its required to advance my business.  Thanks again.


text:
FFMPEG error RTSP to MJPEG stream
I followed the guide Converting RTSP to an MJPEG stream on demand using ffmpeg.
I keep on getting this error:

ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
  configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
[rtsp @ 0x55a82ac5e300] Could not find codec parameters for stream 0 (Video: h264, none): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, rtsp, from 'rtsp://10.206.87.37/media/video1':
  Metadata:
    title           : SONY RTSP Server
  Duration: N/A, bitrate: N/A
  Stream #0:0: Video: h264, none, 90k tbr, 90k tbn, 180k tbc
Output #0, mpjpeg, to 'pipe:':
Output file #0 does not contain any stream
Exiting normally, received signal 2.

There's a chance it's a firewall issue

I used VLC player on my machine host windows machine and I can see the stream fine. I am running ffmpeg from WSL though


text:
After adding subtitles the second audio track gone
I have a video with 2 audio tracks.
After using the following command line
the other audio track is gone
ffmpeg -i "movie.mkv" -i "subtitles.ass" -c:v copy -c:a copy -c:s copy "movie with subtitles.mkv"

What am I doing wrong?

try to add mapping: ffmpeg -i "movie.mkv" -i "subtitles.ass" -map 0 -map 1 -c copy "movie with subtitles.mkv"

If you don't use the -map options, then by ffmpeg Documentation :

ffmpeg will pick one stream, when available, from among all the inputs.

It means that it selects only one video stream, only one audio stream, and only one subtitle stream (by criteria listed in that doc).
So you have to use -map option:
ffmpeg -i movie.mkv -i subtitles.ass -map 0:v -c copy -map 0:a -c copy -map 1:s -c copy "movie with subtitles.mkv"

The detailed explanation:
ffmpeg -i movie.mkv -i subtitles.ass ...

Input files are introduced with -i options, and are enumerated from 0, so

movie.mkv has the number 0,
subtitles.ass has the number 1.

This number is the first one in every -map option:
... -map 0:v -map 0:a:0 - map 0:a:1 -map 1:s ...

After the semicolon (:) may be the stream specifier, in your case:

v for video stream
a for audio stream
s for subtitle stream

If there is only one video stream or only one audio stream or only one subtitle stream in a particular input file, there is nothing more to specify:
... -map 0:v ... -map 1:s ...

In your more complicated case with more audio streams, after another semicolon you may specify its ordinal number, enumerated again from 0:
... -map 0:a:0 -map 0:a:1 ...

or – in your case - you my simply omit ordinal number to select all audio streams:
... -map 0:a ...

Note:
The offered command may be further simplified.
To better understand stream specifiers (as e.g. 0:a:1), see my another answer – at least the picture near the end of it.

authors: Баяр Гончикжапов


text:
ffmpeg one draw text to multiple outputs
I've created command, which connects video file with music, use shortest(video) duration, and output this to result file
 ffmpeg \
-i ./source/video/women/1.mp4 \
-i ./source/audio/women.mp3 -y \
-filter:v drawtext=fontsize=80:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=1:boxcolor=black@1:y=280,drawtext=fontsize=80:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=a0:boxcolor=black@0.8:enable='between(t,0,6.5)':y=700,drawtext=fontsize=80:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=a1:boxcolor=black@0.8:enable='between(t,0,6.5)':y=800,drawtext=fontsize=80:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=a2:boxcolor=black@0.8:enable='between(t,0,6.5)':y=900,drawtext=fontsize=80:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=a3:boxcolor=black@0.8:enable='between(t,0,6.5)':y=1000,drawtext=fontsize=80:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=b0:boxcolor=black@0.8:enable='between(t,7,10)':y=1000,drawtext=fontsize=80:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=b1:boxcolor=black@0.8:enable='between(t,7,10)':y=1100,drawtext=fontsize=80:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=b2:boxcolor=black@0.8:enable='between(t,7,10)':y=1200,drawtext=fontsize=80:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=b3:boxcolor=black@0.8:enable='between(t,7,10)':y=1300,drawtext=fontsize=80:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=b4:boxcolor=black@0.8:enable='between(t,7,10)':y=1400,drawtext=fontsize=30:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=c:enable='between(t,10.2,inf)':boxcolor=black@1:y=1500,drawtext=fontsize=30:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=d:enable='between(t,10.2,inf)':boxcolor=black@1:y=1550 \
-map 0:v:0 \
-map 1:a:0 \
-shortest out2/_.mp4

If I add second output, it works, but without audio and drawtext. How could I fixe this and get draw text works on both outputs?
UPD 1:
ffmpeg -i ./source/video/kids/1.mp4 -i ./source/audio/kids.mp3 -y \
-filter_complex drawtext=fontsize=80:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=Facts about children:boxcolor=black@1:y=280:text='Facts about children':boxcolor=black@1:y=280,drawtext=fontsize=80:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=Facts about children:boxcolor=black@1:y=280:text='a0':boxcolor=black@0.8:y=700:enable='between(t,0,6.5)',drawtext=fontsize=80:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=Facts about children:boxcolor=black@1:y=280:text='a1':boxcolor=black@0.8:y=800:enable='between(t,0,6.5)',drawtext=fontsize=80:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=Facts about children:boxcolor=black@1:y=280:text='a2':boxcolor=black@0.8:y=900:enable='between(t,0,6.5)',drawtext=fontsize=80:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=Facts about children:boxcolor=black@1:y=280:text='a3':boxcolor=black@0.8:y=1000:enable='between(t,0,6.5)',split=2[o0][o1] \
-map [o0] -map 1:a:0 -shortest 1.mp4 \
-map [o1] 2.mp4

now it works almost correctly, but gives the following error:
Stderr output: frame=    0 fps=0.0 q=0.0 q=0.0 size=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s speed=N/A
Stderr output: frame=    0 fps=0.0 q=0.0 q=0.0 size=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s speed=N/A
Stderr output: frame=    8 fps=6.2 q=28.0 q=28.0 size=       0kB time=00:00:00.20 bitrate=   1.9kbits/s speed=0.156x
Stderr output: frame=   14 fps=7.7 q=28.0 q=28.0 size=       0kB time=00:00:00.44 bitrate=   0.9kbits/s speed=0.242x
Stderr output: frame=   22 fps=9.3 q=28.0 q=28.0 size=       0kB time=00:00:00.76 bitrate=   0.5kbits/s speed=0.321x
Stderr output: frame=   30 fps= 10 q=28.0 q=28.0 size=       0kB time=00:00:01.12 bitrate=   0.3kbits/s speed=0.389x
Stderr output: frame=   39 fps= 11 q=28.0 q=28.0 size=       0kB time=00:00:01.44 bitrate=   0.3kbits/s speed=0.424x
Stderr output: frame=   50 fps= 12 q=28.0 q=28.0 size=       0kB time=00:00:01.88 bitrate=   0.2kbits/s speed=0.462x
Stderr output: frame=   57 fps= 12 q=28.0 q=28.0 size=       0kB time=00:00:02.20 bitrate=   0.2kbits/s speed=0.478x
Stderr output: frame=   67 fps= 13 q=28.0 q=28.0 size=       0kB time=00:00:02.56 bitrate=   0.1kbits/s speed=0.496x
Stderr output: frame=   75 fps= 13 q=28.0 q=28.0 size=       0kB time=00:00:02.88 bitrate=   0.1kbits/s speed=0.502x
Stderr output: frame=   83 fps= 13 q=28.0 q=28.0 size=       0kB time=00:00:03.20 bitrate=   0.1kbits/s speed=0.507x
Stderr output: frame=   92 fps= 13 q=28.0 q=28.0 size=       0kB time=00:00:03.56 bitrate=   0.1kbits/s speed=0.52x
Stderr output: frame=  100 fps= 14 q=28.0 q=28.0 size=       0kB time=00:00:03.88 bitrate=   0.1kbits/s speed=0.527x
Stderr output: frame=  108 fps= 14 q=28.0 q=28.0 size=       0kB time=00:00:04.20 bitrate=   0.1kbits/s speed=0.533x
Stderr output: frame=  117 fps= 14 q=28.0 q=28.0 size=       0kB time=00:00:04.56 bitrate=   0.1kbits/s speed=0.534x
Stderr output: frame=  126 fps= 14 q=28.0 q=28.0 size=       0kB time=00:00:04.92 bitrate=   0.1kbits/s speed=0.543x
Stderr output: frame=  134 fps= 14 q=28.0 q=28.0 size=       0kB time=00:00:05.24 bitrate=   0.1kbits/s speed=0.547x
Stderr output: frame=  142 fps= 14 q=28.0 q=28.0 size=       0kB time=00:00:05.56 bitrate=   0.1kbits/s speed=0.551x
Stderr output: frame=  151 fps= 14 q=28.0 q=28.0 size=       0kB time=00:00:05.92 bitrate=   0.1kbits/s speed=0.559x
Stderr output: frame=  158 fps= 14 q=28.0 q=28.0 size=       0kB time=00:00:06.20 bitrate=   0.1kbits/s speed=0.558x
Stderr output: frame=  165 fps= 14 q=28.0 q=28.0 size=     256kB time=00:00:06.52 bitrate= 321.7kbits/s speed=0.559x
Stderr output: frame=  174 fps= 14 q=28.0 q=28.0 size=     512kB time=00:00:06.84 bitrate= 613.3kbits/s speed=0.559x
Stderr output: frame=  184 fps= 14 q=28.0 q=28.0 size=     768kB time=00:00:07.24 bitrate= 869.0kbits/s speed=0.568x
Stderr output: frame=  193 fps= 15 q=28.0 q=28.0 size=    1024kB time=00:00:07.60 bitrate=1103.8kbits/s speed=0.571x
Stderr output: frame=  252 fps= 16 q=-1.0 Lq=-1.0 size=    8271kB time=00:00:09.96 bitrate=6802.6kbits/s speed=0.626x
Stderr output: video:16476kB audio:28kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Stderr output: [libx264 @ 0xffffa27d79f0] frame I:2     Avg QP:23.97  size: 87068
Stderr output: [libx264 @ 0xffffa27d79f0] frame P:80    Avg QP:24.66  size: 47762
Stderr output: [libx264 @ 0xffffa27d79f0] frame B:170   Avg QP:25.98  size: 26117
Stderr output: [libx264 @ 0xffffa27d79f0] consecutive B-frames:  1.2% 23.0% 10.7% 65.1%
Stderr output: [libx264 @ 0xffffa27d79f0] mb I  I16..4: 12.8% 74.6% 12.6%
Stderr output: [libx264 @ 0xffffa27d79f0] mb P  I16..4: 12.3% 44.9%  2.2%  P16..4: 24.9%  7.9%  2.0%  0.0%  0.0%    skip: 5.7%
Stderr output: [libx264 @ 0xffffa27d79f0] mb B  I16..4:  6.4% 15.8%  0.4%  B16..8: 35.7%  7.8%  1.1%  direct: 4.7%  skip:28.2%  L0:48.4% L1:46.8% BI: 4.8%
Stderr output: [libx264 @ 0xffffa27d79f0] 8x8 transform intra:73.1% inter:88.7%
Stderr output: [libx264 @ 0xffffa27d79f0] coded y,uvDC,uvAC intra: 43.3% 71.1% 18.0% inter: 20.2% 36.8% 0.9%
Stderr output: [libx264 @ 0xffffa27d79f0] i16 v,h,dc,p: 32% 22% 10% 37%
Stderr output: [libx264 @ 0xffffa27d79f0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 27% 17% 19%  5%  7%  7%  6%  7%  5%
Stderr output: [libx264 @ 0xffffa27d79f0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 27% 19% 12%  5% 11% 10%  7%  7%  4%
Stderr output: [libx264 @ 0xffffa27d79f0] i8c dc,h,v,p: 45% 21% 25%  9%
Stderr output: [libx264 @ 0xffffa27d79f0] Weighted P-Frames: Y:0.0% UV:0.0%
Stderr output: [libx264 @ 0xffffa27d79f0] ref P L0: 63.6% 17.3% 14.5%  4.6%
Stderr output: [libx264 @ 0xffffa27d79f0] ref B L0: 89.1%  9.4%  1.5%
Stderr output: [libx264 @ 0xffffa27d79f0] ref B L1: 97.7%  2.3%
Stderr output: [libx264 @ 0xffffa27d79f0] kb/s:6694.37
Stderr output: [aac @ 0xffffa26739b0] Qavg: 530.098
Stderr output: [libx264 @ 0xffffa21358d0] frame I:2     Avg QP:23.97  size: 87068
Stderr output: [libx264 @ 0xffffa21358d0] frame P:80    Avg QP:24.66  size: 47762
Stderr output: [libx264 @ 0xffffa21358d0] frame B:170   Avg QP:25.98  size: 26117
Stderr output: [libx264 @ 0xffffa21358d0] consecutive B-frames:  1.2% 23.0% 10.7% 65.1%
Stderr output: [libx264 @ 0xffffa21358d0] mb I  I16..4: 12.8% 74.6% 12.6%
Stderr output: [libx264 @ 0xffffa21358d0] mb P  I16..4: 12.3% 44.9%  2.2%  P16..4: 24.9%  7.9%  2.0%  0.0%  0.0%    skip: 5.7%
Stderr output: [libx264 @ 0xffffa21358d0] mb B  I16..4:  6.4% 15.8%  0.4%  B16..8: 35.7%  7.8%  1.1%  direct: 4.7%  skip:28.2%  L0:48.4% L1:46.8% BI: 4.8%
Stderr output: [libx264 @ 0xffffa21358d0] 8x8 transform intra:73.1% inter:88.7%
Stderr output: [libx264 @ 0xffffa21358d0] coded y,uvDC,uvAC intra: 43.3% 71.1% 18.0% inter: 20.2% 36.8% 0.9%
Stderr output: [libx264 @ 0xffffa21358d0] i16 v,h,dc,p: 32% 22% 10% 37%
Stderr output: [libx264 @ 0xffffa21358d0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 27% 17% 19%  5%  7%  7%  6%  7%  5%
Stderr output: [libx264 @ 0xffffa21358d0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 27% 19% 12%  5% 11% 10%  7%  7%  4%
Stderr output: [libx264 @ 0xffffa21358d0] i8c dc,h,v,p: 45% 21% 25%  9%
Stderr output: [libx264 @ 0xffffa21358d0] Weighted P-Frames: Y:0.0% UV:0.0%
Stderr output: [libx264 @ 0xffffa21358d0] ref P L0: 63.6% 17.3% 14.5%  4.6%
Stderr output: [libx264 @ 0xffffa21358d0] ref B L0: 89.1%  9.4%  1.5%
Stderr output: [libx264 @ 0xffffa21358d0] ref B L1: 97.7%  2.3%
Stderr output: [libx264 @ 0xffffa21358d0] kb/s:6694.37

In result I need one video with all draw text + audio from input trimmed by video duration (I use shortest for this, maybe I'm wrong), and a second video with all draw text and without any audio.

You need to split the drawtext output and then map a split result for each output.
ffmpeg \
-i ./source/video/women/1.mp4 \
-i ./source/audio/women.mp3 -y \
-filter_complex drawtext=fontsize=80:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=1:boxcolor=black@1:y=280,drawtext=fontsize=80:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=a0:boxcolor=black@0.8:enable='between(t,0,6.5)':y=700,drawtext=fontsize=80:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=a1:boxcolor=black@0.8:enable='between(t,0,6.5)':y=800,drawtext=fontsize=80:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=a2:boxcolor=black@0.8:enable='between(t,0,6.5)':y=900,drawtext=fontsize=80:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=a3:boxcolor=black@0.8:enable='between(t,0,6.5)':y=1000,drawtext=fontsize=80:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=b0:boxcolor=black@0.8:enable='between(t,7,10)':y=1000,drawtext=fontsize=80:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=b1:boxcolor=black@0.8:enable='between(t,7,10)':y=1100,drawtext=fontsize=80:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=b2:boxcolor=black@0.8:enable='between(t,7,10)':y=1200,drawtext=fontsize=80:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=b3:boxcolor=black@0.8:enable='between(t,7,10)':y=1300,drawtext=fontsize=80:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=b4:boxcolor=black@0.8:enable='between(t,7,10)':y=1400,drawtext=fontsize=30:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=c:enable='between(t,10.2,inf)':boxcolor=black@1:y=1500,drawtext=fontsize=30:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=d:enable='between(t,10.2,inf)':boxcolor=black@1:y=1550,split=2[o0][o1] \
-map [o0] \
-map 1:a:0 \
-shortest out1/_.mp4
-map [o1] \
-map 1:a:0 \
-shortest out2/_.mp4

Thanks, it's almost what I need, but not final. I've added update to question

ffmpeg logs to stderr and I don't see any error in the log. To not have audio in 2nd output, remove -map 1:a:0 and also -shortest

yes, I've done this and get error) error is in question section.

I looked at the log and there's no error indicated, only encoding progress and stats.

seems something wrong, because music stops after 1st second in first video.

any thoughts? Or maybe I've make a mistake?

for some reasons ffmpeg -i ./source/video/kids/5.mp4 -i ./source/audio/history.mp3 -map 0:v  -map 1:a -y -shortest 1.mp4 with shortest flat audio drops on 2 second, without shortest flag audio is ok, but video is too long


text:
How can I take a part of a video and chroma key only the parts that I select?
I'm not sure if this should be for photo or video, but let's say I see a part of a video that I would like to add a green background to, like chroma key, but the background isn't a solid color. Could I be able to select only the parts that I want to keep, and do this frame by frame? What I'm doing will only be about 3 seconds long. Is this possible with a program like After Effects, or some kind of Adobe program?

This isn't chroma keying. If your subject isn't in front of a green screen (or blue) then you're only other alternative is to mask it, rotoscope to be precise. After Effects does have a tool called a rotobrush that let's you brush around the edges of your subject but it's not the most precise or clean mask.It will however make for a very quick rotoscope. If you go frame by frame, you can make a mask with the pen tool and key the shape each frame as you adjust it. 72 frames at 24 frames per second would give you three seconds like you're estimating. That's about 2 days of work for someone with a decent amount of experience with the pen tool. Hope this helps.

How long it takes also depends on what the footage is. Static shots of a bald guy meditating or handheld footage of a hair metal band crowd surfing at a concert?


text:
My ffProbe script only seems to work with MKV files
Just learned about ffprobe yesterday, and I was able, after much googling, to assemble a command line BAT file to get the meta info I want.  Then, it turns out that it only works about half the time.  After some experimentation, it seems that it's working only on MKV files.
I don't know if there's a bug going on here, or if my command line needs improvement.  Maybe ffProbe only works on certain files, but I was assuming it would work on most popular vid formats.
I'm using AutoHotKey to create a BAT file, which I then launch.  So we really just need to look at the BAT file.
Here's my BAT script...
C:\PROGRA~1\ffmpeg\bin\ffprobe.exe -pretty -select_streams v \
-show_entries \
format=filename,size,duration,bit_rate:stream=codec_name,codec_type,bit_rate,width,height,display_aspect_ratio \
-of ini \
"S:\myTVshows\SampleName - S01E01 - SampleTitle.mp4"

After this is run, the console outputs only the #ffprobe output header and then hangs.  If it runs on an mkv file, then it instantly outputs all the data I want, as expected.
Update: when I add -report as a parameter, I get the report log file, of course... but I also get the output I want (instead of it hanging as before).  I wonder if it means this is a bug.
Notes

I reduced the path for ffprobe to 8.3 format so I wouldn't have to worry about quotes around that part.
I'm working with a very current install of ffmpeg/ffprobe (ffmpeg-20170404-1229007-win64-static).

Below is the console outupt...
ffprobe version N-85266-g1229007 Copyright (c) 2007-2017 the FFmpeg developers
built with gcc 6.3.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --e
nable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --
enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv
--enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-li
bfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug -
-enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enabl
e-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-li
bsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolam
e --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
--enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable
-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib
libavutil      55. 59.100 / 55. 59.100
libavcodec     57. 90.100 / 57. 90.100
libavformat    57. 72.100 / 57. 72.100
libavdevice    57.  7.100 / 57.  7.100
libavfilter     6. 83.100 /  6. 83.100
libswscale      4.  7.100 /  4.  7.100
libswresample   2.  8.100 /  2.  8.100
libpostproc    54.  6.100 / 54.  6.100
# ffprobe output

Link to Log file when '-report' param was added

Run the command manually on a MP4 and show the console output.

done.  hope it helps!

Add -report to the command and run. Share the report file.

Okay. Two things happened. 1) I got the log file, and 2) I actually got the output I wanted, instead of it hanging up. And thanks for the help! Here's the log (which is in the post as well)...
Link to log file produced when -report was added

It' s a bug, which delays the output of ffprobe, depending on duration of MP4. Looks like it was introduced alongwith the decode API.

Well, it sure is nice to have an answer.
Any work-arounds that you know of?  Or some other technique that would provide me with this basic info about videos?

Use an older version, say, 2 weeks or more. Mediainfo will also provide some info.

The older version worked just fine.  Thanks!  Would you like to put your comments down below as an answer and I'll mark it so that you get credit?

Since the implementation of the new decode API, ffprobe's readout for MP4 files takes much longer to be printed, and depends on the duration of the video. Switch to a version earlier than April 2017.

Yes. I switched to 3.2.4 and it returned results instantly!  Thanks!


text:
Please Explain the Codecs in my Example
Can someone explain what's happening in my project? Please use as much detail as possible, I just want to learn, thanks.
I have an Apache web server. It contains many videos (.mp4 .mkv which are ?containers?) Also I have asx files that point to their respective videos. I want users to stream the videos (on VLC or Windows Media Player) but right now it's really slow. I think a better understanding of codecs will help.

So codecs compress and decompress videos, right?
The decompressing happens on the client side in the media player. But where does the compressing happen?
Is it also in the media player?
Or can it be specified in the asx file?
Or does the video file pick which codec it uses to compress and decompress.
Can I chose which codec to use?
I know there are better codecs for certain situations than others. Can someone explain that?
I've seen a couple of my videos using LAV to decompress while some use H264/5 (can't remember which).
As for the streaming side, is there a way to say: if the network speed is slow, change the video from 1080p to 480p?
Are there certain settings that I should be aware of in either of my media players to help with buffering, streaming, codecs, etc?
Just saw in the tags at the bottom that there is a codec and transcoding. Is there a difference? Does a codec specify how transcoding happens?
I realize these are a lot of questions, but if someone has answers to any of them, please let me know. Again, I'm just trying to learn

EDIT
If I need to make changes in the media player, would it be better to have a media player embedded inside my web server? And ideas on how to go about that/where to start?

Please break this up into separate questions. As it is, this is much too broad to get you an effective answer.

How about: What's happening in my example? Where is the codec actually doing the compressing and decompressing?

So codecs compress and decompress videos, right?

COmpress DECompress. Yep. Just like with text encoding, e.g. ascii or unicode, but with video you take a raster (grid of pixels) and turn that into a stream of data. Often the goal is to make the size of the data as small as possible, though sometimes it's to make sure that the pixels that are reconstructed when the file is read are exactly the same as the pixels that went in, or a combination of the two.

The decompressing happens on the client side in the media player. But where does the compressing happen?
  Is it also in the media player?
  Or can it be specified in the asx file?
  Or does the video file pick which codec it uses to compress and decompress.

The decompression takes place in the client, beit the browser or a media player or a plugin. The compression happens once, when you compress the video, i.e when you make the mp4, mkv etc files.
The different file types are indeed different containers, and containers can contain streams encoded in different codecs. Take an mp4 file. The video will usually be encoded in h.264 while the audio is probably aac, and there might be a subtitle stream encoded as movtext. Often container formats have the capability to hold many different codecs. The quicktime (mov) container is compatible with dozens of codecs, as is mkv.
Once a file is compressed using a certain codec you will need something that can read that codec to play it. The details of what the codec is, as well as the parameters that tell the player how to decode it are in the container. So the player will also have to know how to read the container.
The .asx file will just point to the stream, it's up to the player to decode it.

Can I chose which codec to use?
  I know there are better codecs for certain situations than others. Can someone explain that?

Yes, different codecs are useful for different things. If you're streaming video you'll want good quality but for the smallest possible bitrates. Often that means using a lossy compression - one where the compressed video has lost quality compared to the uncompressed original. The trick is to lose the quality in a way that it's less obvious to humans. h.264 is probably the right tool for the job, unless the patent restrictions or licensing costs are an issue.
However, if I'm rendering an intermediate file in my post production chain I want high bit depth and lossless or minimally lossy quality. I might go for lossless 12-bit 4:4:4, or compromise and use a  codec like cineform or proRes, depending on my OS. While they maintain quality and dynamic range, they'd be awful codecs for streaming, lossless 12 bit 4:4:4:4 has ~2500 MB/s data rate. Other codecs are a compromise between file size and quality, others work really well at ultra-low bitrates or require less CPU, others are good because they are unencumbered by patents or licensing.

I've seen a couple of my videos using LAV to decompress while some use H264/5 (can't remember which).

LAV is a software library which is used by compression and decompression software. It is capable of reading and writing many codecs. H.264/5 are codecs.

As for the streaming side, is there a way to say: if the network speed is slow, change the video from 1080p to 480p?

yes, I think so - youtube does it, but out of my field of expertise, and probably a better question for Superuser.

Are there certain settings that I should be aware of in either of my media players to help with buffering, streaming, codecs, etc?

Not really, it's the compression side of things that you want to optimise. You need to be aware of your client's capabilities and encode with that in mind.

Just saw in the tags at the bottom that there is a codec and transcoding. Is there a difference? Does a codec specify how transcoding happens? I realize these are a lot of questions, but if someone has answers to any of them, please let me know. Again, I'm just trying to learn

Transcoding is converting from one codec to another. So say I've mastered to one of my lossless 12-bit codecs. I've now got a video file that runs into hundreds of gigs. I might want to make a copy for the internets, so I fire up my transcoding app and tell it to take the master and compress it to an mp4 file, which will take up a fraction of the space.

If I stream the same file from my work computer vs my home computer, the streaming is different; one streams with more lag than the other. Does this have to do with what method is being used to decompress, or does it have to do with the connection bandwidth

It is possible that the CPU, GPU, and RAM could have an impact on playback performance, but more likely, as you guessed, it is the bandwidth.


text:
ffmpeg - trascoding multiple streams from stdin errors out: pipe:: Invalid data found when processing input
I'm trying to transcode(below just copy) a/v streams from stdin and generate a thumbnail simultaneously. The issue that I get an error pipe:: Invalid data found when processing input.
Why is that and how can I fix it? Separately the map commands work just fine so I assume I'm incorrectly using the pipe functionality.
cat a2.mkv |ffmpeg -i - -y -map 0:0 -c:0 copy -f matroska 0.mkv -i - -y -map 0:0 -vf "select=gt(scene\\,0.4)" -frames:v 1 -vsync vfr -vf fps=fps=1/60 -codec png -f image2pipe 0.png
ffmpeg version 3.2.4 Copyright (c) 2000-2017 the FFmpeg developers
  built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/3.2.4 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --disable-lzma --enable-vda
  libavutil      55. 34.101 / 55. 34.101
  libavcodec     57. 64.101 / 57. 64.101
  libavformat    57. 56.101 / 57. 56.101
  libavdevice    57.  1.100 / 57.  1.100
  libavfilter     6. 65.100 /  6. 65.100
  libavresample   3.  1.  0 /  3.  1.  0
  libswscale      4.  2.100 /  4.  2.100
  libswresample   2.  3.100 /  2.  3.100
  libpostproc    54.  1.100 / 54.  1.100
Input #0, matroska,webm, from 'pipe:':
  Metadata:
    encoder         : libebml v1.3.1 + libmatroska v1.4.2
    creation_time   : 2017-03-11T02:56:50.000000Z
  Duration: 02:12:52.39, start: 0.000000, bitrate: N/A
    Chapter #0:0: start 0.000000, end 520.270000
    Metadata:
      title           : 00:00:00.000
    Chapter #0:1: start 520.270000, end 1135.718000
    Metadata:
      title           : 00:08:40.270
    Chapter #0:2: start 1135.718000, end 1703.660000
    Metadata:
      title           : 00:18:55.718
    Chapter #0:3: start 1703.660000, end 2314.187000
    Metadata:
      title           : 00:28:23.660
    Chapter #0:4: start 2314.187000, end 2888.594000
    Metadata:
      title           : 00:38:34.187
    Chapter #0:5: start 2888.594000, end 3499.246000
    Metadata:
      title           : 00:48:08.594
    Chapter #0:6: start 3499.246000, end 4154.692000
    Metadata:
      title           : 00:58:19.246
    Chapter #0:7: start 4154.692000, end 4646.392000
    Metadata:
      title           : 01:09:14.692
    Chapter #0:8: start 4646.392000, end 5373.660000
    Metadata:
      title           : 01:17:26.392
    Chapter #0:9: start 5373.660000, end 5882.085000
    Metadata:
      title           : 01:29:33.660
    Chapter #0:10: start 5882.085000, end 6627.871000
    Metadata:
      title           : 01:38:02.085
    Chapter #0:11: start 6627.871000, end 7144.471000
    Metadata:
      title           : 01:50:27.871
    Chapter #0:12: start 7144.471000, end 7451.944000
    Metadata:
      title           : 01:59:04.471
    Chapter #0:13: start 7451.944000, end 7972.394000
    Metadata:
      title           : 02:04:11.944
    Stream #0:0(eng): Video: h264 (High), yuv420p(tv, bt709/unknown/unknown, progressive), 720x300 [SAR 1:1 DAR 12:5], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
    Metadata:
      title           : X264
    Stream #0:1(eng): Audio: aac (LC), 48000 Hz, stereo, fltp (default)
pipe:: Invalid data found when processing input

try to add --nostdin

It errors out. See below. Also how could nostdin work if I feed ffmpeg from stidin? cat a2.mkv |ffmpeg -i - -y -map 0:0 -c:0 copy -f matroska 0.mkv -i - -y -map 0:0 -vf "select=gt(scene\\,0.4)" -frames:v 1 -vsync vfr -vf fps=fps=1/60 -codec png -f image2pipe 0.png  --nostdin Result:  Unrecognized option '-nostdin'. Error splitting the argument list: Option not found

I fixed your command
       cat a2.mkv | ffmpeg -nostdin -i - -y -map 0:0 -c:0 copy -f matroska -y 0.mkv -map 0:0 -vf "select=gt(scene\\,0.4)" -frames:v 1 -vsync vfr -vf fps=fps=1/60 -codec png -f image2pipe 0.png


text:
Ghosting effect with open source software
I am wondering if "Ghosting" effects like the one in this video are available in any Open Source software, like Blender.
Premiere Pro seem to call it "ghosting" while Final Cut Pro seems to call it "Ghost Trails".

To my knowledge, there is no Open Source tool with a built-in feature for producing that ghosting effect. However, I believe there exist the necessary tools for you to create the effect yourself.
Breaking down what's happening, it looks like the effect consists of:

Freezing and extracting the skater from the background at certain moments
Animating those freeze frames to track with the camera movement

There are Open Source tools to do just that.

Rotoscoping to extract the skater from still frames (Gimp or Blender)
Motion Tracking (Blender) to animate those stills to match camera motion
Compositing (Blender) to put it all together

Thanks. I did send you the bounty but will keep the question open in the hope some day some open source software will support this feature out of the box. -  So long i have to learn a bit more about blender.

I'd like to see more ready-to-use features like this, too. I'm hopeful that will happen as the open source software in this area matures.  Right now Blender is an incredibly powerful program--in many ways able to go toe-to-toe with industry heavyweights--but it often feels like with Blender you're given a million free LEGO bricks, and no instructions.


text:
Add an overlay (video or text) to multicast tv stream
What i have

10 decoder which subscribe to private multicasted TV channels.
10 TV to display what the decoders outputs (connected though HDMI).

What i want to do

I would like to to add an overlay (video or text) on the TV.
The overlay must be present on every TV channels.

My guesses
I first though about using OBS on a computer between each decoder and tv. To merge RTMP and overlay. And put OBS in fullscreen-preview mode.
|---------|         |-------------|         |--------|
| decoder |--HDMI-->|   computer  |--HDMI-->|   TV   |
|---------|         | running OBS |         |--------|
                    |-------------|

But this is not the ideal scenario, because i'll have to restart and put OBS in fullscreen everytime the computer is shutted down...

So my question is, how would you achieve this (with OSb or something else)?


text:
Find a video and sounds
I am looking for a video which start at the top of ocean surface for few seconds and then beginning to go under the surface. There should be no people on the video. But fish and other sea creatures can be there.
Also I am looking for interesting sounds which I can add to the video like dolphin sounds, whale sounds and specially a Submarine like sound which gives the user a good feeling that they are going underwater little by little.
It would also help if I can find a place where I can get few lines of text spoken out in a nice voice which would match the video

Yeah, I tried some sites like videohive

For the voice over, try Voice123 or Voice Bunny.

Checkout videoblocks. They are a subscription based stock footage site.
Here is a clip I found that is similar to what you are looking for.
Consider using my referal link to sign up for videoblocks.

For sound effects, check out audioblocks (a sister sight to videoblocks).
They have sound effects for dolphins, whales, and lots of different water sounds.
Consider using my referral link to sign up for audioblocks.
P.S. I am not affiliated with videoblocks or audioblocks in any way.


text:
Cropping the video and removing the black portion
I know that the below command will crop 25 from top and bottom
ffplay -i input.mp4 -vf "crop=in_w:in_h-50"

However I just want to crop 25 from bottom(not top).
Also How can i remove the black portion in the output so that the output video appears as full screen?
EDIT
Here is the screenshot of the black portion after crop

Before crop

Where is the black portion? Share a screenshot.

Thanks Mulvya... I will share a screenshot..Could you let me know how to remove the bottom portion alone

crop=in_w:in_h-25:0:0

Use
ffplay -i input.mp4 -vf "crop=in_w:in_h-25:0:0"

If you're watching this full screen, then the display will show black bars if the resized video is not the same aspect ratio as your monitor. To achieve that, you'll have to crop horizontally as well. If your crop X pixels vertically, you'll have to crop (16/9)*X pixels horizontally.
To do this, use
(left and right)
ffplay -i input.mp4 -vf "crop=in_w-25*16/9:in_h-25:(ow-iw)/2:0"

(right only)
ffplay -i input.mp4 -vf "crop=in_w-25*16/9:in_h-25:0:0"

Thanks... What is the command to crop horizontally, I mean If I want to achieve that in a single command? 1) Crop 25 pixels from bottom vertically and crop (16/9)*25 pixels horizontally from right and left in a single command?  2) Crop 25 pixels from bottom vertically and crop (16/9)*25 pixels horizontally from right alone in a single command?


text:
Can i do audio monitoring with wireless headphones with a field recorder?
I am new to audio. I was wondering if I can plug in a wireless headphone system, like a cheap bluetooth audio transmiter, to the audio-out jack of a field recorder such as Tascam DR-05 or Zoom H1 when used with a lavalier mic on the subject.
I don´t need high quality sound monitoring just to make sure that the lavalier is turned on and recording.
(I am planning on leaving the recorder and lapel mic for hours on a moving subject, "run & gun" style, and I am afraid the subject will accidentaly unplug the cable, damage the mic or foul-up the recorder. I know there are wireless recorders but they are out of my price range, and I am working under the assumption that this way will yield better sound quality than a shotgun mic on camera. In case it´s relevant, my total audio budget is $200: either just a Rode Videomic Pro on camera or a Tascam DR-05+ ATR-3350 lav + cheap wireless headphones, buying either audio "solution" for now and adding the other later for more versatility)

I see no reason why not. You'd just have to make sure you find a transmitter that's battery powered, and small enough so you can bundle it with the micro-recorder.
The question is; is it necessary. Would you be able to do anything, such as stop the event/filming, if there was a problem? Secondly; the feed you're monitoring is only going to tell you it's listening, not recording.
We use the micro Tascams with Lav Mics for some events. My recomendation is:

Double Up:  Two Micro Tascam Units
Double Lav Mic Clip
Test Test Test your settings; input levels, auto gain vs manual, bit rate, etc, and get them both setup so you wont overmodulate.
Run one slightly cold. Lower the gain / input on 1 mic by 5 db. So if the speaker gets really loud, you have a lower gain recording.
Record in PCM 24 Bit if possible. You can then use compression in post to get super even audio.
Use black gaff tape to tape OVER the hold button after starting the unit. This will prevent the units from having both a button pressed, as well as the guy turning off the hold button - it's happened to me.
When you start the recorders in the field, at the very start; talk right into the mics, and say; DATE, TIME, EVENT, PERSON THE MIC IS GOING ON, ETC.
Then tape HOLD and LAV them up.

I'd do double mics over monitor, but not sure if that's what you want monitoring for.

Thanks for the tips. great one about dual systems and the tape, I had thought about encasing the Tascam unit in a DIY plastic box. Back ups would be ideal, but as most beginers, while understanding how critical audio is,  I already invested over 95% of my initial budget in video gear and accessories and until I earn enough from videography to justify spending more on audio i´ll have to make do will less.

A small project box is a good idea, they come in practically every size imaginable. Again, you haven't said what you're filming; so just keep in mind if this is for a recurring type of shoot; have the "bundle" be flexible. Belt clip, vs; putting it in their pocket; if it's a woman; no pockets, and dress, no where to clip... I would go for a side by side config if using the unit + another unit and/or audio transmitter. Keep it as thin and small as possible. My recommendation is a dual record setup; run one hot one cold; and a dual mic clip with two decent condenser lapel mics.

Haven´t started yet but it would be for low-budget weddings, maybe events, and YouTube videos. So, I am mostly limited to "lav" the groom, the subject, or myself. If/when I start earning from this, i´ll invest in better gear: if you think it´s really essential for good audio, then I can stretch my initial audio gear investment up to under $1000. I´ll also have two DSLR cameras recording audio, and an iPhone I can use for sound either natively or with mic. Yes their audio quality is subpar but I thought of mixing channels for some ambient sounds, speeches far from the subject, or music.


text:
iOS - App To Change Aspect Ratio of a Video
I'm a new iOS user, and previously on my Android device, from time to time I needed to change the aspect ratio of a video to 1:1 (to fit with Instagram).
So at that time, I was using this app that let's you directly type ffmpeg commands as if you were using a computer, so I it was simple to do it by using :
-vf "scale=720:720,setsar=1:1"

But unfortunately I didn't find any alternative on iOS.
So, does anyone know an app that will let me change the aspect ratio of a video?

why not just go back to Android tbh? iOS doesn't have any real benefits

I  was in need of a good 4 inch smartphone.
I had to choose between an Xperia Compact and the SE, but I didn't liked the design of the Xperia.

Videon
It's a great app for the iPhone.
Not only does it have some great camera features; like stabilization, and manual exposure/WB, but you can also use it's post feature on any clip in your Photos folder.
You can crop, change aspect ratio, framerate, adjust rotation, pretty much anything... along with a ton of filters; color correcting tools and so on.
Very easy to use. And real time playback of your file as you correct it.
When finished, you can output your file by exporting it to a variety of bitrates and sizes.
A must have!

Seems great, even though it's a paid app.
By the way I discovered that a version of ffmpeg is available for iOS, but it requires to have a jailbroken iphone.


text:
Davinci Resolve: The rendered output has video that lags 1-2 seconds behind audio
I record an MP4 video with IPEVO document camera. There is no out of sync problem. Here is the metadata of the MP4 video (as the media source).
General
Format                                   : MPEG-4
Format profile                           : Base Media / Version 2
Codec ID                                 : mp42 (mp41/isom)
File size                                : 499 MiB
Duration                                 : 8 min 50 s
Overall bit rate                         : 7 897 kb/s

Video
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : Baseline@L3.1
Format settings                          : 4 Ref Frames
Format settings, CABAC                   : No
Format settings, Reference frames        : 4 frames
Format settings, GOP                     : M=1, N=15
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 8 min 50 s
Bit rate                                 : 7 717 kb/s
Width                                    : 1 024 pixels
Height                                   : 768 pixels
Display aspect ratio                     : 4:3
Frame rate mode                          : Constant
Frame rate                               : 30.000 FPS
Standard                                 : Component
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.327
Stream size                              : 488 MiB (98%)

Audio
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Codec ID                                 : mp4a-40-2
Duration                                 : 8 min 50 s
Source duration                          : 8 min 49 s
Bit rate mode                            : Constant
Bit rate                                 : 175 kb/s
Nominal bit rate                         : 192 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 44.1 kHz
Frame rate                               : 43.066 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 11.1 MiB (2%)
Source stream size                       : 11.1 MiB (2%)
mdhd_Duration                            : 530057

However, if I edit it with Davinci Resolve 17 Beta, the rendered output has out-of-sync issue. The video lags about 1-2 seconds behind the audio.
Could you tell me what causes this issue?
Edit 1
Is it due to the difference of frame rate? The following is taken from the above metadata.
Video Frame rate                               : 30.000 FPS
Audio Frame rate                               : 43.066 FPS (1024 SPF)

Edit 2
I dragged and drop the MP4 clip onto the timeline. The end part of the timeline is shown as follows.

There are some delayed frames at the end. How to fix this?

FPS means something different for audio. See here: https://stackoverflow.com/questions/61235189/video-is-25fps-audio-50-fps

@Matt: Thank you for informing it. It is very helpful.


text:
How to Merge video files having different aspect ratio and make the narrow one padded
I am using below command to merge two videos
complexCommand = new String[]{"-y", "-i", file1.toString(), "-i", file2.toString(), "-strict", "experimental", "-filter_complex",
                "[0:v]scale=1920x1080,setsar=1:1[v0];[1:v]scale=1920x1080,setsar=1:1[v1];[v0][0:a][v1][1:a] concat=n=2:v=1:a=1",
                "-ab", "48000", "-ac", "2", "-ar", "22050", "-s", "1920x1080", "-vcodec", "libx264","-crf","27","-q","4","-preset", "ultrafast", rootPath + "/output.mp4"};

this command works well for merging but me second file is in portrait having black portion at both side and ratio of 1920*1080 and first video file is in landscape having ratio of 1920*1080. now the resulting video has been made by stretching the second video maintaining the ratio of 1920*1080
Now My issue is I want to add padding two second video but i could't found any suitable command to edit my command
Any help appreciated
Changed my Command as below
  complexCommand = new String[]{"-y", "-i", file1.toString(), "-i", file2.toString(), "-strict", "experimental", "-filter_complex",
                "[0:v]scale=1920x1080,setsar=1:1[v0];[1:v] 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 setsar=1:1[v1];[v0][0:a][v1][1:a] concat=n=2:v=1:a=1",
                "-ab", "48000", "-ac", "2", "-ar", "22050", "-s", "1920x1080", "-vcodec", "libx264","-crf","27","-q","4","-preset", "ultrafast", rootPath + "/output.mp4"};

getting below error
 [Parsed_setsar_1 @ 0xb4f29b80] num:den syntax is deprecated, please use num/den or named options instead
                                                                [pad @ 0xb4f762a0] Invalid 0xRRGGBB[AA] color string: '1'
                                                                [pad @ 0xb4f762a0] Unable to parse option value "1" as color
                                                                [pad @ 0xb4f762a0] Invalid 0xRRGGBB[AA] color string: '1'
                                                                [pad @ 0xb4f762a0] Unable to parse option value "1" as color
                                                                [pad @ 0xb4f762a0] Error setting option color to value 1.
                                                                [Parsed_pad_3 @ 0xb4f29c20] Error applying options to the filter.
                                                                [AVFilterGraph @ 0xb4f17040] Error initializing filter 'pad' with args '1920:1080:(1920-iw*min(1920/iw,1080/ih))/2:(1080-ih*min(1920/iw,1080/ih))/2 setsar=1:1'
                                                                Error initializing complex filters.

Updated my command as per this
 complexCommand = new String[]{"-y", "-i", file1.toString(), "-i", file2.toString(), "-strict", "experimental", "-filter_complex",
                "[0:v]scale=1920x1080,setsar=1:1[v0];[1:v] 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,setsar=1:1[v1];[v0][0:a][v1][1:a] concat=n=2:v=1:a=1",
                "-ab", "48000", "-ac", "2", "-ar", "22050", "-s", "1920x1080", "-vcodec", "libx264","-crf","27","-q","4","-preset", "ultrafast", rootPath + "/output.mp4"};

and get it working

See answer here.

Sir I have refer that command but I am not able to implement it in my command, I am not that good at making command
Can you tell please guide me where and what should be changed in my command

Replace the scale=1920x1080 with 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

after the second video or at the output?

@Mulvya  I have made the changes and updated my questoin

before setsar, there should be a comma.

Thank you so much Sir ji you made my day
I have added that appropriately and got the expected result

This command is not working in Nexus 5  only!!
Error Says : [Parsed_setsar_2 @ 0xb3c29360] num:den syntax is deprecated, please use num/den or named options instead

@Mulvya
https://ffmpeg.org/pipermail/ffmpeg-user/2014-February/020004.html,
Kindly help me with it, am getting this error while merging video sometimes only, like when video is big i think


text:
Advertisement Video Production
So there's this type of video I want to make, but not sure what type it is called and not sure where to refer to when looking for examples on how to make one.
This is an iPhone Ad  from last year and it is what I want to try and recreate.
How would you make this kind of video?

I'd also suggest that video might not be worth copying.  It's honestly a pretty horrible video.  The text moves way too fast to be meaningful and takes too much of the time.  I couldn't even finish watching the video despite trying to watch it to offer feedback.  They use some decent artistic decisions in clip selection, but it wasn't enough to hold the video together for me.  Without compelling content that people have a pre-vested interest in wanting to know about, I doubt that this style of video would be an effective means of presentation for your content.

Related https://video.stackexchange.com/questions/14974/how-to-improve-sense-of-timing-in-motion-graphics

https://video.stackexchange.com/questions/3832/how-best-to-find-literature-on-motion-graphics-design

https://video.stackexchange.com/questions/8316/software-advice-for-producing-video-ads

https://video.stackexchange.com/questions/13082/what-are-motion-graphics/

A note on the closure.  It isn't exactly a duplicate of the closed as duplicate, but to the extent we can cover this kind of thing here, the basic answer for high production value motion graphics is generally hire someone.  The other questions I linked will give some more direction on further reading if you really want to try doing it yourself, but this particular topic has been covered in a much more general sense pretty in depth.  If you have a more specific question about some aspect of how to make the video after looking at those, please feel free to post a more specific question.

Hire a video editor.
Questions like yours often hint at a common misconception that all one needs to create great video content is the right piece of software, and once one has found the right software creating an awesome piece of video content becomes a matter of pressing a couple of buttons. This is incorrect.
The technical side of the video you linked is actually pretty straightforward. It consists of basically two interspersed parts/styles:

Product shots & video. Most of them seem to be normal videos, though some of them look like well-done 3D-animations to me. For the latter you will indeed need a fair amount of technical expertise.
Animated text. FOr this video especially, it's not that hard to do technically. It's just some text that is animated in and out, intertwined with video footage. You could probably do all of that in Premiere Pro. Your choice of video editing software doesn't really matter here. Pick one.

What makes that video great however is not the technical implementation. It's the aesthetic & stylistic choices made during filming and editing. Watch the video again and appreciate the following aspects:

Lighting and light/shadow contrasts (during the live action footage)
Montage (i.e. how are the individual parts stitched together)
Coordination of sound and video (notice how the cuts correspond to the beats of the music?)
Pacing (the sequence of fast-and-slow parts,  e.g. the pacing changes at TC 0:10, 0:19 and 0:30)
Emphasis of certain parts, again using nothing but light and dark (regarding the background color, but also the way this is intersperces with low-key and high-key footage)
Transitions. Those are very short and easy to miss, but there are some great match cuts between text and video elements there (e.g. at TC 0:57, notice how the text moving to the right transitions to the shot of the ballon hitting the iPhone?)
... and much more.

All of those subtle aesthetic decisions are what people study and exercise for years. The study of video editing (or any creative/artistic field really) is really not about how to use a piece of software, but rather about aesthetics (which btw. has little to do with pretty or beautiful stuff, but is the study of perception). Which is why learning a piece of software, no matter how sophisticated, won't get you very far. Instead, focus on learning aesthetics and finding your own style, then your choice of software won't matter.
If you are interested in learning more on that subject, check out my answer here: Good learning resources for 'non-technical' aspects of filmmaking. Otherwise - and this brings me back to my initial point - hire a video editor.


text:
Video format with dynamic resolution
Are there any video formats that change resolution per frame and with different resolutions at different parts of the screen?
All videos I know today they have fixed resolution.
For video blogs I don't need the highest resolution when I am only talking with frame on me. Selectively I would like to have the higher resoltion on photos I am showing and short clips I attach.
Why I want it?

4+K videos would globally kill any internet connection,
Storage of 4+K unoptimized videos take huge disk space.

When I present a photo I don't need also to copy the photo to each frame of video where it is visible.
The closes thing is presentation like *.ppt . But it is far too complex to play, create(with sound all the time) and stream. Maybe I only need some smart video compression tool?

It is technically possible with H.264/5 codecs, but a) it would be tedious to create. b) most players can't be relied upon to play such files .

You can have variable samples but as far as I understand codecs, that's not possible with resolution.

What is your delivery platform? Youtube? Your site?

As others have mentioned, you seem to be confusing resolution and frame rate.  There are variable resolution systems for things like VR for foviated rendering (where the area being looked at is rendered in higher resolution than the surrounding areas) and there are also some large format displays where the resolution of the overall visual display may not be consistent, but you aren't talking about either of these situations.
For a conventional display viewed by multiple people, you aren't going to be able to meaningfully change the resolution throughout the video without it being pretty jarring.  What you are talking about instead is the idea of varying the frame rate (how often the image updates) or group of pictures compression (where surrounding frames are described in terms of their differences from another frame rather than describing the full image for every frame.
In fact, virtually all modern video codecs use the latter of these two.  Groups of pictures have been used in pretty much every video format since the MPEG-2 and the DVD (with some usage before as well).  This compression technique is why we can get such incredible compression with so little quality loss.
To put it in perspective, an individual raw frame of 4k video from my Ursa Mini digital cinema camera is 10MB.  At 24 frames a second, that's 240MB/sec (bytes, not bits), yet Netflix can give a reasonable quality 4k video feed at only 15Mb/sec (bits, not bytes), that's 1/128th of the data involved in the RAW video with relatively minimal visible difference (and that's before calculating the color information which would actually nearly triple the overall data rate making it less than 1/300th of the uncompressed video).
Simply put, our video compression options available already are staggering using just the latter of these options and will tend to work even better on low motion video where very little changes between frames.  2 pass encoding will give the best result as it will determine the amount of change between frames in the first pass and then optimize the data storage on the second.
Variable frame rate is an option you can pursue to further lower the bandwidth requirements if large portions truly do not need to change at all, but such encoders are more complicated, less commonly available and don't play back quite as reliably across devices.  Overall, I'd try seeing what you can get with careful tweaking of modern h.264 or h.265 algorithms with fairly long GOP settings (long key frame intervals).

You can't get "dynamic resolution" because essentially that would mean that some of the time you used a 4K display (for example) to show a 2160P image and some of the time you displayed a 1080P image by pixel doubling - so either way it's 4K but what you could gain (IF there were such a Codec) is an increase in the compression, and that's where you should look.
The h265+ Codec developed by HikVision analyses the image frame by frame and decides what is important and what can be compressed to a greater extent, relying upon prior frames to have the data to 'fix' where the extreme compression was used - it can be decoded with a standard h265 (non plus) decoder.
Here is a quote from their Website: "The average decreased rate between H.264 and H.265 is 47,8%. When applying Hikvision H.265+ the decrease rate increases to an average of 83.7 percent.".
Here's the explanation of this: http://www.hikvision.com/europe/Press-Release-details_71_i14097.html
PDF: http://www.hikvision.com/upload/20161209211521855.pdf
As far as I know it's only available as Hardware in HikVision's cameras, if someone knows where there's an Open Source version of h265+ I'd sure like to know - thanks.

You might look into svg. It's a system for vector graphics, but it allows you to include raster graphics, too, like .png and .jpg files. You could have an SVG file displayed in the same place as your video, and at the appropriate time switch the SVG to being visible over the video. When you want to show the video again, make the SVG file transparent, etc. You could simply make the video black at the points where the SVF file is visible. It should compress very well in those sections.
SVG files can be created in a text editor as they are just XML files. They are supported by every major browser in use today.

An okay solution, but on the right track. This problem should be solved with javascript and run the video in a web player. It would be easier to create and show a jpeg, then click for higher resolution to open in a new window.

This isn't pertaining to a video format anymore. This is a custom media player solution.

@Let Because alternative solutions are not allowed, or the asker specifically said no? Sorry, neither of those happened.

This is the format of the site. Besides, I'm not trying to be a stickler here, I just don't think this is even a useful answer.He mentioned that using PowerPoint was too complex. Don't you think that a JavaScript application is even more complex?

I think that this is not needed, both in terms of computational and bandwidth needs. H.264 and H.265 as well the vp8 and vp9 codec use a GOP line for the frames.
Once you have a certain frame and big blocks of the frame are the same or there's just a small movement this is deduced and rendered in decoding phase with a small cpu and very low bandwidth usage.
TL; DR: codecs do it already that for you. You concerns could apply only if you are using uncompressed or some crazy work codec, but that's not the case for the delivery on YT.