text:
FFmpeg convert G.711 Audio to AAC Audio
Is it possible at all to convert G.711 audio to AAC audio in a stream using ffmpeg? My cam is streaming fine in Chrome (video + audio) but all the other browsers have no audio. I would appreciate any help / input / suggestions / comments at all. Many thanks in advance!
Here is the code:
ffmpeg -rtsp_transport tcp -i rtsp://login:password@1.1.1.1:554/11 -map 0 -c:v copy -c:a copy -f
segment -segment_list /usr/local/nginx/html/hls/mystream.m3u8 -segment_list_type hls -
segment_list_size 10 -segment_list_flags +live /usr/local/nginx/html/hls/mystream%01d.ts

I have of course tried putting -c:a aac there before but it does not help.
There are millions of online tutorials and examples on how to convert a file. But it's not a file in my case it's a live stream. Am I missing something here? Do I perhaps somehow have to convert my final output file called mystream.m3u8?
P.S. Currently my cam is streaming in libx264 for video and G.711 for audio, but I can easily change it to stream in libx265 for video and G.726 for audio should that be of any help to play both video + audio. These are the only two options available in my camera and I cannot set it to anything else.
P.S.S. Here's the copy-pasted log, Gyan. I am not sure if that helps though. I do not see anything unusual there. Can you tell what is wrong?
ffmpeg started on 2020-04-08 at 04:54:52
Report written to "ffmpeg-20200408-045452.log"
Command line:
ffmpeg -rtsp_transport tcp -i rtsp://login:pass@1.1.1.1:1/111 -map 0 -c:v copy -c:a aac -f segment -segment_list /usr/local/nginx/html/hls/mystream.m3u8 -segment_list_type hls -segment_list_size 10 -segment_list_flags +live "/usr/local/nginx/html/hls/mystream%01d.ts" -loglevel verbose -report -t 30
ffmpeg version 4.1.4-1~deb10u1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 8 (Debian 8.3.0-6)
  configuration: --prefix=/usr --extra-version='1~deb10u1' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --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-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --en  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
Splitting the commandline.
Reading option '-rtsp_transport' ... matched as AVOption 'rtsp_transport' with argument 'tcp'.
Reading option '-i' ... matched as input url with argument 'rtsp://login:pass@1.1.1.1:554/111'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0'.
Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'copy'.
Reading option '-c:a' ... matched as option 'c' (codec name) with argument 'aac'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'segment'.
Reading option '-segment_list' ... matched as AVOption 'segment_list' with argument '/usr/local/nginx/html/hls/mystream.m3u8'.
Reading option '-segment_list_type' ... matched as AVOption 'segment_list_type' with argument 'hls'.
Reading option '-segment_list_size' ... matched as AVOption 'segment_list_size' with argument '10'.
Reading option '-segment_list_flags' ... matched as AVOption 'segment_list_flags' with argument '+live'.
Reading option '/usr/local/nginx/html/hls/mystream%01d.ts' ... matched as output url.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'verbose'.
Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'.
Reading option '-t' ... matched as option 't' (record or transcode "duration" seconds of audio/video) with argument '30'.
Trailing options were found on the commandline.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument verbose.
Applying option report (generate a report) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input url rtsp://login:pass@1.1.1.1:554/111.
Successfully parsed a group of options.
Opening an input file: rtsp://login:pass@1.1.1.1:554/111.
[tcp @ 0x564b593fe780] No default whitelist set
[tcp @ 0x564b593fe780] Original list of addresses:
[tcp @ 0x564b593fe780] Address 8.2.1.11 port 554
[tcp @ 0x564b593fe780] Interleaved list of addresses:
[tcp @ 0x564b593fe780] Address 8.2.1.1 port 554
[tcp @ 0x564b593fe780] Starting connection attempt to 8.2.1.1 port 554
[tcp @ 0x564b593fe780] Successfully connected to 8.2.1.1 port 554
[rtsp @ 0x564b593fc540] SDP:
v=0
o=StreamingServer 3331435948 1116907222000 IN IP4 192.168.0.199
s=10
c=IN IP4 0.0.0.0
t=0 0
a=control:*
m=video 0 RTP/AVP 96
a=control:trackID=0
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=42002A;sprop-parameter-sets=Z0IAKpY1QPAET8s3AQEBAg==,aM48gA==
a=framesize:96 1920-1080
m=audio 0 RTP/AVP 8
a=control:trackID=1
a=rtpmap:8 PCMA/8000/1
a=ptime:20
a=fmtp:8 packetization-mode=1

[rtsp @ 0x564b593fc540] video codec set to: h264
[rtsp @ 0x564b593fc540] RTP Packetization Mode: 1
[rtsp @ 0x564b593fc540] RTP Profile IDC: 42 Profile IOP: 0 Level: 2a
[rtsp @ 0x564b593fc540] Extradata set to 0x564b594005f0 (size: 28)
[rtsp @ 0x564b593fc540] audio codec set to: pcm_alaw
[rtsp @ 0x564b593fc540] audio samplerate set to: 8000
[rtsp @ 0x564b593fc540] audio channels set to: 1
[rtsp @ 0x564b593fc540] setting jitter buffer size to 0
[rtsp @ 0x564b593fc540] setting jitter buffer size to 0
[rtsp @ 0x564b593fc540] hello state=0
[h264 @ 0x564b59400100] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0x564b59400100] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 0x564b59400100] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0x564b59400100] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 0x564b59400100] unknown SEI type 229
[h264 @ 0x564b59400100] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0x564b59400100] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 0x564b59400100] nal_unit_type: 6(SEI), nal_ref_idc: 0
[h264 @ 0x564b59400100] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x564b59400100] unknown SEI type 229
[h264 @ 0x564b59400100] Format yuvj420p chosen by get_format().
[h264 @ 0x564b59400100] Reinit context to 1920x1088, pix_fmt: yuvj420p
[h264 @ 0x564b59400100] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
[h264 @ 0x564b59400100] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
[h264 @ 0x564b59400100] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
[h264 @ 0x564b59400100] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
[h264 @ 0x564b59400100] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
[h264 @ 0x564b59400100] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
[rtsp @ 0x564b593fc540] All info found
[rtsp @ 0x564b593fc540] rfps: 29.500000 0.018596
[rtsp @ 0x564b593fc540] rfps: 29.583333 0.012613
[rtsp @ 0x564b593fc540] rfps: 29.666667 0.007793
[rtsp @ 0x564b593fc540] rfps: 29.666667 0.007793
[rtsp @ 0x564b593fc540] rfps: 29.750000 0.004137
[rtsp @ 0x564b593fc540] rfps: 29.750000 0.004137
[rtsp @ 0x564b593fc540] rfps: 29.833333 0.001644
[rtsp @ 0x564b593fc540] rfps: 29.833333 0.001644
[rtsp @ 0x564b593fc540] rfps: 29.916667 0.000314
[rtsp @ 0x564b593fc540] rfps: 29.916667 0.000314
[rtsp @ 0x564b593fc540] rfps: 30.000000 0.000149
[rtsp @ 0x564b593fc540] rfps: 60.000000 0.000595
[rtsp @ 0x564b593fc540] rfps: 120.000000 0.002380
[rtsp @ 0x564b593fc540] rfps: 240.000000 0.009520
[rtsp @ 0x564b593fc540] rfps: 29.970030 0.000074
[rtsp @ 0x564b593fc540] rfps: 59.940060 0.000297
Guessed Channel Layout for Input Stream #0.1 : mono
Input #0, rtsp, from 'rtsp://login:pass@1.1.1.1:554/111':
  Metadata:
    title           : 10
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0, 28, 1/90000: Video: h264 (Baseline), 1 reference frame, yuvj420p(pc, bt709, progressive, left), 1920x1080 (1920x1088), 29.97 tbr, 90k tbn, 180k tbc
    Stream #0:1, 72, 1/8000: Audio: pcm_alaw, 8000 Hz, mono, s16, 64 kb/s
Successfully opened the file.
Parsing a group of options: output url /usr/local/nginx/html/hls/mystream%01d.ts.
Applying option map (set input stream mapping) with argument 0.
Applying option c:v (codec name) with argument copy.
Applying option c:a (codec name) with argument aac.
Applying option f (force format) with argument segment.
Successfully parsed a group of options.
Opening an output file: /usr/local/nginx/html/hls/mystream%01d.ts.
Successfully opened the file.
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (pcm_alaw (native) -> aac (native))
Press [q] to stop, [?] for help
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
detected 2 logical cores
[graph_0_in_0_1 @ 0x564b59439cc0] Setting 'time_base' to value '1/8000'
[graph_0_in_0_1 @ 0x564b59439cc0] Setting 'sample_rate' to value '8000'
[graph_0_in_0_1 @ 0x564b59439cc0] Setting 'sample_fmt' to value 's16'
[graph_0_in_0_1 @ 0x564b59439cc0] Setting 'channel_layout' to value '0x4'
[graph_0_in_0_1 @ 0x564b59439cc0] tb:1/8000 samplefmt:s16 samplerate:8000 chlayout:0x4
[format_out_0_1 @ 0x564b5943b040] Setting 'sample_fmts' to value 'fltp'
[format_out_0_1 @ 0x564b5943b040] Setting 'sample_rates' to value '96000|88200|64000|48000|44100|32000|24000|22050|16000|12000|11025|8000|7350'
[format_out_0_1 @ 0x564b5943b040] auto-inserting filter 'auto_resampler_0' between the filter 'Parsed_anull_0' and the filter 'format_out_0_1'
[AVFilterGraph @ 0x564b5941e880] query_formats: 4 queried, 6 merged, 3 already done, 0 delayed
[auto_resampler_0 @ 0x564b5957eb40] [SWR @ 0x564b59507740] Using s16p internally between filters
[auto_resampler_0 @ 0x564b5957eb40] ch:1 chl:mono fmt:s16 r:8000Hz -> ch:1 chl:mono fmt:fltp r:8000Hz
[aac @ 0x564b594200c0] Too many bits 8832.000000 > 6144 per frame requested, clamping to max
[segment @ 0x564b59403b80] Selected stream id:0 type:video
[segment @ 0x564b59403b80] Opening '/usr/local/nginx/html/hls/mystream0.ts' for writing
[file @ 0x564b59580b40] Setting default whitelist 'file,crypto'
[mpegts @ 0x564b59580480] muxrate VBR, pcr every 9000 pkts, sdt every 200, pat/pmt every 40 pkts
Output #0, segment, to '/usr/local/nginx/html/hls/mystream%01d.ts':
  Metadata:
    title           : 10
    encoder         : Lavf58.20.100
    Stream #0:0, 0, 1/90000: Video: h264 (Baseline), 1 reference frame, yuvj420p(pc, bt709, progressive, left), 1920x1080 (0x0), q=2-31, 29.97 tbr, 90k tbn, 90k tbc
    Stream #0:1, 0, 1/90000: Audio: aac (LC), 8000 Hz, mono, fltp, delay 1024, 48 kb/s
    Metadata:
      encoder         : Lavc58.35.100 aac
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[segment @ 0x564b59403b80] 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)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[segment @ 0x564b59403b80] segment:'/usr/local/nginx/html/hls/mystream0.ts' starts with packet stream:1 pts:0 pts_time:0 frame:0
[segment @ 0x564b59403b80] stream:1 start_pts_time:0 pts:0 pts_time:0 dts:0 dts_time:0 -> pts:0 pts_time:0 dts:0 dts_time:0
[segment @ 0x564b59403b80] segment:'/usr/local/nginx/html/hls/mystream0.ts' starts with packet stream:0 pts:11520 pts_time:0.128 frame:0
[segment @ 0x564b59403b80] stream:0 start_pts_time:0 pts:11520 pts_time:0.128 dts:11520 dts_time:0.128 -> pts:11520 pts_time:0.128 dts:11520 dts_time:0.128
[segment @ 0x564b59403b80] Opening '/usr/local/nginx/html/hls/mystream.m3u8.tmp' for writing
[file @ 0x564b59530900] Setting default whitelist 'file,crypto'
[segment @ 0x564b59403b80] EXT-X-MEDIA-SEQUENCE:0
[AVIOContext @ 0x564b5959f440] Statistics: 0 seeks, 1 writeouts
[segment @ 0x564b59403b80] segment:'/usr/local/nginx/html/hls/mystream0.ts' count:0 ended
[AVIOContext @ 0x564b59591140] Statistics: 0 seeks, 2 writeouts
[segment @ 0x564b59403b80] Opening '/usr/local/nginx/html/hls/mystream1.ts' for writing
[file @ 0x564b5959c900] Setting default whitelist 'file,crypto'
[mpegts @ 0x564b595a1280] muxrate VBR, pcr every 9000 pkts, sdt every 200, pat/pmt every 40 pkts
[segment @ 0x564b59403b80] segment:'/usr/local/nginx/html/hls/mystream1.ts' starts with packet stream:0 pts:191700 pts_time:2.13 frame:40

Run with -c:a aac and share full log.

Thank you for your comment Gyan. How would you like me to share it? just copy-paste it here? It generates millions of lines.

Add -t 30 to your command. It will be a short process whose log you can paste in your Q.

I copy-pasted some from that huge log in my question, Gyan.  Can you tell what's wrong there?

Let me answer my own question. My code is working fine and there was a tiny spelling mistake. Gee... silly me. However, sometimes you just have to post the question and put it all in writing in order to realize where the problem is. Now in case somebody is interested here is how the theory / syntax looks:
"-a:c copy" is to copy without transcoding when "-a:c {codec} {additional audio parameters}" is to transcode.
Now my code is streaming cross browsers perfectly well. You may want to adjust bit rates and customize it the way you see fit.
ffmpeg -rtsp_transport tcp -i rtsp://login:password@1.1.1.1:554/11 -map 0 -c:v copy -
c:a aac -f segment -segment_list /usr/local/nginx/html/hls/mystream.m3u8 -
segment_list_type hls - segment_list_size 10 -segment_list_flags +live
 /usr/local/nginx/html/hls/mystream%01d.ts


text:
How to fix Encoding Overloaded in OBS Studio?
I want to record a programming tutorial with OBS Studio in 1080p 30FPS. I have never changed the encoder, the output format is MP4. Although my computer has very good hardware, I get Encoding Overloaded after some time and the video starts getting asynchronous.
I read that the Encoding gets Overloaded when your computer can't handle the game you are playing and OBS recording, but I don't play any game, the only apps I have running are Visual Studio Code, one or two tabs of Google Chrome and OBS Studio.
What can I do?
Edit:
CPU: Intel i5-6600k
OS: Windows 10 Pro
RAM: 16GB DDR4
Video Card: PowerColor Red Devil AMD Radeon RX 480 (8GB V-RAM)
As said, I don't record games, but only have VS Code and OBS Studio running so I can't imagine that my computer is too slow.
Thanks for your help!

Encoding overloaded means that your computer isn't fast enough to encode with the settings as they are now.
There are two options: 1) Encode via hardware (intel quicksync, AMD VCE, Nvidia nvenc) or set the quality of the encode lower (as in a faster/fastest x264 preset).
Without more information (CPU, GPU, Ram, OS etc) it is difficult to know what is the best way forward.

I added the information you asked for.

source: Stack Exchange

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

sort: votes


text:
Concat overlapping videos with ffmpeg using python3
I have a number of videos that overlap in time that were downloaded from an online video stream:

0m00s  - 15m10s
14m50s - 30m20s
...

The first few seconds (usually around 20 seconds) of a video segment duplicate last few seconds of the previous segment.
I'd like to concat the video segments and form a single video file without duplicate parts. I can do it programmatically using ffmpeg libraries to find the cut points by minimizing error between a frame of the current segment and the last frame of the previous segment.
Is there a way to achieve this with an ffmpeg command?

If the files have absolute timestamps, it may be possible. But if no, it's not possible in a single command. You can run one command to find join point betweeen two consecutive segments using blend filter/blackframe and then write a concat demuxer text file with the required inpoint/outpoint

I just checked with -vf showinfo, and it seems they do not have absolute timestamps, but they do have some checksums (are these useful for finding exact duplicates?)
Thanks for the pointer on blend/blackframe - googling it.

You need to add -copyts else ffmpeg will remove any starting offset before it gets to the filter.

It seems framemd5 matching is enough for my videos. I can make framemd5 files for every video segment and fetch out dts / pts of the starting frame in every segment. Is there a way to concat with dts / pts inpoints instead of timestamps?

No, time has to be in seconds.

I found that trim filter has start_pts option, but I can't make it work with pts values extracted from framemd5 output (start with seconds works, but start_pts does not)

If someone lands here needing a "fuzzier" match than framemd5, see https://superuser.com/questions/663731/find-video-file-position-using-an-image-match

I wrote the following script to solve my problem. It uses framemd5 checksums to find the inpoints in time and then uses the concat demuxer (thanks @Gyan for the tip!).
# Usage: ffmpeg $(python3 script.py input1.mp4 input2.mp4) -y -an output.mp4

import os
import sys
import subprocess

ffmpeg_concat_echo, md5_last_frame = '', None

for video_path in map(os.path.abspath, sys.argv[1:]):
        framemd5 = subprocess.check_output(['ffmpeg', '-nostats', '-hide_banner', '-i', video_path, '-an', '-f', 'framemd5', '-c', 'copy', '-'], stderr = open(os.devnull, 'w'))
        tb_num, tb_den = 1, 1
        inpoint = 0.0
        for line in framemd5.split(b'\n'):
                if line.startswith(b'#tb'):
                        tb_num, tb_den = list(map(int, line.split()[-1].split(b'/')))
                elif line and not line.startswith(b'#'):
                        splitted = line.split(b',')
                        md5 = splitted[-1].strip()
                        pts_time = float(splitted[2]) * tb_num / tb_den
                        if md5_last_frame is not None and md5 == md5_last_frame:
                                inpoint = pts_time
        md5_last_frame = md5
        ffmpeg_concat_echo += 'echo "file {}"; echo "inpoint {}";'.format(video_path, inpoint);

print('-nostats -hide_banner -avoid_negative_ts make_zero -fflags +genpts -f concat -safe 0 -i <({}) -c copy'.format(ffmpeg_concat_echo))

Below is another version (source, archived) which supports exact PTS inpoints using concat video filter; computing inpoints using explicit frame differences.
# Usage: ffmpeg $(( echo input1.mp4; echo input2.mp4 ) | python3 concat_overlapping_video_framemd5_demuxer.py concat_file.txt) -y -an output.mp4

import os
import sys
import subprocess

ffmpeg_concat_file, md5_last_frame = open(sys.argv[1], 'w'), None
for video_path in map(os.path.abspath, list(map(str.strip, sys.stdin))):
        framemd5 = subprocess.check_output(['ffmpeg', '-nostats', '-hide_banner', '-i', video_path, '-an', '-f', 'framemd5', '-c', 'copy', '-'], stderr = open(os.devnull, 'w'))
        inpoint, tb_num, tb_den = 0, 1, 1
        for line in framemd5.split(b'\n'):
                if line.startswith(b'#tb'):
                        tb_num, tb_den = list(map(int, line.split()[-1].split(b'/')))
                elif not line.startswith(b'#') and len(line) > 0:
                        splitted = line.split(b',')
                        md5, pts_time = splitted[-1].strip(), float(splitted[2]) * tb_num / tb_den
                        if md5 == md5_last_frame:
                                inpoint = pts_time
        md5_last_frame = md5
        ffmpeg_concat_file.write('file {}\ninpoint {}\n'.format(video_path, inpoint))

print('-nostats -hide_banner -avoid_negative_ts make_zero -fflags +genpts -f concat -safe 0 -i {} -c copy'.format(sys.argv[1]))

This may result in "Non-monotonous DTS" errors. Some ways to solve:

Use concat video filter. Downsides: will re-encode
Extract streams and re-assemble them back. Downsides: will make a file copy, unless named pipes are used
Wait until this patch gets merged. Hopefully it would fix the problem

is there better version of it, gist isn't working

This worked great for stitching some security camera footage together, thank you.

The gist link is broken, could you please share the code again in a more permanent way?

Revised gist (archived), original gist (archived), revisions.

Continued from above: archived revisions.

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


text:
ffmpeg: Unknown decoder 'copy' when concatenating clips
Basically I was following https://video.stackexchange.com/a/15701/26767, which states:

This should work faster...
ffmpeg -ss 1:00 -t 5 -i in.mkv -ss 2:00 -t 5 -i in.mkv \
 -filter_complex "[0][1]concat=n=2:v=1:a=1" \
 out.mkv

Is it really working? Or how can I make it works for nowadays ffmpeg?
First, I found the command there is incorrect, as I'm getting this:
$ ffmpeg -codec copy -i inp.mp4 clip1.mp4
ffmpeg version 4.2.2-1ubuntu1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-3ubuntu1)
  configuration: --prefix=/usr --extra-version=1ubuntu1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --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-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Unknown decoder 'copy'

I found this works: ffmpeg -i inp.mp4 -codec copy clip1.mp4
Then when I want to put things together, I got Unknown decoder 'copy' again:
$ ffmpeg -i inp.mp4 -ss 1:09 -t 76 -codec copy -i inp.mp4 -ss 2:55 -codec copy -filter_complex "[0][1]concat=n=2:v=1:a=1" out.mp4
ffmpeg version 4.2.2-1ubuntu1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-3ubuntu1)
. . .
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'inp.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : 2018-03-08T18:56:55.000000Z
  Duration: 00:03:46.81, start: 0.000000, bitrate: 3137 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], 2943 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 191 kb/s (default)
    Metadata:
      creation_time   : 2018-03-08T18:57:03.000000Z
      handler_name    : IsoMedia File Produced by Google, 5-11-2011
Unknown decoder 'copy'

How can I make the 5-year-old answer works for nowadays ffmpeg without re-encoding?

Found one answer here:
Here is the exception:

To concatenate 2-part videos into one, without re-encoding:
ffmpeg -safe 0 -f concat -i <(find . -type f -name '*.mp4' -printf "file '$PWD/%p'\n" | sort) -c copy output.mkv
or,
ffmpeg -i "concat:File1.mp4|File2.mp4" -c:v copy -c:a copy -codec copy .output.mp4

To concatenate 2-part videos into one, with encoding:
ffmpeg -i 01.mp4 -i 02.mp4 -filter_complex "[0:v] [0:a] [1:v] [1:a] concat=n=2:v=1:a=1 [v] [a]" -map "[v]" -map "[a]" -c:v libvpx-vp9 -b:v 0 -crf 43.8 -c:a libopus -b:a 64k -c:s copy out.mkv

Refer to the original url for updates.

You should put -i in.mkv  for the first place.
Please try
ffmpeg -i in.mkv -ss 1:00 -t 5 -ss 2:00 -t 5

I think your code have multiple "-i in.mkv" parts.
Remove all but one "-i
Edit:
Then I think the easiest way is :
ffmpeg -i in.mkv -ss 1:00 -t 5 -c copy clip1.mkv
ffmpeg -i in.mkv -ss 2:00 -t 5 -c copy clip2.mkv
echo file clip1.mkv >> mylist.txt
echo file clip2.mkv >> mylist.txt
ffmpeg -f concat -i mylist.txt -c copy out.mkv
rm mylist.txt

Just make two clips from the original video "in.mkv" and just concat them in the usual ffmpeg concat way.

Thanks for the input, Tom. Please note the phrase "when concatenating clips" in the title -- the multiple "-i in.mkv" parts is just for that, as I tried yours but only single clip is cut, not both. Try it yourself, and you'll know. Thanks for the input anyway, and welcome aboard.


text:
FFMPEG add image at beginning of MP4 as first frame
I need to add an image (1 frame maybe) for one millisecond at the start of the mp4 video.
The final video should contain audio in the AAC system.
I expect no delay in the audio while the video plays. I would like to have silence at first for one millisecond to avoid lagging video.

OS: Linux/Debian

Edit:
I converted the first image to an mp4 video with ffmpeg -i <static_picture.jpg> -c:v libx264 -s 256x144 -r 30 -t 0.03 -pix_fmt yuv420p image.mp4
I merged the two videos by concat demuxer but the video submitted has no sound.
The result of ffprobe -hide_banner -i Video.mp4 is:
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Video.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.20.100
  Duration: 00:03:52.40, start: 0.000000, bitrate: 96 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 256x144 [SAR 1:1 DAR 16:9], 94 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
    Metadata:
      handler_name    : VideoHandler

I am not sure I understand your question correctly but you can extract the video and audio stream, format them the way you want and then re-multiplex them all with ffmpeg.
ffmpeg -i input.mp4 -c:v copy -an video_only.mp4

The -an option is disabling the audio -c:v copy is copying your video stream to video_only.mp4.
ffmpeg -i input.mp4 -c:a copy -vn audio_only.mp4

Here you do the same but for the audio.
Please note that 1 frame is different than 1 millisecond. The duration of your frame depends on the frame rate but usually is between 16,(6)ms for 60fps (1/60) content and 41,(6)ms for 24fps (1/24) You can have 1ms frame only if your video is 1000fps which I really doubt it is. The audio, on the other hand, has a normally 44100Hz or 48000Hz sampling rate, which means that the minimum sample duration with 48KHz is 2.08(3)E-5 seconds.
When you are done you can multiplex the new video and new audio together by:
ffmpeg -i new_video.mp4 -i new_audio.mp4 -c copy audio_and_video.mp4

In order for this to work you need to have the same duration of both input streams though.
You can also concatenate a static picture to the video file. You can create your image.mp4 file with:
ffmpeg -i <static_picture.jpg> -c:v libx264 -s 1920x1080 -r 50 -t 0.02 -pix_fmt yuv420p image.mp4

This will create an image.mp4 video with a duration of 20 ms (1-frame) with a frame rate of 50, encoded with libx264 and resolution 1920x1080 using pixel format YUV420p which you most likely need.
Then you can concatenate both files by:
ffmpeg -i "concat:image.mp4|original_video.mp4" -c copy output.mp4

Make sure that the frame rate, resolution and pixel format of the image.mp4 and original_video.mp4 match otherwise it won't work.
[EDIT 17.11.2019] Apparently in your case you need to use the concat filter which also will require re-encoding of the audio and video. So the commands are the following:
ffmpeg -i <static_picture.jpg> -f lavfi -i anullsrc -c:v libx264 -s 256x144 -r 25 -t 0.04 -pix_fmt yuv420p -c:a aac -ac 2 -ar 44100 -shortest <image.mp4>

This command will create one frame long video with an empty audio stream, presuming that the second video is having 25fps. Please note that in your question the ffmpeg output of your input file is 25fps (tbr) and not 30fps, as you have presumed. I am also setting the number of channels to two: -ac 2 and the sample rate to 44.1KHz. The number of channels and the sample rate should match between both videos. More information about the anullsrc can be found here: https://trac.ffmpeg.org/wiki/Null
Then you can concatenate and encode the video with the following command:
ffmpeg -i <image.mp4> -i <second_video.mp4> -filter_complex "[0:v:0][0:a:0][1:v:0][1:a:0]concat=2:v=1:a=1[v][a]" -c:v libx264 -b:v 100k -map "[v]" -map "[a]" <output.mp4>

Here I am taking both the video and audio streams from both video files and I am merging them to the output file and setting the video encoding bitrate to 100Kbps, the bitrate of your original video is 96Kbps and I have let ffmpeg decide how to encode the audio. You can change that if you want by defining codec, number of channels, sample rate. More information about the concat filter could be found here: https://trac.ffmpeg.org/wiki/Concatenate

"Make sure that the frame rate, resolution and pixel format match" How do I do this for a low-quality video 140p and a 30fps? Can you give an example of pixel format?
I think all I need to do is to convert pic.png to pic.mp4 then concatinate it with the video, right?

The concat protocol is not recommended for MP4 (the second video will likely not play). Use the concat demuxer instead.

@YoussofH. It is not trivial, but it is possible (disregarding any possible issues from such a short duration requirement). You need to match all of the attributes. Updating your question with the complete log of ffmpeg -i input will show the information needed to provide an answer for rote usage.

As @llogan said the concat protocol is not the solution here. Although I tried 3 different concatinations from a previos post but none worked although when I used demuxer the videos were merged but had no sound sadly. Any hints?

please post your whole line in the main topic as well as the output of ffprobe -hide_banner -i <output.mp4> where `<output.mp4> is the name of your merged file.

Did you check my edit? If not please do.

Please check the edit in my original answer to see the commands for concatenating both files. I have tested it on my machine and it works well.


text:
How to concatenate multiple videos while maintaining original aspect ratio?
Is it possible to concatenate many videos with different aspect ratio? So in the end every video segment maintains the original aspect ratio.
I've tried the following FFmpeg command:
ffmpeg -i 1.mp4 -i 2.mp4 -y -filter_complex "[0:v:0] [0:a:0] [1:v:0] [1:a:0] concat=unsafe=1:n=2:v=1:a=1 [v] [a]" -map "[v]" -map "[a]" out.mp4

I'm using unsafe=1 which works almost perfect.
The only issue is that some videos stretch.
So, how can I concatenate different videos while maintaining the original quality and aspect ratio?
Bonus: Is something wrong with using unsafe=1?. The param name 'unsafe' implies that maybe I should trust it only under certain conditions.
UPDATE

I tried @llogan answer but it still produces the same result.
Command I tried is
 ffmpeg -i 1.mp4 -i 2.mp4 -filter_complex "[0]scale=720:576:force_original_aspect_ratio=decrease,pad=720:576:(ow-iw)/2:(oh-ih)/2,setsar=1[v0];[1]scale=720:576:force_original_aspect_ratio=decrease,pad=720:576:(ow-iw)/2:(oh-ih)/2,setsar=1[v1];[v0][0:a:0][v1][1:a:0]concat=n=2:v=1:a=1[v][a]" -map "[v]" -map "[a]" out.mp4

Complete log:
ffmpeg version N-94862-g944d76a3e0 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9.1.1 (GCC) 20190807
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
  libavutil      56. 35.100 / 56. 35.100
  libavcodec     58. 56.101 / 58. 56.101
  libavformat    58. 32.104 / 58. 32.104
  libavdevice    58.  9.100 / 58.  9.100
  libavfilter     7. 58.102 /  7. 58.102
  libswscale      5.  6.100 /  5.  6.100
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000028a5a96a180] st: 0 edit list: 2 Missing key frame while searching for timestamp: 0
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000028a5a96a180] st: 0 edit list 2 Cannot find an index entry before timestamp: 0.
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    creation_time   : 2019-06-04T10:36:32.000000Z
  Duration: 00:01:47.31, start: 0.080000, bitrate: 1354 kb/s
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 720x576 [SAR 64:45 DAR 16:9], 1194 kb/s, 24.96 fps, 25 tbr, 1k tbn, 20000k tbc (default)
    Metadata:
      creation_time   : 2019-06-04T10:36:32.000000Z
      handler_name    : FOUNDATION MEDIA HANDLER
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 152 kb/s (default)
    Metadata:
      creation_time   : 2019-06-04T10:36:32.000000Z
      handler_name    : FOUNDATION MEDIA HANDLER
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '2.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    title           : 914153178930195
    encoder         : Lavf56.40.101
  Duration: 00:00:54.73, start: 0.000000, bitrate: 155 kb/s
    Stream #1:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 224x400 [SAR 190:189 DAR 76:135], 120 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #1:1(und): Audio: aac (HE-AACv2) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 31 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
File 'out.mp4' already exists. Overwrite ? [y/N] y
Stream mapping:
  Stream #0:0 (h264) -> scale
  Stream #0:1 (aac) -> concat:in0:a0
  Stream #1:0 (h264) -> scale
  Stream #1:1 (aac) -> concat:in1:a0
  concat:out:v0 -> Stream #0:0 (libx264)
  concat:out:a0 -> Stream #0:1 (aac)
Press [q] to stop, [?] for help
[swscaler @ 0000028a5bd91600] Warning: data is not aligned! This can lead to a speed loss
[libx264 @ 0000028a5aa1e600] using SAR=1/1
[libx264 @ 0000028a5aa1e600] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0000028a5aa1e600] profile High, level 3.0, 4:2:0, 8-bit
[libx264 @ 0000028a5aa1e600] 264 - core 158 r2984 3759fcb - H.264/MPEG-4 AVC codec - Copyleft 2003-2019 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 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 'out.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.32.104
    Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p(progressive), 720x576 [SAR 1:1 DAR 5:4], q=-1--1, 25 fps, 12800 tbn, 25 tbc (default)
    Metadata:
      encoder         : Lavc58.56.101 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
    Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      encoder         : Lavc58.56.101 aac
frame= 4043 fps=127 q=-1.0 Lsize=   17387kB time=00:02:41.78 bitrate= 880.4kbits/s speed= 5.1x
video:14740kB audio:2512kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.781354%
[libx264 @ 0000028a5aa1e600] frame I:27    Avg QP:19.86  size: 31123
[libx264 @ 0000028a5aa1e600] frame P:1424  Avg QP:23.10  size:  7119
[libx264 @ 0000028a5aa1e600] frame B:2592  Avg QP:26.01  size:  1588
[libx264 @ 0000028a5aa1e600] consecutive B-frames:  4.5% 24.6% 16.2% 54.7%
[libx264 @ 0000028a5aa1e600] mb I  I16..4: 14.8% 42.4% 42.7%
[libx264 @ 0000028a5aa1e600] mb P  I16..4:  2.2%  3.8%  1.7%  P16..4: 32.9% 13.8%  6.4%  0.0%  0.0%    skip:39.0%
[libx264 @ 0000028a5aa1e600] mb B  I16..4:  0.2%  0.2%  0.1%  B16..8: 28.5%  4.3%  0.7%  direct: 1.1%  skip:65.0%  L0:40.5% L1:53.2% BI: 6.3%
[libx264 @ 0000028a5aa1e600] 8x8 transform intra:47.2% inter:58.6%
[libx264 @ 0000028a5aa1e600] coded y,uvDC,uvAC intra: 46.9% 56.9% 18.1% inter: 9.6% 11.2% 0.3%
[libx264 @ 0000028a5aa1e600] i16 v,h,dc,p: 47% 29%  9% 16%
[libx264 @ 0000028a5aa1e600] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 28% 18% 28%  4%  4%  5%  4%  5%  4%
[libx264 @ 0000028a5aa1e600] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 37% 19% 11%  5%  6%  8%  5%  7%  4%
[libx264 @ 0000028a5aa1e600] i8c dc,h,v,p: 50% 21% 24%  5%
[libx264 @ 0000028a5aa1e600] Weighted P-Frames: Y:2.3% UV:0.6%
[libx264 @ 0000028a5aa1e600] ref P L0: 67.3% 16.4% 11.9%  4.4%  0.1%
[libx264 @ 0000028a5aa1e600] ref B L0: 89.6%  9.0%  1.4%
[libx264 @ 0000028a5aa1e600] ref B L1: 98.6%  1.4%
[libx264 @ 0000028a5aa1e600] kb/s:746.65
[aac @ 0000028a5a9a1e00] Qavg: 1320.561

how can I concatenate different videos while maintaining the original quality and aspect ratio?

using concat demuxer
Make text file containing:
file '1.mp4'
file '2.mp4'

Run ffmpeg:
ffmpeg -f concat -i input.txt -c copy output.mp4

This is fast and does not re-encode, so it will maintain the original quality, but it may not be supported or play correctly by your player or device. This assumes both inputs have the same formats, number of streams, timebase, etc, and the only difference is width x height and duration.
using concat filter
Use this if the first method doesn't work or if you have to re-encode anyway.
Add the scale, pad, setsar filters, and choose the desired output width x height. Example for 1280x720:
ffmpeg -i 1.mp4 -i 2.mp4 -filter_complex "[0]scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:(ow-iw)/2:(oh-ih)/2,setsar=1[v0];[1]scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:(ow-iw)/2:(oh-ih)/2,setsar=1[v1];[v0][0:a:0][v1][1:a:0]concat=n=2:v=1:a=1[v][a]" -map "[v]" -map "[a]" out.mp4

If you would rather crop instead of pad and/or avoid upscaling see examples in Resizing videos with ffmpeg to fit specific size.
As for "original quality" you would have to use a lossless encoder, not a lossy encoder. Add -crf 0 to enable lossless when encoding with libx264, but note the files will be huge. If you mean "visually, but not technically lossless" then use -crf 18. See FFmpeg Wiki: H.264.
unsafe

Is something wrong with using unsafe=1?. The param name 'unsafe' implies that maybe I should trust it only under certain conditions.

Without unsafe it will fail if segments have a different format or vary in some attributes, but with unsafe it will not fail but the resulting output may not be compatible or playable with your player or device.

Video still stretches. Small aspect ratio works fine but videos with big aspect ratios stretch. The result is the same as with the command of the question(unsafe=1). I'm thinking maybe if small aspect ratio adds padding, maybe that would work.

@Antony Provide your command and the complete log.

Updated my question

@Antony I was lazy and assumed square pixels. Try "[0]scale=iw*sar:ih,setsar=1[ref];[1][ref]scale2ref=w=oh*mdar:h=ih[s][v0];[s]pad=1024:576:(ow-iw)/2:(oh-ih)/2,setsar=1[v1];[v0][0:a:0][v1][1:a:0]concat=n=2:v=1:a=1[v][a]" It can be also done without needing to enter any WxH values, but that can be dealt with later.

Works! Please update your answer so I can accept it. If WxH values could be skipped that would be useful. Also, can you please explain the pad=1024:576 part?

How can I remove WxH values? It's really important to make it more dynamic.

@Antony See the scale2ref filter.

FFmpeg documentation is very poor. There are other questions too without proper answers(https://stackoverflow.com/questions/45361936/ffmpeg-scale2ref-explanation). Please if you can help.

Please @llogan if you can I really need help.

@Antony I don't recall what I was going to suggest. pad values will be the same result as the scale filter. So in a variable outside of the command do iw*sar of the first input and dump that into pad.

I understand what you mean. This works good for 2 videos for concatenating videos. I'm trying to concatenate multiple videos. Do you know any way to do this? Either by scaling videos one by one or scale & concatenate all at once.

@Antony You can do it all in one command.


text:
How to speed up the process using VLC and Adobe Premiere for video compilations
I need help finding a way to speed up the process creating videos compilations using VLC and Adobe Premiere.
I have a folder with 100 videos, I'll watch the videos using VLC and I'll choose 20 of those videos to use on Adobe Premiere to create a compilation.
I tried creating a VLC playlist with those 20 videos but Premiere doesn't open the playlists.
How can I open those 20 videos out of 100 on Premiere not having to do it manually?
I have to create video compilations daily so I need to find a way to speed up the process.

I think you can sort videos only in folders, then import sorted folders to premiere.
Maybe you can open playlist in video player, select all videos and copy/paste them all to new folder.
Also you can import all videos in Premiere Pro, then open folder by double-click on project panel and switch to preview mode. Then you can move mouse over clips, watch them and sort to new folder or just delete unwanted materials.

Also you can put In/Out points in video and put them all on timeline at once with needed fragments.
You can show me screencast what how do do you do it now and I will try to show how it can be in Premiere Pro with the same speed. If it can be :)

Thank you! That was very helpful.

Why not import the folder into PP and watch and sort them in PP? After all that is the whole purpose of the application.
As you watch them you add the ones you want to the end of a timeline (hit the . key). This is called an assembly edit. Then you can trim your selected clips later.

I don't watch the videos completely, just the first 5-10 seconds of each video. I can do it pretty fast using VLC and hotkeys, 'n' and 'space' but it's a lot of mouse clicks to do the same thing on Premiere. I save time importing all the videos directly to Premiere but it takes more time to watch them.


text:
FFmpeg does not preserve colors after resizing
I would like to resize a 4K mkv video to 1920×1080 with ffmpeg version 3.4.6-0ubuntu0.18.04.1 on Ubuntu 18.04. The original file has the following features:
Input #0, matroska,webm
encoder         : libebml v1.3.9 + libmatroska v1.5.2
Stream #0:0(eng): Video: hevc (Main 10), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x2160 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 23.98 tbc (default)

This version of FFmpeg may not support x265. I compiled a new version from the current Git repository, explicitly enabling x265. Now, ffmpeg -hide_banner -pix_fmts has, in its output:
FLAGS NAME            NB_COMPONENTS BITS_PER_PIXEL
-----
IO... yuv420p10le            3            15

This format should now be supported both for encoding and for decoding. I tried:
ffmpeg -i original_file.mkv -c:v libx265 -pix_fmt + -vf scale=1920:1080 -colorspace bt709 -c:a copy test_output.mkv

This produces:
Input #0, matroska,webm, from 'test_output.mkv':
  Metadata:
    ENCODER         : Lavf58.35.100
    Stream #0:0(eng): Video: hevc (Main 10), yuv420p10le(tv, bt709/unknown/unknown), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 23.98 tbc (default)

So, it is apparently ok. However, test_output.mkv colors still seem to be half the intensity of the original one, as if a grey layer was overlapped to the 4K video. I opened the file with both vlc and mpv, with no difference.

How to preserve the original colors as much as possible?
If it is possible, I would also like to lower the bitrate, but my attempt
ffmpeg -i original_file.mkv -s 1920x1080 -b 1700 output.mkv

produced a solid grey-only video with some moving squares.

I always get this message:
[matroska,webm @ 0x55a5507ad100] Could not find codec parameters for stream 1 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options

FFmpeg built from source has the following configuration:
ffmpeg version N-95768-gd831edc387 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 7 (Ubuntu 7.4.0-1ubuntu1~18.04.1)
configuration: --enable-gpl --enable-libx264 --enable-libx265
libavutil      56. 36.100 / 56. 36.100
libavcodec     58. 62.100 / 58. 62.100
libavformat    58. 35.100 / 58. 35.100
libavdevice    58.  9.101 / 58.  9.101
libavfilter     7. 66.100 /  7. 66.100
libswscale      5.  6.100 /  5.  6.100
libswresample   3.  6.100 /  3.  6.100
libpostproc    55.  6.100 / 55.  6.100

Ad 1:
Try adding the -pix_fmt yuv420p10le option (e.g. before -vf). Or only -pix_fmt + for using the same pixel format as the input video has.
If it doesn't help, you obviously have an inappropriate, albeit more common FFmpeg version — only for 8-bit colors. (Your original video uses 10-bit colors, and FFmpeg will try use the best 8-bit pixel format in this case — with the colors' degradation, of course.)
FFmpeg may be built for 8-bit colors or for 10-bit colors, or — in recent time —  for both of them (for your HEVC encoded video).
So you need to build (or obtain by other way) version for 8-/10- or 10-bit color depth.
Ad 2:
Bitrate of 1700 is very low — only 1700 bits per second, i. e. about 212 bytes per second.
To reach such a low bitrate and at the same time reach your 23.98 frames per second, the encoder is limited with  average size for 1 frame about 212 / 24 = 9 bytes only!
Did you see a picture of such small memory? It has almost no information, so the gray image.
You probably wanted 1700k (Kilobits per second) — or, more probably — 170k:
-b:v 170k

so correct your command in this way.

Addendum to Ad 1:
You use the (default) 4:2:0 chroma subsampling (with inevitable color and contrast degradation).
Try the maximum quality, i.e. 4:4:4 (no subsampling), or — if it will be sufficient for you — 4:2:2.
To reach this, use -pix_fmt yuv444p10le and change the video profile to main444-10 (with option -profile:v main444-10).

Thank you for all the very useful explanations. I tried with a compiled-from-source (with x265 enabled) version of FFmpeg and also with a packaged newer version. Even using (in both cases) -pix_fmt yuv420p10le, the problem is the same. Check out the error message I added in the question, if it is useful. Moreover, FFmpeg creates an x264 output by default; how to preserve the original HEVC instead?

Use ffmpeg -hide_banner -pix_fmts to see if you have yuv420p10le pixel format in your build. If not, you build doesn't support 10-bit color depth. Add -c:v libx265 to your commands for obtaining HEVC output. The error message appended into your question has nothing with your problems.

I am aware that this is very tricky. Anyway, you will find all the procedure I followed (and its results) in my updated question. The problem is still there, regardless of the output file using yuv420p10le format.

Try adding the option -color_range pc (for full color range 0 to 255 instead of 16 to 235 for TV).

Your input has a set of non-standard color parameters (bt2020nc/bt2020/smpte2084). Use the colorspace filter to convert to standard bt709. Color range is not relevant here, and low bitrates will degrade image color, but not the primary factor in this case.

@MarianD Unfortunately -color_range pc doesn't change the result.

@Gyan I edited the question with this new attempt. The video is still with "wrong" colors. However, note the tv, bt709/unknown/unknown in the output. Maybe also colormatrix and something else must be modified? I tried to add the option -colormatrix bt709, but this causes an error: Unrecognized option 'colormatrix'..

The colorspace filter, not the option.

@Gyan Ok. I hope the syntax is correct: using -vf "scale=1920:1080, colorspace=bt709" produces an error: [Parsed_colorspace_1 @ 0x560001239540] Unsupported input transfer characteristics 16 (smpte2084) Error while filtering: Invalid argument Failed to inject frame into filter network: Invalid argument Error while processing the decoded data for stream #0:0. The same even if I use only -vf colorspace=bt709.

I'll attend to this tomorrow.

See the update of my answer (Addendum to Ad 1).

What should I do when someone answers my question?

There is already a solution here. But I will try to summarize it in brief.
You need to specify the correct flags for color properties of the original file. Your original file (as probably many other files) has these properties: yuv420p10le(tv, bt2020nc/bt2020/smpte2084). So you need to add the following arguments respectively: -pix_fmt, -color_range, -colorspace, -color_primaries, and -color_trc. The last four are just flags (those in parenteses), so if you encoded the file already, you do not need to do it again, just add the correct flags. Your arguments then should look like this:
-c:v libx265
-pix_fmt +
-color_range tv
-colorspace bt2020nc
-color_primaries bt2020
-color_trc smpte2084
-vf scale=1920:1080

As mentioned elsewhere, the color format property -pix_fmt with value + means "use the same pixel format", but you can specify it manually: -pix_fmt yuv420p10le.


text:
Youtube video is encoded incorrectly and looks like its in 3d
I am not promoting this video, I really do need help.
I was sent here for help from superuser. Please nicely let me know if this is also the wrong community.
My youtube video is uploaded several years ago. The video appears correctly When i view it in the editor. However when viewed from any web viewer like a computer or a phone it is all encoded incorrectly. It looks like the red and green color are encoded at different times.
Please let me know who to ask or how to get the video re-encoded by youtube.
The video is

EDIT: output ffmpeg -hide_banner -i /home/USER/Desktop/VID_20120415_132324.3gp'
  Metadata:
    major_brand     : 3gp4
    minor_version   : 768
    compatible_brands: 3gp4mp413gp6
    creation_time   : 2012-04-15T18:23:35.000000Z
    copyright       :
    copyright-eng   :
    rating          : 0
    location-eng    : +00.0000+000.0000/��
    location        : +00.0000+000.0000/��
  Duration: 00:00:47.06, start: 0.000000, bitrate: 1805 kb/s
    Stream #0:0(eng): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 640x480 [SAR 1:1 DAR 4:3], 1791 kb/s, 17.51 fps, 17.67 tbr, 1k tbn, 60 tbc (default)
    Metadata:
      creation_time   : 2012-04-15T18:23:35.000000Z
      handler_name    : VideoHandler
    Stream #0:1(eng): Audio: amr_nb (samr / 0x726D6173), 8000 Hz, mono, flt, 12 kb/s (default)
    Metadata:
      creation_time   : 2012-04-15T18:23:35.000000Z
      handler_name    : SoundHandler

did you try to convert the 3gp to another format and use H.264 codec or VP-9. Can you also post the output of ffmpeg -hide_banner -i VID_20120415_132324.3gp so that we can see the color space of the input file? If you happen to have mediainfo.

for some reason, Youtube seems to think that your video is 3D and if you change to 2d all the colors are OK. I guess you can change those settings at the time of upload, but again, I have never uploaded any videos on Youtube.

No, the video came off my iphone as a 3gp. See the output above.

Hmm, apart of the frame rate, which seems to be inconsistent, I don't see any other problem with this video. My guess is to just try to transcode it with ffmpeg before uploading it to youtube. The easiest will be just to use: ffmpeg -i /home/USER/Desktop/VID_20120415_132324.3gp -c:v libx264 -b:v 1800k -c:a copy output.mp4 and then you can upload output.mp4 to Youtube. If you want you can also upload your original file somewhere on the web and I can take a look at it.

Oh, and by the way, you can also transcode the audio to some other format and perhaps change it from mono to stereo. If you need help with the command, let me know.


text:
How to improve quality of .3gp video
I have a short (~1:13) clip in .3gp format that is effectively useless for my purposes as is, as it is 176x144, and my final output will be 1280x720.
My first try was After Effects' Distort>Detail Preserving Upscale but at 700% upscaled (to closely match target render size), the footage is still terribly pixelated.
This video contains footage for, and is intended to be used as one of several assets for an upcoming promo video for my church.
I will be working in AE 2020, and Premiere 2020, to produce the final promo.
The question: Is there an effective way within either AE or Premiere to make a .3gp or very low resolution video useful at 720p?

Also helpful contextually perhaps, as this is for church production, this is baptism footage, so quality is paramount.

The problem is you don't have resolution for 700% upscale. ~~And aren't likely to find it in those tools~~ (strike that).
You can or may have already tried Video Enhancer. They claim to use Super Resolution to get the upscale possible. It doesn't suit all video sources. They have an AE plugin too.
If none of your searches for auto upscaling work then my recommendation is scale & interpolate as high as you can accept the results, then apply a blurred background of the footage (like you see when online portrait orientation videos are broadcast on TV. Centre your footage so you have the video playing with the blurred background around 4 sides. see How to Edit Vertical Video Footage YouTube video for the effect.
Alternatively if the church still looks the same, create a sort of picture-in-picture. Shoot a wide 1280x720 video of the empty space matching the original footage camera moves as closely as possible. Drop your upscaled original footage in the middle. You may need to blur this background plate a bit. So if the original video upscales to only 352x288 that's the middle 40% of your frame (vertically).
If you have enough pans and tilts that show larger parts of the baptism space, I've seen reconstructed and enhanced super-8 footage that turned the footage into panorama-like canvases by stitching together individual frames and then assuming those backgrounds did not change. I have no idea how to do that. But it uses software like Hugin to find common parts of a frame to stitch photos together. Then a morph is applied to the outer parts of the frame when the camera moves. The morph is less jarring if you split the 1280x720 frame into 12 or 16 subframes and just morph each of those sections. Note it doesn't look realistic, it takes a bit of time to work out why the moving images look "wrong", but it gives an illusion of movement.
A final suggestion is to build a virtual interior of the church, so skin the walls, (and statues and stained glass) and run your upscaled old footage in the middle of this virtual space. Render the output. This is a VFX plate shot that AE can do.

In this case, the only way to improve the quality of a video for your church is to film it again.
If you want to make a promo video, invest some time in preparing the assets, having a cameraman for this task.
You do not need an expensive camera, almost any smartphone will film at full HD.
If you still want to use this clip, use some creative ways. Put it on a small frame as part of a bigger collage, add some "vintage" effects on it, like putting it black and white, or something.
If it is one for historical reasons, put a clear stamp on it indicating the original footage is from xxxx year.
But do not expect any algorithm to discover the information that is not present at the original video. A 200%-300% enlargement is viable.


text:
FFmpeg: Video with crossfade and move up / down effects keeps the first image height
I'm creating a video using 4 images. The image sizes are following:
1st, 2nd and 3rd images sizes are 1280x1600. And the last image sizes are 1280x1280
ffmpeg -y -r 25 \
-loop 1 -t 5 -i 1.jpg \
-loop 1 -t 5 -i 2.jpg \
-loop 1 -t 5 -i 3.jpg \
-loop 1 -t 5 -i 4.jpg \
-i audio.mp3 \
-filter_complex \
"[0]crop=1280:1280:ow:((ih-oh)/5)*t[f0]; \
[1]crop=1280:1280:ow:(ih-oh)-((ih-oh)*t/5),format=yuva444p,fade=d=1:t=in:alpha=1,setpts=PTS-STARTPTS+4/TB[f1]; \
[2]crop=1280:1280:ow:((ih-oh)/5)*t,format=yuva444p,fade=d=1:t=in:alpha=1,setpts=PTS-STARTPTS+8/TB[f2]; \
[3]format=yuva444p,fade=d=1:t=in:alpha=1,setpts=PTS-STARTPTS+12/TB[f3]; \
[0][f0]overlay[bg1];[bg1][f1]overlay[bg2];[bg2][f2]overlay[bg3];[bg3][f3]overlay,format=yuv420p[v]" \
-map "[v]" -map 4:a -b:v 4000k -movflags +faststart -t 20 -s 1280x1280 out.mp4

So, the problem is that it seems it's keeping the first image's sizes for the whole video and the move up / down animations are being done in the red section in the above image. It keeps the first image like a background ( even I set the -s 1280x1280 for the video )
Note: This issue appears when I merged Crossfade effect with the Move Up / Down. When it was only with the Move Up / Down effect, the Crop was worked correctly without any unnecessary section at the bottom
When I'm changing the first image with the 1280x1280 sizes, it looks good and without unnecessary section at the bottom
EDIT
The correct answer to this question you can find here


text:
Extract audio from video preserving audio quality
I need to extract sound from videos. There must be know loss of quality (since the sound files will be used in speech-to-text services).
So I want to extract the audio from the video exactly as it is and then place it in a new container to create an audio file.
What tools are available for this? Can VLC do it? Some online service?

EDIT: Please notice that I want to extract the sound exactly as it is from the video (so I do not loss quality).
And I tested this with the GUI version of VLC, but I did not see any way to do what I want there. However I just found this page that says you can do it from the command line with VLC:
VLC HowTo/Extract audio
Since I am not going to do this myself, but tell my users how to do it I am looking for an easy way for them. (They are not programmers. But I am. So I can perhaps write a version myself with ffmpeg, but I want to avoid that if I can.)
Is this perhaps not the right group to ask this question in?

If you aren't adverse to using a terminal to extract it, FFmpeg is a very good tool that you can use. The command that you'd want to run in ffmpeg -i [input file name here] -c:a copy -vn -sn [output file name here].
-c:a copy: This argument copies the audio stream of the file.
-vn: This argument informs FFmpeg to not account for any video streams.
-sn: This argument informs FFmpeg to not account for any subtitle streams.
Altogether, this results in a lossless extraction of the audio stream from the video file. If you have some knowledge in making scripts, you could create a script that will perform this action for a set of files so that you don't need to do it manually.

Thanks, yes I saw that solution (after posting the question). Since I am not going to use it myself I was looking for a more userfriendly way. But maybe this is the best. It is not clear to me yet how to do the encapsulation. This is not included in this script.

@Leo The most userfriendly way to do this is to get FFmpeg Batch AV Converter. It takes a bit of setting up, but it's mostly self-explanatory for the purpose since all you need to do is just plug in the parameters, specify your output, and you're good to go.

Thanks, I have never heard of that. I will take a look!

When using sound for speech-to-text, the quality is actually not very important. You can extract audio using ffmpeg, After Effects, Premiere, Nuke, Resolve or any editing software you like. Load in the clip, export again but as a .wav. Boom, you have only the sound.

Thanks for trying to help. But Google says they want very good quality on the sound for best result. And I did some tests before posting this question. Using VLC to extract audio and then uploading the sound file to Google speech-to-text I got much worse result than the auto-generated captions on YouTube for the same video.

Did the sound you extracted using VLC sound audibly worse than the original?

I did not notice any difference.

MPEG Streamclip can save audio track (or batch) without recompression.


text:
Trying to reveal a logo gradually
I am trying to overlay a logo on a video, and reveal it gradually. I used the following command:
$ ffmpeg -i uploads/vid1.mp4 -loop 1 -r 25 -pix_fmt yuva420p -i logo.png -filter_complex "[1]drawbox=x=0:color=black:w=in_w*if(lt(t\,2)\,(2-t)/2\,0.01):thickness=fill:replace=1[L1];[0][L1]overlay=eof_action=endall" vidout.mp4

$ ffmpeg -version
ffmpeg version 4.1.3-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2019 the FFmpeg developers
...

As far as I understand, drawbox should have timeline support:
$ ffmpeg -filters|grep drawbox
....
 T.. drawbox           V->V       Draw a colored box on the input video.

Instead of revealing the logo gradually, it displays the full logo immediately. How can I reveal the logo gradually?

drawbox does not have animation support.

Thanks for the reply, @Gyan. What can I use to animate a logo on a video?


text:
Are "mp2v" and "mpgv" valid MPEG-2 codec tags in an MOV?
This question is related to What is the correct MPEG-2 FourCC? and to an open discussion currently on the ffmpeg-user mailing list:

I am wondering if I should file a bug report about the MOV output. Open
questions in that vein, though, are:
...

Is it a bug that mpg2 and mpgv cause MOV output to fail or is that
correct behavior?

There seem to be numerous possible tags in use for MPEG-2 video, in particular m2v1, mp2v, mpg2, and mpgv.
Now, ffmpeg fails with e.g. "Tag mpgv/0x7667706d incompatible with
output codec id '2' (m2v1)" when the output is MOV and either mpg2 or mpgv is specified:
ffmpeg ... -vcodec mpeg2video -f mov ...             # succeeds (m1v1)
ffmpeg ... -vcodec mpeg2video -vtag mp2v -f mov ...  # succeeds
ffmpeg ... -vcodec mpeg2video -vtag mpg2 -f mov ...  # fails
ffmpeg ... -vcodec mpeg2video -vtag mpgv -f mov ...  # fails

All of those succeed for AVI. Ffmpeg's default tag for MPEG-2 in AVIs is mpg2.
Part of a bug report that I am writing for ffmpeg's MOV output handling may include the mpg2 and mpgv failure behavior (with the desired behavior being success), but before I do that I need to be certain that this behavior is a bug rather than appropriate behavior.
So my question boils down to this: Are mpg2 and mpgv valid, allowable alternative tags for MPEG-2 video in an MOV file, and are there others? I am looking for official Apple sources and MOV specifications rather than anecdotal evidence or lists of generally observed FourCC's / codec IDs.
I know that, at least according to Wikipedia, MPEG-2 video in an MOV is an acceptable combination, I'm just not sure what the acceptable set of codec tags are in MOVs. This question is not about the "correct" MPEG-2 ID in general cases, it is about the allowable variants specifically in MOVs.

MPEG-2 doesn't seem to be an officially sanctioned codec for the Quicktime container. The official specification has a section related to MPEG-1 in MOV but not MPEG-2. The US Library of Congress also does not have an entry for the subtype MPEG-2 in MOV, like it does for MPEG-1 (just called QTV_MPEG).
So, there's no official word on "allowable alternative tags". One can only examine MPEG-2 MOVs and see whether apps, specifically, Apple apps, play them or not and prepare a survey report. Since each app has its own fiat on whether it plays a file with a certain codec ID or not, that report whould be categorized by app i.e. VLC, Quicktime player. FCP..etc.
As an example, VLC recognizes the following tags for generic MPEG-2 i.e. not IMX or XDCAM:
    A("mpeg"),
    A("mp2v"),
    A("MPEG"),
    A("mpg2"),
    A("MPG2"),
    A("H262"),

Thanks. I knew it wouldn't be easy. In the document you linked to it says "Table 4-1 shows some of the formats supported. The list is not exhaustive, and is subject to addition." So while it doesn't define MPEG-2, it doesn't make it simple by explicitly disallowing it either. Further, I'm sure Apple software actually has been using it for some time. I know FCP X's "Compressor" does, and the ffmpeg source has a comment hinting that FCP 5 did. Still, the important thing is, mp2v and mpgv don't seem to be explicitly disallowed. I'll go with that.

"list is not exhaustive" -> true, but MPEG-2 was the dominant ISO format at the time of the original spec. That disclaimer probably covers niche codecs such as camcorders using some custom variant of MJPEG.

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


text:
After Effects - Unable to track motion accurately for screen recording when scrolling occurs
I'm attempting to create a simple help video where I demonstrate the use of an online application, so I'm using a screen recording as my source video. I've created a shape layer that will serve as box to highlight a certain part of the webpage I want to draw attention to. In this scene, the page scrolls down. At this point I would like the highlight-box to scroll with the page. I've attempted to use the Track Motion tool to target the highlight-box to features on the page. However, the tracker is doing a horrible job of tracking items when the page scrolls. I've attempted to position the motion tracker on to many of the page's items, but it's just not able to get a handle on anything effectively.
I've read through a few different tutorials and watched a couple of videos too, and so I don't think that there is a problem with my work flow.
Is anybody able to tell me why I am having such trouble tracking this scroll motion? Does anybody have any recommendations for solving this problem?
I've attached a link to the aep file at Highlights-3.aep  (182KB), and the relevant clip file at video clip (1,635 KB). Any help will be greatly appreciated. Thank you.

The File you uploaded is only the project file - you will need to upload the clip aswell. I assume that the nature of screens when filmed make tracking a nightmare. Have you tried manually keyframing the y-position? If the motion isn't too complex, this should bring better results faster.

Not a direct answer, but I would do this within the screen recording software itself. Something like ScreenFlow has lots of options for highlighting and calling out cursors etc. You'll find it a lot easier than trying to track screens in AE.

@FlorianClaaßen Yes, I think it could be because of the screen recording; AE just can't find anything to hold on to. Keyframing the highlight-box might be something I will end up resorting to.


text:
Difference between duration_ts and duration in ffprobe output?
I am relatively a beginner in ffmpeg and video production and was trying to extract duration of a video using ffprobe, using the following command:
ffprobe -loglevel error -select_streams v -show_entries stream -of json filename.mp4
Output:
{
    "programs": [

    ],
    "streams": [
        {
            "index": 0,
            "codec_name": "h264",
            "codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
            "profile": "Baseline",
            "codec_type": "video",
            "codec_time_base": "250/15007",
            "codec_tag_string": "avc1",
            "codec_tag": "0x31637661",
            "width": 640,
            "height": 352,
            "coded_width": 640,
            "coded_height": 352,
            "has_b_frames": 0,
            "pix_fmt": "yuv420p",
            "level": 30,
            "chroma_location": "left",
            "refs": 1,
            "is_avc": "true",
            "nal_length_size": "4",
            "r_frame_rate": "15007/500",
            "avg_frame_rate": "15007/500",
            "time_base": "1/30014",
            "start_pts": 0,
            "start_time": "0.000000",
            "duration_ts": 479000,
            "duration": "15.959219",
            "bit_rate": "1826913",
            "bits_per_raw_sample": "8",
            "nb_frames": "479",
            "disposition": {
                "default": 1,
                "dub": 0,
                "original": 0,
                "comment": 0,
                "lyrics": 0,
                "karaoke": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "visual_impaired": 0,
                "clean_effects": 0,
                "attached_pic": 0,
                "timed_thumbnails": 0
            },
            "tags": {
                "rotate": "90",
                "language": "und"
            },
            "side_data_list": [
                {
                    "side_data_type": "Display Matrix",
                    "displaymatrix": "\n00000000:            0       65536           0\n00000001:       -65536           0           0\n00000002:            0           0  1073741824\n",
                    "rotation": -90
                }
            ]
        }
    ]
}

I have been trying to understand what is the difference between
duration_ts and duration
Can someone just point me in the right direction to understand what each of them means?
I understand that the duration stands for run time of video but don't know what duration_ts here refers to.

duration_ts is in timebase units. See https://stackoverflow.com/questions/43333542/what-is-video-timescale-timebase-or-timestamp-in-ffmpeg/43337235#43337235

duration is in seconds, e.g. 15.9
duration_ts is in the media's time_base, e.g. 1/30014 * 479000 = 15.959219


text:
Use of time remapping to stabilize the velocity of a rotating object?
I have a video of myself inside of a human-powered rotating drum. This video's shot at 60 frames per second, but due to to the unreliable velocity of human operators, this drum rotates at different speeds throughout the video. I need the drum to rotate at a constant speed for use in a video installation.
I'm wondering if there's a processing technique (perhaps in after effects) I could use to programmatically stabilize the speed of this drum, maybe by use of a tracking point on the drum's edge. What I'm doing right now is overlaying eight equally-spaced diameters on top of this video, and attempting to get a constant amount of rotation (one-eighth of a turn) every thirty frames through premiere's speed ramping tools.
Unfortunately, this is not an ideal solution as even within one-eighth of a rotation there are speed variances and minor starts and stops that do not produce a stable rotation.
Does anyone have any ideas on how to approach this? Attached is a picture for reference.

This is the best video.stackexchange question ever. Don't lock yourselves in washing machines, kids

One thing you could do is track the rotation of the drum, so that it's virtually stabilized and then use a Null-object to drive the rotation of the layer. This would give you a fresh, new, smooth rotation all the way through.

Use mocha to track the drum of the machine, but mask out its contents.  Mocha can handle rotation of planar surfaces, and there’s a lite version which ships with AE. Use the stabilize module to even out the movement.


text:
ffmpeg blend mode multiply results in green overlay
i'm trying to overlap two video clips using FFMpeg. I'm using the following command:
ffmpeg -i a.mp4 -i b.mp4 -filter_complex "blend=all_mode='multiply'" c.mp4

I was expecting to get something like in a bitmap editor. Instead, I get a green overlay on top of the resulting video.
Could you explain that and help me fix my command-line? I'm also open to other alternative programs.
Thanks
Edit:
Here if the full log
ffmpeg version n4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9.1.0 (GCC)
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-nvdec --enable-nvenc --enable-omx --enable-shared --enable-version3
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'contrast.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.29.100
  Duration: 00:00:02.67, start: 0.000000, bitrate: 1071 kb/s
    Stream #0:0(und): Video: h264 (High 4:4:4 Predictive) (avc1 / 0x31637661), yuv444p, 1920x1080, 985 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 86 kb/s (default)
    Metadata:
      handler_name    : Core Media Audio
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'contrast.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.29.100
  Duration: 00:00:02.67, start: 0.000000, bitrate: 1071 kb/s
    Stream #1:0(und): Video: h264 (High 4:4:4 Predictive) (avc1 / 0x31637661), yuv444p, 1920x1080, 985 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #1:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 86 kb/s (default)
    Metadata:
      handler_name    : Core Media Audio
File 'combined.mp4' already exists. Overwrite ? [y/N] y
Stream mapping:
  Stream #0:0 (h264) -> blend:top (graph 0)
  Stream #1:0 (h264) -> blend:bottom (graph 0)
  blend (graph 0) -> Stream #0:0 (libx264)
  Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 0x558fa4a84680] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x558fa4a84680] profile High 4:4:4 Predictive, level 4.0, 4:4:4, 8-bit
[libx264 @ 0x558fa4a84680] 264 - core 157 r2945 72db437 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=1 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 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=4 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 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 'combined.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.29.100
    Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv444p, 1920x1080, q=-1--1, 29.97 fps, 30k tbn, 29.97 tbc (default)
    Metadata:
      encoder         : Lavc58.54.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 69 kb/s (default)
    Metadata:
      handler_name    : Core Media Audio
      encoder         : Lavc58.54.100 aac
frame=   79 fps= 19 q=-1.0 Lsize=     329kB time=00:00:02.64 bitrate=1018.5kbits/s speed=0.639x
video:297kB audio:28kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.255968%
[libx264 @ 0x558fa4a84680] frame I:2     Avg QP:11.42  size:  9143
[libx264 @ 0x558fa4a84680] frame P:27    Avg QP:20.64  size:  4721
[libx264 @ 0x558fa4a84680] frame B:50    Avg QP:22.19  size:  3150
[libx264 @ 0x558fa4a84680] consecutive B-frames: 12.7%  7.6%  3.8% 75.9%
[libx264 @ 0x558fa4a84680] mb I  I16..4: 97.7%  0.0%  2.3%
[libx264 @ 0x558fa4a84680] mb P  I16..4:  9.0%  0.0%  1.0%  P16..4:  4.9%  1.1%  0.3%  0.0%  0.0%    skip:83.7%
[libx264 @ 0x558fa4a84680] mb B  I16..4:  2.1%  0.0%  0.2%  B16..8:  9.6%  1.2%  0.0%  direct: 0.6%  skip:86.2%  L0:52.2% L1:46.4% BI: 1.4%
[libx264 @ 0x558fa4a84680] coded y,u,v intra: 4.5% 0.3% 1.0% inter: 0.9% 0.1% 0.5%
[libx264 @ 0x558fa4a84680] i16 v,h,dc,p: 68% 18%  9%  4%
[libx264 @ 0x558fa4a84680] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 32% 10% 28%  4%  7%  9%  4%  6%  1%
[libx264 @ 0x558fa4a84680] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x558fa4a84680] ref P L0: 52.8%  6.5% 24.4% 16.3%
[libx264 @ 0x558fa4a84680] ref B L0: 70.8% 23.2%  6.0%
[libx264 @ 0x558fa4a84680] ref B L1: 88.5% 11.5%
[libx264 @ 0x558fa4a84680] kb/s:920.37
[aac @ 0x558fa4b1ea00] Qavg: 1424.024

Share full log. Your videos are almost certainly in YUV.

@Gyan Thanks, I edited my post with le log

I solved my problem thanks to @Gyan comment:
ffmpeg -i bg.mp4 -i fg.mov -filter_complex "[0:v] format=rgba [bg]; [1:v] format=rgba [fg]; [bg][fg] blend=all_mode='multiply':all_opacity=1, format=rgba"  out.mp4


text:
Video with lower bitrate resulting from joining two video files
I had a 595mb .MP4 video (data rate: 510 kbps, Total bitrate 638 kbps). And I joined it with another .MP4 youtube video with a lower quality(only the end part).. The resulting video file has a data rate of 389kbps and Total bitrate of 517 kbps.. The size is also significantly smaller; 494mb.. I used a program called Video Combiner.. And side by side I can see the original one is better quality looking.. so what am i doing wrong? any suggestions? I just wanna join 2 video files without loss of total quality.

Your program probably re-encoded the resulting video file from scratch and used whatever setting it considered okay.
If you want to have more control about the process and/or do not want it to re-encode the video at all (if both are of the same format), then I strongly suggest looking into ffmpeg for this.
For reference, https://trac.ffmpeg.org/wiki/Concatenate - the concat demuxer is what you want.
As the most simple example, copy both your video files (let's call them videoA.mp4 and videoB.mp4) into the same folder. Create a videos.txt file with just this content:
file videoA.mp4
file videoB.mp4

Now run ffmpeg with this command:
ffmpeg -f concat -i videos.txt -c copy videoOut.mp4

If all goes well this gives you a new file with both videos in one file, with the original encoding intact.

thank u ...this is absolutely what i was looking for.. but couldnt express properly to Google..   But ffmpeg is a big program, that can do many things which i will never use.. i dont suppose i would be able to find a smaller program that can do that using a GUI??

Hmm, maybe try this one https://ffqueue.bruchhaus.dk/Screenshots.aspx
I haven't used it myself but judging from the 9th picture it appears to have the concat functionality built into the GUI.

ok..       ✌    Thank u


text:
Efficient decoding of 10-bit 4k h264 from GH5S?
On my Intel 4770k (bought back in 2014) I can only decode GH5S's 4k 10-bit video at about 30fps with CPU maxing out. This is both when manually using ffmpeg and when using Handbrake. ffmpeg, Handbrake and Vegas 13 are all taking almost realtime to just decode
The system also has NVidia's GTX 1070Ti in it.
I was unable to use Intel's QuickSync (-hwaccel qsv -c:v h264_qsv before the -i argument in ffmpeg) or NVidia's NVDEC (-hwaccel nvdec) to decode the 10-bit h264.
Is there any software solution that can convert the video into something more efficiently usable? Whether 8-bit h264, or 10-bit HEVC, or some other intermediary format that can actually be hardware-decoded by Intel QuickSync or NVENC. Did I overlook any hardware solution? GPU upgrade? CPU upgrade?
I really would prefer not to go back to the good old days of files being decodable at merely realtime.

-hwaccel qsv -v:c h264_qsv --> this should be -c:v h264_qsv, similar for nvdec. In any case, here, on a i5-3470, ffmpeg decodes 10-bit 4K 30 fps H264 @ 3.7x, suggesting your bottleneck is not CPU or s/w decoder. (Handbrake uses ffmpeg for media processing). Maybe available RAM or its speed?

@Gyan sure, typo fixed, thanks. I don't have the h264_nvdec on my build of ffmpeg, but if I remember correctly, -hwaccel nvdec was enough on my machine when feeding it 8-bit input (and that's how it was documented, too).

@Gyan Also: I wasn't use if Handbrake used ffmpeg or libav, so I didn't specify anything. Either way, for software decoding with ffmpeg, 4770k is the bottleneck (90%+ use) based on what Windows Task Manager says. I'll admit that RAM could be the bottleneck when nvdec kicks in on 8-bit; Windows Task Manager claims that 'video decoding' on the GPU is at mere 40-50%.

Nvdec and qsv do not have support for 10 bit AVC. And if there was a more “efficient” software decoder available, it would already be in ffmpeg.


text:
Receiving RTSP stream to ffmpeg
I must be doing something obviously wrong but cannot see it.
The set up is a hardware video encoder providing multiple streams.  A similar video decoder receives the RTSP stream as does VLC.
So does ffmpeg, it can see the stream and how the stream is configured by RTSP.  But then it times out.
Here is one test & verbose output
ffmpeg  -y -loglevel debug  -rtsp_transport udp -stimeout 10000000  -i rtsp://192.168.2.82/1 -acodec copy -vcodec copy test.mp4
ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with Apple clang version 11.0.0 (clang-1100.0.33.8)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.2.1_2 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/adoptopenjdk-13.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-13.jdk/Contents/Home/include/darwin -fno-stack-check' --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Splitting the commandline.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.
Reading option '-rtsp_transport' ... matched as AVOption 'rtsp_transport' with argument 'udp'.
Reading option '-stimeout' ... matched as AVOption 'stimeout' with argument '10000000'.
Reading option '-i' ... matched as input url with argument 'rtsp://192.168.2.82/1'.
Reading option '-acodec' ... matched as option 'acodec' (force audio codec ('copy' to copy stream)) with argument 'copy'.
Reading option '-vcodec' ... matched as option 'vcodec' (force video codec ('copy' to copy stream)) with argument 'copy'.
Reading option 'test.mp4' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option y (overwrite output files) with argument 1.
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input url rtsp://192.168.2.82/1.
Successfully parsed a group of options.
Opening an input file: rtsp://192.168.2.82/1.
[tcp @ 0x7fbbba521940] No default whitelist set
[tcp @ 0x7fbbba521940] Original list of addresses:
[tcp @ 0x7fbbba521940] Address 192.168.2.82 port 554
[tcp @ 0x7fbbba521940] Interleaved list of addresses:
[tcp @ 0x7fbbba521940] Address 192.168.2.82 port 554
[tcp @ 0x7fbbba521940] Starting connection attempt to 192.168.2.82 port 554
[tcp @ 0x7fbbba521940] Successfully connected to 192.168.2.82 port 554
[rtsp @ 0x7fbbbb00ba00] SDP:
v=0
o=- 18467 41 IN IP4 0.0.0.0
s=Unnamed
i=N/A
c=IN IP4 0.0.0.0
t=0 0
a=control:*
a=range:npt=0-
m=video 0 RTP/AVP 96
a=rtpmap:96 H265/90000
a=fmtp:96 sprop-vps=QAEMAf//AWAAAAMAsAAAAwAAAwBarAwAAAMABAAAAwB6qA==; sprop-sps=QgEBAWAAAAMAsAAAAwAAAwBaoAWCAJBY2uSTL83AQEBBAAADAAEAAAMAHqE=; sprop-pps=RAHA8vA8kA==
a=control:track1
m=audio 0 RTP/AVP 97
a=rtpmap:97 MPEG4-GENERIC/44100/2
a=fmtp:97 profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3; config=1210
a=control:track2

Failed to parse interval end specification ''
[rtsp @ 0x7fbbbb00ba00] video codec set to: hevc
[rtsp @ 0x7fbbbb00ba00] audio codec set to: aac
[rtsp @ 0x7fbbbb00ba00] audio samplerate set to: 44100
[rtsp @ 0x7fbbbb00ba00] audio channels set to: 2
[rtp @ 0x7fbbba404780] No default whitelist set
[udp @ 0x7fbbba40a0c0] No default whitelist set
[udp @ 0x7fbbba40a0c0] end receive buffer size reported is 65536
[udp @ 0x7fbbba403180] No default whitelist set
[udp @ 0x7fbbba403180] end receive buffer size reported is 65536
[rtsp @ 0x7fbbbb00ba00] setting jitter buffer size to 500
[rtp @ 0x7fbbba403f00] No default whitelist set
[udp @ 0x7fbbba404200] No default whitelist set
[udp @ 0x7fbbba404200] end receive buffer size reported is 65536
[udp @ 0x7fbbba4042c0] No default whitelist set
[udp @ 0x7fbbba4042c0] end receive buffer size reported is 65536
[rtsp @ 0x7fbbbb00ba00] setting jitter buffer size to 500
[rtsp @ 0x7fbbbb00ba00] hello state=0
[hevc @ 0x7fbbbb00da00] nal_unit_type: 32(VPS), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7fbbbb00da00] nal_unit_type: 33(SPS), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7fbbbb00da00] nal_unit_type: 34(PPS), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7fbbbb00da00] Decoding VPS
[hevc @ 0x7fbbbb00da00] Main profile bitstream
[hevc @ 0x7fbbbb00da00] Decoding SPS
[hevc @ 0x7fbbbb00da00] Main profile bitstream
[hevc @ 0x7fbbbb00da00] Decoding VUI
[hevc @ 0x7fbbbb00da00] Decoding PPS
[hevc @ 0x7fbbbb00da00] nal_unit_type: 32(VPS), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7fbbbb00da00] nal_unit_type: 33(SPS), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7fbbbb00da00] nal_unit_type: 34(PPS), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7fbbbb00da00] Decoding VPS
[hevc @ 0x7fbbbb00da00] Main profile bitstream
[hevc @ 0x7fbbbb00da00] Decoding SPS
[hevc @ 0x7fbbbb00da00] Main profile bitstream
[hevc @ 0x7fbbbb00da00] Decoding VUI
[hevc @ 0x7fbbbb00da00] Decoding PPS
Input #0, rtsp, from 'rtsp://192.168.2.82/1':
  Metadata:
    title           : Unnamed
    comment         : N/A
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0, 0, 1/90000: Video: hevc (Main), 1 reference frame, yuvj420p(pc, bt709), 704x576, 0/1, 30 tbr, 90k tbn, 30 tbc
    Stream #0:1, 0, 1/44100: Audio: aac, 44100 Hz, stereo, fltp
Successfully opened the file.
Parsing a group of options: output url test.mp4.
Applying option acodec (force audio codec ('copy' to copy stream)) with argument copy.
Applying option vcodec (force video codec ('copy' to copy stream)) with argument copy.
Successfully parsed a group of options.
Opening an output file: test.mp4.
[file @ 0x7fbbba529880] Setting default whitelist 'file,crypto'
Successfully opened the file.
[mp4 @ 0x7fbbbb01de00] track 1: codec frame size is not set
Output #0, mp4, to 'test.mp4':
  Metadata:
    title           : Unnamed
    comment         : N/A
    encoder         : Lavf58.29.100
    Stream #0:0, 0, 1/90000: Video: hevc (Main), 1 reference frame (hev1 / 0x31766568), yuvj420p(pc, bt709), 704x576 (0x0), 0/1, q=2-31, 30 tbr, 90k tbn, 90k tbc
    Stream #0:1, 0, 1/44100: Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:1 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
rtsp://192.168.2.82/1: Operation timed out
No more output streams to write to, finishing.
frame=    0 fps=0.0 q=-1.0 Lsize=       0kB time=00:00:00.00 bitrate=N/A speed=   0x
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Input file #0 (rtsp://192.168.2.82/1):
  Input stream #0:0 (video): 0 packets read (0 bytes);
  Input stream #0:1 (audio): 0 packets read (0 bytes);
  Total: 0 packets (0 bytes) demuxed
Output file #0 (test.mp4):
  Output stream #0:0 (video): 0 packets muxed (0 bytes);
  Output stream #0:1 (audio): 0 packets muxed (0 bytes);
  Total: 0 packets (0 bytes) muxed
0 frames successfully decoded, 0 decoding errors
[AVIOContext @ 0x7fbbba40af40] Statistics: 2 seeks, 3 writeouts

Everything looks good, I can adjust params on the encoder, and ffmpeg sees them and in spite of various command line params, always a timeout.
Encoder, decoder, laptop, vlc all on same wlan.  Surprising everything but ffmpeg can receive. No doubt through my lack of understanding of ffmpeg and rtsp, I'm missing something.  Any help appreciated!

Figured it out, so wanted to leave an answer on it.
The encoder was not using UDP after all.  And so -rtsp_transport udp would timeout since it was not available.  My red herring was observing ffmpeg obtain the SDP data.