Re: [FFmpeg-user] Getting audio correct (Zoom meeting)

2020-08-15 Thread Carl Zwanzig

On 8/15/2020 3:14 AM, Cecil Westerhof wrote:

I understood that there are different ways to record Zoom meetings. (I
am not doing it myself, I only get the results.) I found that what I
got was extremely small. (A video of six minutes only took 56.7 MB.)
What would be the best way to record Zoom meetings so they can be
processed by ffmpeg the best?


There are some settings ("Optimize for 3rd party video editor"), but in 
general zoom compresses for space, not quality.


Another option is to use some screen-capture software and record it that way.

z!
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] Compression is a lot smaller

2020-08-15 Thread Cecil Westerhof
Simon Roberts  writes:

> On Sat, Aug 15, 2020 at 5:01 AM Cecil Westerhof  wrote:
>
>> Through scripts I use ffmpeg for cutting and compressing videos and
>> sometimes adding a watermark. Nothing fancy, but handy.
>>
>> In the past the original file was between 4 to 13 times bigger as the
>> compressed file. Today I compressed a few files again. The compression
>> was almost non existing to less as three.
>>
>
> [...]
>
>
>>
>
> What could be happening here?
>
>
> The most immediate thought is that zoom improved their compression
> algorithm and now there's not so much room left for a secondary
> improvement.
>
> You might want to take a look at the original, perhaps using ffprobe, to
> determine what codec was used, and what bitrate it started out with.

No, that is not the case. These where videos I shot with my Sony
handycam. So uncompressed files.
But maybe I should have described it a bit clearer.

But there is nothing inherently wrong with the way I call ffmpeg?

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] Putting in a picture half-way through the video

2020-08-15 Thread Cecil Westerhof
Simon Roberts  writes:

> On Sat, Aug 15, 2020 at 4:07 AM Cecil Westerhof  wrote:
>
>> I have to publish the video's from our Zoom meetings. Something went
>> wrong. Halfway a recording the recording went from the speaker to the
>> overview screen. I like to change the part of the video with the
>> overview screen (people do not know they are being recorded and not
>> everything is very flattering) with a static picture. Is this doable?
>> (Without to much work.)
>>
>
> This (and the audio sync issue you describe elsewhere) seems to me to be a
> job far better suited to an actual video editor since you can perform these
> actions interactively.
>
> Lightworks (lwks.com) is extremely powerful, free for output 720 or lower,
> and works on Linux, Mac, and PC. There are many others that are free too
> for the various platforms.

I really do not like to use file editing tools. Until now I managed
quit sufficiently with scripts that called ffmpeg, but maybe it is
time to bite the bullet.

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] Putting in a picture half-way through the video

2020-08-15 Thread Simon Roberts
On Sat, Aug 15, 2020 at 4:07 AM Cecil Westerhof  wrote:

> I have to publish the video's from our Zoom meetings. Something went
> wrong. Halfway a recording the recording went from the speaker to the
> overview screen. I like to change the part of the video with the
> overview screen (people do not know they are being recorded and not
> everything is very flattering) with a static picture. Is this doable?
> (Without to much work.)
>

This (and the audio sync issue you describe elsewhere) seems to me to be a
job far better suited to an actual video editor since you can perform these
actions interactively.

Lightworks (lwks.com) is extremely powerful, free for output 720 or lower,
and works on Linux, Mac, and PC. There are many others that are free too
for the various platforms.

Just my $0.02
Cheers,
Simon
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] Compression is a lot smaller

2020-08-15 Thread Simon Roberts
On Sat, Aug 15, 2020 at 5:01 AM Cecil Westerhof  wrote:

> Through scripts I use ffmpeg for cutting and compressing videos and
> sometimes adding a watermark. Nothing fancy, but handy.
>
> In the past the original file was between 4 to 13 times bigger as the
> compressed file. Today I compressed a few files again. The compression
> was almost non existing to less as three.
>

[...]


>

What could be happening here?


The most immediate thought is that zoom improved their compression
algorithm and now there's not so much room left for a secondary
improvement.

You might want to take a look at the original, perhaps using ffprobe, to
determine what codec was used, and what bitrate it started out with.


>
>
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] When cutting part of video I get a silence part before it

2020-08-15 Thread Cecil Westerhof
Cecil Westerhof  writes:

Some logging of the problem.

When I use:
ffmpeg -y -ss 61 -i zoom_4.mp4 -to 469 -acodec copy -vcodec copy -async 1 
4_compressed.mp4

The video starts with 26 seconds (of negative time stamped) silent
video.

The log:
ffmpeg version 4.1.6-1~deb10u1 Copyright (c) 2000-2020 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 --enable-omx --enable-openal 
--enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm 
--enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 
--enable-shared
  libavutil  56. 22.100 / 56. 22.100
  libavcodec 58. 35.100 / 58. 35.100
  libavformat58. 20.100 / 58. 20.100
  libavdevice58.  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
  libpostproc55.  3.100 / 55.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'zoom_4.mp4':
  Metadata:
major_brand : mp42
minor_version   : 0
compatible_brands: isommp42
creation_time   : 2020-07-31T20:26:28.00Z
  Duration: 00:08:54.24, start: 0.00, bitrate: 480 kb/s
Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 32000 Hz, mono, 
fltp, 49 kb/s (default)
Metadata:
  creation_time   : 2020-07-31T20:26:28.00Z
  handler_name: AAC audio
Stream #0:1(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 
640x360, 429 kb/s, 25 fps, 25 tbr, 30k tbn, 60k tbc (default)
Metadata:
  creation_time   : 2020-07-31T20:26:28.00Z
  handler_name: H.264/AVC video
  encoder : AVC Coding
Output #0, mp4, to '4_compressed.mp4':
  Metadata:
major_brand : mp42
minor_version   : 0
compatible_brands: isommp42
encoder : Lavf58.20.100
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 
640x360, q=2-31, 429 kb/s, 25 fps, 25 tbr, 30k tbn, 30k tbc (default)
Metadata:
  creation_time   : 2020-07-31T20:26:28.00Z
  handler_name: H.264/AVC video
  encoder : AVC Coding
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 32000 Hz, mono, 
fltp, 49 kb/s (default)
Metadata:
  creation_time   : 2020-07-31T20:26:28.00Z
  handler_name: AAC audio
Stream mapping:
  Stream #0:1 -> #0:0 (copy)
  Stream #0:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=12391 fps=0.0 q=-1.0 Lsize=   29113kB time=00:07:48.98 bitrate= 
508.5kbits/s speed=1.89e+03x
video:25861kB audio:2973kB subtitle:0kB other streams:0kB global 
headers:0kB muxing overhead: 0.970170%

What could be the problem?


> In the past I had sometimes the following strange problem. When
> cutting a part out of a video with:
> ffmpeg -y\
>-ss "${startSeconds}" \
>-i  "${INPUT_FILE}"   \
>-to "$((stopSeconds - startSeconds))" \
>-acodec copy  \
>-vcodec copy  \
>-async 1  \
>"${OUTPUT_FILE}"
>
> sometimes before the selected video was put something extra that was
> silent and had a negative time index.
>
> At a certain point I found out that it had to do when compressing the
> file with:
>   ffmpeg -y  \
> -i "${_inputfile}"   \
> -vcodec libx264  \
> -crf 23  \
> -acodec libmp3lame   \
> -preset veryfast \
> "${_outputfile}"
>
> The reason that I did this was that the original file was between four
> to thirteen times bigger, without me seeing a quality loss.
> Most of the times I did not have this problem, 

[FFmpeg-user] Compression is a lot smaller

2020-08-15 Thread Cecil Westerhof
Through scripts I use ffmpeg for cutting and compressing videos and
sometimes adding a watermark. Nothing fancy, but handy.

In the past the original file was between 4 to 13 times bigger as the
compressed file. Today I compressed a few files again. The compression
was almost non existing to less as three.

454 -> 415
503 -> 230
490 -> 254
462 -> 157
497 -> 197
454 -> 174

Some logging of the worst (the first):
nice -n 10 ionice -c3 ffmpeg -y -i 00039.MTS -vcodec libx264 -crf 23 
-acodec libmp3lame -preset veryfast 00039.mp4
ffmpeg version 4.1.6-1~deb10u1 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 8 (Debian 8.3.0-6)
.
.
.
  libavutil  56. 22.100 / 56. 22.100
  libavcodec 58. 35.100 / 58. 35.100
  libavformat58. 20.100 / 58. 20.100
  libavdevice58.  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
  libpostproc55.  3.100 / 55.  3.100
Input #0, mpegts, from '00039.MTS':
  Duration: 00:02:49.02, start: 1.04, bitrate: 22533 kb/s
  Program 1 
Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), 
yuv420p(top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 50 tbr, 90k tbn, 50 
tbc
Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, 
fltp, 256 kb/s
Stream #0:2[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 
0x0090), 1920x1080
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (ac3 (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
[libx264 @ 0x563820eef380] using SAR=1/1
[libx264 @ 0x563820eef380] using cpu capabilities: MMX2 SSE2Fast SSSE3 
SSE4.2 AVX XOP FMA3 BMI1
[libx264 @ 0x563820eef380] profile High, level 4.0
[libx264 @ 0x563820eef380] 264 - core 155 r2917 0a84d98 - H.264/MPEG-4 AVC 
codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: 
cabac=1 ref=1 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=2 psy=1 
psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 
deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=6 lookahead_threads=2 
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=1 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 
rc_lookahead=10 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 '00039.mp4':
  Metadata:
encoder : Lavf58.20.100
Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 
1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 25 fps, 12800 tbn, 25 tbc
Metadata:
  encoder : Lavc58.35.100 libx264
Side data:
  cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream #0:1: Audio: mp3 (libmp3lame) (mp4a / 0x6134706D), 48000 Hz, 
stereo, fltp
Metadata:
  encoder : Lavc58.35.100 libmp3lame
.
.
.
video:421739kB audio:2642kB subtitle:0kB other streams:0kB global 
headers:0kB muxing overhead: 0.027043%
[libx264 @ 0x563820eef380] frame I:23Avg QP:24.52  size:417042
[libx264 @ 0x563820eef380] frame P:1621  Avg QP:26.67  size:165193
[libx264 @ 0x563820eef380] frame B:2581  Avg QP:30.40  size: 59857
[libx264 @ 0x563820eef380] consecutive B-frames:  8.0% 29.4%  6.3% 56.2%
[libx264 @ 0x563820eef380] mb I  I16..4:  3.2% 19.9% 76.8%
[libx264 @ 0x563820eef380] mb P  I16..4:  1.1%  5.9%  3.6%  P16..4: 45.3% 
16.5% 19.4%  0.0%  0.0%skip: 8.3%
[libx264 @ 0x563820eef380] mb B  I16..4:  0.2%  0.8%  0.1%  B16..8: 20.0%  
9.5%  3.8%  direct:24.2%  skip:41.5%  L0:20.1% L1:34.8% BI:45.1%
[libx264 @ 0x563820eef380] 8x8 transform intra:54.1% inter:41.3%
[libx264 @ 0x563820eef380] coded y,uvDC,uvAC intra: 84.1% 74.6% 39.9% 
inter: 43.9% 18.0% 3.8%
[libx264 @ 0x563820eef380] i16 v,h,dc,p: 38% 29% 21% 12%
[libx264 @ 0x563820eef380] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 22% 23%  5%  
5%  5%  6%  5%  9%
[libx264 @ 0x563820eef380] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 10% 36% 14%  5%  
6%  5%  8%  5% 11%
[libx264 @ 0x563820eef380] i8c dc,h,v,p: 45% 25% 19% 12%
[libx264 @ 0x563820eef380] Weighted P-Frames: Y:5.9% UV:2.7%
[libx264 @ 0x563820eef380] kb/s:20443.06

What could be happening here?
When I need to provide more information: let me know.

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-user] When cutting part of video I get a silence part before it

2020-08-15 Thread Cecil Westerhof
In the past I had sometimes the following strange problem. When
cutting a part out of a video with:
ffmpeg -y\
   -ss "${startSeconds}" \
   -i  "${INPUT_FILE}"   \
   -to "$((stopSeconds - startSeconds))" \
   -acodec copy  \
   -vcodec copy  \
   -async 1  \
   "${OUTPUT_FILE}"

sometimes before the selected video was put something extra that was
silent and had a negative time index.

At a certain point I found out that it had to do when compressing the
file with:
  ffmpeg -y  \
-i "${_inputfile}"   \
-vcodec libx264  \
-crf 23  \
-acodec libmp3lame   \
-preset veryfast \
"${_outputfile}"

The reason that I did this was that the original file was between four
to thirteen times bigger, without me seeing a quality loss.
Most of the times I did not have this problem, but sometimes I did.
When first cutting the video and then compressing it I did not have
this problem.

Sadly the problem emerged again. :'-(
I have to publish recordings of a Zoom meeting. They are very small
(not even 10 MB pro minute) and I got the same problem. I have to
generate some logging (I use ffmpeg through bash and tcl scripts), but
was wondering if somebody knows what could generate this kind of
problems and what to do about it.
I will later on share some logging.

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] Getting audio correct (Zoom meeting)

2020-08-15 Thread Cecil Westerhof
Cecil Westerhof  writes:

> I have to publish zoom recordings. One of the problems is that audio
> is out of sync. And it is different for the different recordings. It
> goes from something I notice because I am a nitpicker, to something I
> think will annoy everyone.
> Is that something that is just part of recording Zoom meetings
> (hardware and internet connection of the sender), or can it be mend
> without to much difficulty?

I understood that there are different ways to record Zoom meetings. (I
am not doing it myself, I only get the results.) I found that what I
got was extremely small. (A video of six minutes only took 56.7 MB.)
What would be the best way to record Zoom meetings so they can be
processed by ffmpeg the best?

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-user] Putting in a picture half-way through the video

2020-08-15 Thread Cecil Westerhof
I have to publish the video's from our Zoom meetings. Something went
wrong. Halfway a recording the recording went from the speaker to the
overview screen. I like to change the part of the video with the
overview screen (people do not know they are being recorded and not
everything is very flattering) with a static picture. Is this doable?
(Without to much work.)

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-user] Getting audio correct (Zoom meeting)

2020-08-15 Thread Cecil Westerhof
I have to publish zoom recordings. One of the problems is that audio
is out of sync. And it is different for the different recordings. It
goes from something I notice because I am a nitpicker, to something I
think will annoy everyone.
Is that something that is just part of recording Zoom meetings
(hardware and internet connection of the sender), or can it be mend
without to much difficulty?

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".