[FFmpeg-user] last 2 seconds are cut recording screen - hardware aceleration

2020-06-29 Thread Leonardo via ffmpeg-user
Hello,

I'm trying to use ffmpeg to record the computer screen and also audio from 
microfone. Googling I found a lot of "how to". Although I can now record, I do 
have a few questions (3):

1) Using command

$ ffmpeg -thread_queue_size 512 -f alsa -ac 2 -ar 44100 -i hw:0,0 -video_size 
1024x768 -probesize 10M -framerate 30 -thread_queue_size 512 -f x11grab -i :0.0 
-c:a aac -c:v libx264 -vf "format=yuv420p" output.mp4
ffmpeg version N-98341-gcca982ee01 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 8 (Debian 8.3.0-6)
  configuration: --toolchain=hardened --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. 55.100 / 56. 55.100
  libavcodec 58. 93.100 / 58. 93.100
  libavformat    58. 47.100 / 58. 47.100
  libavdevice    58. 11.100 / 58. 11.100
  libavfilter 7. 86.100 /  7. 86.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale  5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
  libpostproc    55.  8.100 / 55.  8.100
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, alsa, from 'hw:0,0':
  Duration: N/A, start: 1593480535.223265, bitrate: 1411 kb/s
    Stream #0:0: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
Input #1, x11grab, from ':0.0':
  Duration: N/A, start: 1593480535.257288, bitrate: 754974 kb/s
    Stream #1:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1024x768, 754974 
kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
Stream mapping:
  Stream #1:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
  Stream #0:0 -> #0:1 (pcm_s16le (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 0x55a51bf2fb00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 
AVX
[libx264 @ 0x55a51bf2fb00] profile High, level 3.1
[libx264 @ 0x55a51bf2fb00] 264 - core 155 r2917 0a84d98 - 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=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 'output.mp4':
  Metadata:
    encoder : Lavf58.47.100
    Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), 
yuv420p(progressive), 1024x768, q=-1--1, 30 fps, 15360 tbn, 30 tbc
    Metadata:
  encoder : Lavc58.93.100 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
    Metadata:
  encoder : Lavc58.93.100 aac
frame=   19 fps=0.0 q=0.0 size=   0kB time=00:00:00.00 bitrate=N/A speed=   
frame=   34 fps= 34 q=0.0 size=   0kB time=00:00:00.00 bitrate=N/A speed=   
frame=   49 fps= 32 q=0.0 size=   0kB time=00:00:00.00 bitrate=N/A speed=   
frame=   64 fps= 32 q=29.0 size=   0kB time=00:00:00.39 bitrate=   
1.0kbits/frame=   79 fps= 31 q=29.0 size=   0kB time=00:00:00.90 bitrate=   
0.4kbits/frame=   95 fps= 31 q=29.0 size=   0kB time=00:00:01.40 bitrate=   
0.3kbits/frame=  110 fps= 31 q=29.0 size=   0kB time=00:00:01.90 bitrate=   
0.2kbits/frame=  125 fps= 31 q=29.0 size=   0kB time=00:00:02.40 bitrate=   
0.2kbits/frame=  140 fps= 31 q=29.0 size=   0kB time=00:00:02.92 bitrate=   
0.1kbits/frame=  156 fps= 31 q=29.0 size=   0kB time=00:00:03.43 bitrate=   
0.1kbits/frame=  162 fps= 28 q=-1.0 Lsize= 208kB time=00:00:05.30 bitrate= 
321.1kbits/s speed=0.93x    
video:143kB audio:59kB subtitle:0kB other streams:0kB global headers:0kB muxing 
overhead: 3.221925%
[libx264 @ 0x55a51bf2fb00] frame I:1 Avg 

[FFmpeg-user] (no subject)

2020-06-29 Thread Leonardo via ffmpeg-user
Hello,

I'm trying to use ffmpeg to record the computer screen and also audio from 
microfone. Googling I found a lot of "how to". Although I can now record, I do 
have a few questions (3):

1) Using command

$ ffmpeg -thread_queue_size 512 -f alsa -ac 2 -ar 44100 -i hw:0,0 -video_size 
1024x768 -probesize 10M -framerate 30 -thread_queue_size 512 -f x11grab -i :0.0 
-c:a aac -c:v libx264 -vf "format=yuv420p" output.mp4
ffmpeg version N-98341-gcca982ee01 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 8 (Debian 8.3.0-6)
  configuration: --toolchain=hardened --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. 55.100 / 56. 55.100
  libavcodec 58. 93.100 / 58. 93.100
  libavformat    58. 47.100 / 58. 47.100
  libavdevice    58. 11.100 / 58. 11.100
  libavfilter 7. 86.100 /  7. 86.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale  5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
  libpostproc    55.  8.100 / 55.  8.100
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, alsa, from 'hw:0,0':
  Duration: N/A, start: 1593480535.223265, bitrate: 1411 kb/s
    Stream #0:0: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
Input #1, x11grab, from ':0.0':
  Duration: N/A, start: 1593480535.257288, bitrate: 754974 kb/s
    Stream #1:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1024x768, 754974 
kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
Stream mapping:
  Stream #1:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
  Stream #0:0 -> #0:1 (pcm_s16le (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 0x55a51bf2fb00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 
AVX
[libx264 @ 0x55a51bf2fb00] profile High, level 3.1
[libx264 @ 0x55a51bf2fb00] 264 - core 155 r2917 0a84d98 - 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=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 'output.mp4':
  Metadata:
    encoder : Lavf58.47.100
    Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), 
yuv420p(progressive), 1024x768, q=-1--1, 30 fps, 15360 tbn, 30 tbc
    Metadata:
  encoder : Lavc58.93.100 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
    Metadata:
  encoder : Lavc58.93.100 aac
frame=   19 fps=0.0 q=0.0 size=   0kB time=00:00:00.00 bitrate=N/A speed=   
frame=   34 fps= 34 q=0.0 size=   0kB time=00:00:00.00 bitrate=N/A speed=   
frame=   49 fps= 32 q=0.0 size=   0kB time=00:00:00.00 bitrate=N/A speed=   
frame=   64 fps= 32 q=29.0 size=   0kB time=00:00:00.39 bitrate=   
1.0kbits/frame=   79 fps= 31 q=29.0 size=   0kB time=00:00:00.90 bitrate=   
0.4kbits/frame=   95 fps= 31 q=29.0 size=   0kB time=00:00:01.40 bitrate=   
0.3kbits/frame=  110 fps= 31 q=29.0 size=   0kB time=00:00:01.90 bitrate=   
0.2kbits/frame=  125 fps= 31 q=29.0 size=   0kB time=00:00:02.40 bitrate=   
0.2kbits/frame=  140 fps= 31 q=29.0 size=   0kB time=00:00:02.92 bitrate=   
0.1kbits/frame=  156 fps= 31 q=29.0 size=   0kB time=00:00:03.43 bitrate=   
0.1kbits/frame=  162 fps= 28 q=-1.0 Lsize= 208kB time=00:00:05.30 bitrate= 
321.1kbits/s speed=0.93x    
video:143kB audio:59kB subtitle:0kB other streams:0kB global headers:0kB muxing 
overhead: 3.221925%
[libx264 @ 0x55a51bf2fb00] frame I:1 Avg 

Re: [FFmpeg-user] Encoding Warnings

2020-06-29 Thread adam smith via ffmpeg-user


> On 29 Jun 2020, at 15:44, Jim  wrote:
> 
>  (While this doesn't equalize the volume or eliminate all volume-related 
> inconsistencies, it does make the loudest part of each video the same and is 
> the best solution I've found; 

I think you would like the loudnorm filter that incorporates ebur-128 
adjustments.
It can run as two pass or one pass (useful for live streaming) and adjusts the 
audio levels to maintain the specified levels.
An example would be -af loudnorm=I=-23:TP=-1.0:LRA=11
This sets the average loudness at -23LUFS (this is pretty standard for UK TV) 
the True Peak value as -1.0dBfs and the loudness range shows the distribution 
of loudness throughout the programme.

LUFS is great because it is based on perceptual loudness and not just sample 
values.

Have fun
Adam
___
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] Encoding Warnings

2020-06-29 Thread Carl Eugen Hoyos
Am Mo., 29. Juni 2020 um 16:44 Uhr schrieb Jim :

> >> The two lines that are concerning to me are:
> >>
> >>   'Guessed Channel Layout for Input Stream #1.0 : stereo'
> >>
> >> Of course it's stereo - I jump dumped it to a 2-channel wave in the step 2!
> >> :)
> >>   I'm guessing that I can safely ignore this one
> >
> > Obviously.
> > (The wav standard does not require writing the channel layout for some
> > mono and stereo files and we don't do it to maintain compatibility with
> > ancient software that fails if the information is present.)
>
> Interesting that this warning is not present in the windows version of
> ffmpeg yet is on Linux.  Any idea why that would be?  Even more

You do realize that FFmpeg offers neither a "windows version" nor
a "Linux" version but only source code?

> interesting is your explanation... out of curiosity, what ancient
> software are you referring to?  (Not really important - just curious.)

I wanted to answer "I don't remember" but I just realized that the
Home Theatre System "Sony DAV-DZ340K" is probably among
them.

Carl Eugen
___
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] write output of find_rect to a file?

2020-06-29 Thread Moritz Barsnick
On Mon, Jun 29, 2020 at 17:35:50 +0200, Michael Koch wrote:
> Very good, that's exactly what I need. I did already make some tests
> with -show_entries before I posted this question. But I didn't know the
> names of the variables "lavfi.rect.x" and "lavfi.rect.y". Are these
> variables documented somewhere?

Good point. It's not in the documentation, I got this from the source.
Apparently, the filter was designed mainly for use with another filter.

> Is there also a variable for the quality of the find_rect result, I
> mean the number that's compared against the detection threshold?

No, that value is not exposed.

(You could try modifying the source yourself, or, if you make a very
good point about it, make a feature request.)

Moritz
___
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] RTMP and proxy

2020-06-29 Thread Moritz Barsnick
On Mon, Jun 29, 2020 at 19:23:25 +0200, Verachten Bruno wrote:
> I'm trying to get ffmpeg to use a proxy. Here is my command:
>  ffmpeg -http_proxy "http://192.168.0.217:3128/; -i sample.h264 -c:v
> copy -c:a copy -f flv "rtmp://live-cdg.twitch.tv/app/live_toto"
> -loglevel debug
> Option http_proxy not found.
>
> Why do I get "option http_proxy not found"?

Because you specified it as an option for the input file.

I assume you will get the same error, though, when you "correctly"
place the option before your output URI, because RTMP does not support
this option either. As far as I understand, RTMP is nothing like HTTP,
so an HTTP proxy would be of no use.

Apparently, RTMPT is the protocol that was made for encapsulating RTMP
in HTTP, but then twitch would have to support that too, in order for
it to work for you.

(If you are in an environment with an HTTP proxy but no SOCKS proxy,
and no direct internet access, then this is exactly the sort of thing
they are trying to prevent you doing.)

Cheers,
Moritz
___
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] extract first 26 seconds not workings as expected

2020-06-29 Thread Leonardo via ffmpeg-user
Hello
Carl,

> Please test current FFmpeg git head, if the issue is reproducible
> provide an input sample.

I tested with current git and the results were the same.

As noticed by Moritz at the output of ffprobe 


$ ffprobe part1.mp4 
ffprobe version N-98341-gcca982ee01 Copyright (c) 2007-2020 the FFmpeg 
developers
  built with gcc 8 (Debian 8.3.0-6)
  configuration: --toolchain=hardened --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. 55.100 / 56. 55.100
  libavcodec 58. 93.100 / 58. 93.100
  libavformat    58. 47.100 / 58. 47.100
  libavdevice    58. 11.100 / 58. 11.100
  libavfilter 7. 86.100 /  7. 86.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale  5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
  libpostproc    55.  8.100 / 55.  8.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'part1.mp4':
  Metadata:
    major_brand : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder : Lavf58.47.100
  Duration: 00:00:13.54, start: 12.666016, bitrate: 316 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, 
bt709), 1366x768 [SAR 1:1 DAR 683:384], 316 kb/s, 24 fps, 24 tbr, 12288 tbn, 48 
tbc (default)
    Metadata:
  handler_name    : VideoHandler


the Duration and the start values are 13.54 and 12.66, respectively.

It looks like that ffmpeg is not respecting "extract from 0 to 26" and instead 
doing something like

"well, I will start at 12.6 and will stop at 26"

Forcing with -copyinkf as suggested by Moritz, although the extracted part has, 
indeed, 26 seconds, there is only a "gray screen" from 0 to 12.6 and after that 
it plays well.

The main.mp4 file plays normal.

Kind regards,
Leonardo

___
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 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] RTMP and proxy

2020-06-29 Thread Verachten Bruno
Thanks. I have just recompiled ffmpeg with librtmp, and I now have
access to the socks proxy option. Except my proxy is not a socks
proxy.
What about the -http_proxy option? Do I have to add a special option
to configure to get ffmpeg to understand this option?

Thanks.

On Mon, Jun 29, 2020 at 7:29 PM Madovsky  wrote:
>
>
> On 6/29/2020 10:23 AM, Verachten Bruno wrote:
> > Hi there,
> >
> > I'm trying to get ffmpeg to use a proxy. Here is my command:
> >   ffmpeg -http_proxy "http://192.168.0.217:3128/; -i sample.h264 -c:v
> > copy -c:a copy -f flv "rtmp://live-cdg.twitch.tv/app/live_toto"
> > -loglevel debug
> > ffmpeg version 4.2.3 Copyright (c) 2000-2020 the FFmpeg developers
> >built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-39)
> >configuration: --pkg-config-flags=--static --prefix=/root/bin
> > --extra-cflags=-I/root/bin/include --extra-ldflags=-L/root/bin/lib
> > --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib
> > --bindir=/root/bin --enable-debug=3 --disable-debug --enable-gpl
> > --cpu=native --enable-libfdk-aac --enable-libx264
> > --extra-libs=-lpthread --enable-nonfree
> >libavutil  56. 31.100 / 56. 31.100
> >libavcodec 58. 54.100 / 58. 54.100
> >libavformat58. 29.100 / 58. 29.100
> >libavdevice58.  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
> >libpostproc55.  5.100 / 55.  5.100
> > Splitting the commandline.
> > Reading option '-http_proxy' ... matched as AVOption 'http_proxy' with
> > argument 'http://192.168.0.217:3128/'.
> > Reading option '-i' ... matched as input url with argument 'sample.h264'.
> > 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 'copy'.
> > Reading option '-f' ... matched as option 'f' (force format) with
> > argument 'flv'.
> > Reading option 'rtmp://live-cdg.twitch.tv/app/live_toto' ... matched
> > as output url.
> > Reading option '-loglevel' ... matched as option 'loglevel' (set
> > logging level) with argument 'debug'.
> > Finished splitting the commandline.
> > Parsing a group of options: global .
> > Applying option loglevel (set logging level) with argument debug.
> > Successfully parsed a group of options.
> > Parsing a group of options: input url sample.h264.
> > Successfully parsed a group of options.
> > Opening an input file: sample.h264.
> > [NULL @ 0x2c7a580] Opening 'sample.h264' for reading
> > [file @ 0x2c7adc0] Setting default whitelist 'file,crypto'
> > [h264 @ 0x2c7a580] Format h264 probed with size=2048 and score=51
> > Option http_proxy not found.
> >
> > Why do I get "option http_proxy not found"?
> >
> > I tried another way of using the proxy:
> >   ffmpeg -i sample.h264 -c:v copy -c:a copy -f flv
> > "rtmp://live-cdg.twitch.tv/app/live_toto socks=192.168.0.217:3128"
> > -loglevel debug
> > ffmpeg version 4.2.3 Copyright (c) 2000-2020 the FFmpeg developers
> >built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-39)
> >configuration: --pkg-config-flags=--static --prefix=/root/bin
> > --extra-cflags=-I/root/bin/include --extra-ldflags=-L/root/bin/lib
> > --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib
> > --bindir=/root/bin --enable-debug=3 --disable-debug --enable-gpl
> > --cpu=native --enable-libfdk-aac --enable-libx264
> > --extra-libs=-lpthread --enable-nonfree
> >libavutil  56. 31.100 / 56. 31.100
> >libavcodec 58. 54.100 / 58. 54.100
> >libavformat58. 29.100 / 58. 29.100
> >libavdevice58.  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
> >libpostproc55.  5.100 / 55.  5.100
> > Splitting the commandline.
> > Reading option '-i' ... matched as input url with argument 'sample.h264'.
> > 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 'copy'.
> > Reading option '-f' ... matched as option 'f' (force format) with
> > argument 'flv'.
> > Reading option 'rtmp://live-cdg.twitch.tv/app/live_toto
> > socks=192.168.0.217:3128' ... matched as output url.
> > Reading option '-loglevel' ... matched as option 'loglevel' (set
> > logging level) with argument 'debug'.
> > Finished splitting the commandline.
> > Parsing a group of options: global .
> > Applying option loglevel (set logging level) with argument debug.
> > Successfully parsed a group of options.
> > Parsing a group of options: input url sample.h264.
> > Successfully parsed a group of options.
> > Opening an input file: sample.h264.
> > [NULL @ 0x40d24c0] Opening 'sample.h264' for reading
> > [file @ 0x40d2dc0] Setting default whitelist 'file,crypto'
> > [h264 @ 0x40d24c0] Format h264 probed with 

Re: [FFmpeg-user] RTMP and proxy

2020-06-29 Thread Madovsky


On 6/29/2020 10:23 AM, Verachten Bruno wrote:

Hi there,

I'm trying to get ffmpeg to use a proxy. Here is my command:
  ffmpeg -http_proxy "http://192.168.0.217:3128/; -i sample.h264 -c:v
copy -c:a copy -f flv "rtmp://live-cdg.twitch.tv/app/live_toto"
-loglevel debug
ffmpeg version 4.2.3 Copyright (c) 2000-2020 the FFmpeg developers
   built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-39)
   configuration: --pkg-config-flags=--static --prefix=/root/bin
--extra-cflags=-I/root/bin/include --extra-ldflags=-L/root/bin/lib
--extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib
--bindir=/root/bin --enable-debug=3 --disable-debug --enable-gpl
--cpu=native --enable-libfdk-aac --enable-libx264
--extra-libs=-lpthread --enable-nonfree
   libavutil  56. 31.100 / 56. 31.100
   libavcodec 58. 54.100 / 58. 54.100
   libavformat58. 29.100 / 58. 29.100
   libavdevice58.  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
   libpostproc55.  5.100 / 55.  5.100
Splitting the commandline.
Reading option '-http_proxy' ... matched as AVOption 'http_proxy' with
argument 'http://192.168.0.217:3128/'.
Reading option '-i' ... matched as input url with argument 'sample.h264'.
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 'copy'.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'flv'.
Reading option 'rtmp://live-cdg.twitch.tv/app/live_toto' ... matched
as output url.
Reading option '-loglevel' ... matched as option 'loglevel' (set
logging level) with argument 'debug'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input url sample.h264.
Successfully parsed a group of options.
Opening an input file: sample.h264.
[NULL @ 0x2c7a580] Opening 'sample.h264' for reading
[file @ 0x2c7adc0] Setting default whitelist 'file,crypto'
[h264 @ 0x2c7a580] Format h264 probed with size=2048 and score=51
Option http_proxy not found.

Why do I get "option http_proxy not found"?

I tried another way of using the proxy:
  ffmpeg -i sample.h264 -c:v copy -c:a copy -f flv
"rtmp://live-cdg.twitch.tv/app/live_toto socks=192.168.0.217:3128"
-loglevel debug
ffmpeg version 4.2.3 Copyright (c) 2000-2020 the FFmpeg developers
   built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-39)
   configuration: --pkg-config-flags=--static --prefix=/root/bin
--extra-cflags=-I/root/bin/include --extra-ldflags=-L/root/bin/lib
--extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib
--bindir=/root/bin --enable-debug=3 --disable-debug --enable-gpl
--cpu=native --enable-libfdk-aac --enable-libx264
--extra-libs=-lpthread --enable-nonfree
   libavutil  56. 31.100 / 56. 31.100
   libavcodec 58. 54.100 / 58. 54.100
   libavformat58. 29.100 / 58. 29.100
   libavdevice58.  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
   libpostproc55.  5.100 / 55.  5.100
Splitting the commandline.
Reading option '-i' ... matched as input url with argument 'sample.h264'.
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 'copy'.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'flv'.
Reading option 'rtmp://live-cdg.twitch.tv/app/live_toto
socks=192.168.0.217:3128' ... matched as output url.
Reading option '-loglevel' ... matched as option 'loglevel' (set
logging level) with argument 'debug'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input url sample.h264.
Successfully parsed a group of options.
Opening an input file: sample.h264.
[NULL @ 0x40d24c0] Opening 'sample.h264' for reading
[file @ 0x40d2dc0] Setting default whitelist 'file,crypto'
[h264 @ 0x40d24c0] Format h264 probed with size=2048 and score=51
[h264 @ 0x40d24c0] Before avformat_find_stream_info() pos: 0 bytes
read:32768 seeks:0 nb_streams:1
[AVBSFContext @ 0x40d3000] nal_unit_type: 7(SPS), nal_ref_idc: 1
[AVBSFContext @ 0x40d3000] nal_unit_type: 8(PPS), nal_ref_idc: 1
[AVBSFContext @ 0x40d3000] nal_unit_type: 5(IDR), nal_ref_idc: 1
[h264 @ 0x40d3bc0] nal_unit_type: 7(SPS), nal_ref_idc: 1
[h264 @ 0x40d3bc0] nal_unit_type: 8(PPS), nal_ref_idc: 1
[h264 @ 0x40d3bc0] nal_unit_type: 5(IDR), nal_ref_idc: 1
[h264 @ 0x40d3bc0] Format yuv420p chosen by get_format().
[h264 @ 0x40d3bc0] Reinit context to 960x720, pix_fmt: yuv420p
[h264 @ 0x40d3bc0] nal_unit_type: 1(Coded slice of a non-IDR picture),
nal_ref_idc: 

[FFmpeg-user] RTMP and proxy

2020-06-29 Thread Verachten Bruno
Hi there,

I'm trying to get ffmpeg to use a proxy. Here is my command:
 ffmpeg -http_proxy "http://192.168.0.217:3128/; -i sample.h264 -c:v
copy -c:a copy -f flv "rtmp://live-cdg.twitch.tv/app/live_toto"
-loglevel debug
ffmpeg version 4.2.3 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-39)
  configuration: --pkg-config-flags=--static --prefix=/root/bin
--extra-cflags=-I/root/bin/include --extra-ldflags=-L/root/bin/lib
--extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib
--bindir=/root/bin --enable-debug=3 --disable-debug --enable-gpl
--cpu=native --enable-libfdk-aac --enable-libx264
--extra-libs=-lpthread --enable-nonfree
  libavutil  56. 31.100 / 56. 31.100
  libavcodec 58. 54.100 / 58. 54.100
  libavformat58. 29.100 / 58. 29.100
  libavdevice58.  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
  libpostproc55.  5.100 / 55.  5.100
Splitting the commandline.
Reading option '-http_proxy' ... matched as AVOption 'http_proxy' with
argument 'http://192.168.0.217:3128/'.
Reading option '-i' ... matched as input url with argument 'sample.h264'.
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 'copy'.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'flv'.
Reading option 'rtmp://live-cdg.twitch.tv/app/live_toto' ... matched
as output url.
Reading option '-loglevel' ... matched as option 'loglevel' (set
logging level) with argument 'debug'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input url sample.h264.
Successfully parsed a group of options.
Opening an input file: sample.h264.
[NULL @ 0x2c7a580] Opening 'sample.h264' for reading
[file @ 0x2c7adc0] Setting default whitelist 'file,crypto'
[h264 @ 0x2c7a580] Format h264 probed with size=2048 and score=51
Option http_proxy not found.

Why do I get "option http_proxy not found"?

I tried another way of using the proxy:
 ffmpeg -i sample.h264 -c:v copy -c:a copy -f flv
"rtmp://live-cdg.twitch.tv/app/live_toto socks=192.168.0.217:3128"
-loglevel debug
ffmpeg version 4.2.3 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-39)
  configuration: --pkg-config-flags=--static --prefix=/root/bin
--extra-cflags=-I/root/bin/include --extra-ldflags=-L/root/bin/lib
--extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib
--bindir=/root/bin --enable-debug=3 --disable-debug --enable-gpl
--cpu=native --enable-libfdk-aac --enable-libx264
--extra-libs=-lpthread --enable-nonfree
  libavutil  56. 31.100 / 56. 31.100
  libavcodec 58. 54.100 / 58. 54.100
  libavformat58. 29.100 / 58. 29.100
  libavdevice58.  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
  libpostproc55.  5.100 / 55.  5.100
Splitting the commandline.
Reading option '-i' ... matched as input url with argument 'sample.h264'.
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 'copy'.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'flv'.
Reading option 'rtmp://live-cdg.twitch.tv/app/live_toto
socks=192.168.0.217:3128' ... matched as output url.
Reading option '-loglevel' ... matched as option 'loglevel' (set
logging level) with argument 'debug'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input url sample.h264.
Successfully parsed a group of options.
Opening an input file: sample.h264.
[NULL @ 0x40d24c0] Opening 'sample.h264' for reading
[file @ 0x40d2dc0] Setting default whitelist 'file,crypto'
[h264 @ 0x40d24c0] Format h264 probed with size=2048 and score=51
[h264 @ 0x40d24c0] Before avformat_find_stream_info() pos: 0 bytes
read:32768 seeks:0 nb_streams:1
[AVBSFContext @ 0x40d3000] nal_unit_type: 7(SPS), nal_ref_idc: 1
[AVBSFContext @ 0x40d3000] nal_unit_type: 8(PPS), nal_ref_idc: 1
[AVBSFContext @ 0x40d3000] nal_unit_type: 5(IDR), nal_ref_idc: 1
[h264 @ 0x40d3bc0] nal_unit_type: 7(SPS), nal_ref_idc: 1
[h264 @ 0x40d3bc0] nal_unit_type: 8(PPS), nal_ref_idc: 1
[h264 @ 0x40d3bc0] nal_unit_type: 5(IDR), nal_ref_idc: 1
[h264 @ 0x40d3bc0] Format yuv420p chosen by get_format().
[h264 @ 0x40d3bc0] Reinit context to 960x720, pix_fmt: yuv420p
[h264 @ 0x40d3bc0] nal_unit_type: 1(Coded slice of a non-IDR picture),
nal_ref_idc: 1
Last message repeated 5 times
[h264 @ 0x40d24c0] 

[FFmpeg-user] Stream during capture/compress?

2020-06-29 Thread Simon Roberts
I would like to get a live monitor of the output of an ffmpeg process (it's
actually a capture and compress process).

I believe I could achieve this by adding a streaming output, and then
separately starting an ffplay process to display that (I haven't tried this
yet, but have got most of the elements working separately at least).

However, this network layer (even as local loopback) seems like a small,
but undesirable, overhead. Can anyone tell me: a) is my concern entirely
unfounded? and b) is it possible to do this more efficiently, presumably in
the main ffmpeg process? and c) is there some potential benefit to the
local-network-between-two-separate-processes approach that I've not thought
of?

TIA, 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] write output of find_rect to a file?

2020-06-29 Thread Michael Koch

Hi Moritz,



I don't have any good command line for find_rect handy, but it should
work with something like this (untested, of course):

$ ffprobe -f lavfi -i movie=input.mp4,find_rect=options -show_entries 
frame=pkt_pts_time:frame_tags=lavfi.rect.w,lavfi.rect.h,lavfi.rect.x,lavfi.rect.y
 -of csv

In other words, let ffprobe show you each frame's metadata.

You can redirect this output, or have the logging write a report file.


Very good, that's exactly what I need. I did already make some tests 
with -show_entries before I posted this question. But I didn't know the 
names of the variables "lavfi.rect.x" and "lavfi.rect.y". Are these 
variables documented somewhere? Is there also a variable for the quality 
of the find_rect result, I mean the number that's compared against the 
detection threshold?


Michael

___
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] Encoding Warnings

2020-06-29 Thread Moritz Barsnick
On Mon, Jun 29, 2020 at 17:18:51 +0200, Moritz Barsnick wrote:
> $ ffmpeg -i INPUT -map 0:a -af volumedetect -f null -
>
> and will find the absolute maximum of the first audio channel.

I meant: of the first audio *stream*. Sorry.

Moritz
___
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] Encoding Warnings

2020-06-29 Thread Moritz Barsnick
On Mon, Jun 29, 2020 at 10:44:04 -0400, Jim wrote:
> AFAIK, ffmpeg does not have the ability to analyze the volume of every
> sample throughout an audio file, find the greatest amplitude, calculate
> the adjustment needed to make the loudest part of the file the maximum,

It does.

> and then apply that scaled volume adjustment to the entire file.

This makes this a two-pass operation, which your external tool probably
also does. ffmpeg can analyze first:

$ ffmpeg -i INPUT -map 0:a -af volumedetect -f null -

and will find the absolute maximum of the first audio channel. Take the
max value from the log (something like "max_volume: -18.1 dB"[*]), and
use that value for an additionally inserted "volume" audio filter in
your conversion.

$ ffmpeg -i INPUT [...] -af volume="18.1 dB",otherfilters OUTPUT

You thus only have an additional input analysis step.

[*] Documentation says this will not cause any clipping, though I don't
know what the behaviour is, if the volume is massively different across
channels. I *believe* the maximum is safe to use (while the average is
also an average across channels, by some kind of mixdown).

> same question in my searching for a solution to this same message - this
> is the first time I've read this.

(I personally find this confusing as well.)

> (Assuming I don't run into anything weird when processing different
> video formats in the future of course. ;) )  I'm happy, happy, happy
> about that! :) :) :)

We like happy people. :-)

Cheers,
Moritz
___
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] Encoding Warnings

2020-06-29 Thread Jim

Hi Carl

On 06/27/20 06:11, Carl Eugen Hoyos wrote:

Am Fr., 26. Juni 2020 um 21:56 Uhr schrieb Ruler2112 :


Step 3: Standardize Volume
Not performed by ffmpeg

I am curious: Why?

[...]


AFAIK, ffmpeg does not have the ability to analyze the volume of every 
sample throughout an audio file, find the greatest amplitude, calculate 
the adjustment needed to make the loudest part of the file the maximum, 
and then apply that scaled volume adjustment to the entire file.  (While 
this doesn't equalize the volume or eliminate all volume-related 
inconsistencies, it does make the loudest part of each video the same 
and is the best solution I've found; I don't have to re-adjust my volume 
when playing ~95% of the files run through this script.)  I've never 
seen anything about this in the documentation & frankly, it seems like 
it's something esoteric enough to be out of scope for the project.  Am I 
wrong in this regard?




The two lines that are concerning to me are:

  'Guessed Channel Layout for Input Stream #1.0 : stereo'

Of course it's stereo - I jump dumped it to a 2-channel wave in the step 2!
:)
  I'm guessing that I can safely ignore this one

Obviously.
(The wav standard does not require writing the channel layout for some
mono and stereo files and we don't do it to maintain compatibility with
ancient software that fails if the information is present.)


Interesting that this warning is not present in the windows version of 
ffmpeg yet is on Linux.  Any idea why that would be?  Even more 
interesting is your explanation... out of curiosity, what ancient 
software are you referring to?  (Not really important - just curious.)




'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'

This warning is not meant for you and you cannot fix it.


Huh???  If it's not intended for the user and there's no way for the 
user to fix it, I assume it must be a warning specifically for 
developers.  As such, why would it be printed without having some flag 
turned on to print debug warnings???  Never saw it when using the older 
windows version I was running and have found a LOT of people with the 
same question in my searching for a solution to this same message - this 
is the first time I've read this.


An idea just popped into my head... if someone involved with organizing 
the ffmpeg project reads this, you might want to start an 'error code' 
database where people could copy/paste the error they received and it 
would provide them information like this.  It would certainly lighten 
the volume of repeated questions/problems to the mailing list and other 
forums.  I pride myself on finding & fixing problems myself and only ask 
for help when I see no other choice; I'm glad I gave up on this when I 
did!  A search of the mailing list archives for "timestamps are unset in 
a packet" came back with over 70 hits, and that doesn't include hits 
from all the other different forums I found.  (Hopefully, each of those 
people didn't waste as much time as I did chasing a problem they had no 
hope of fixing.)  I'm sure other errors are even more commonly repeated; 
a database of error messages could help reduce such repetition.  Just an 
idea.




For future questions: Please understand that posting excerpts of the
console output is not acceptable, always post the command line(s)
together with the complete, uncut console output.


The output of the commands was complete except for version & library 
information, which were identical for every command.  Please accept my 
apologies for not repeating the same information every time - I was just 
trying to shorten an already lengthy message by putting the version 
information once and eliminating redundant information throughout the 
rest of the message.


Thank you so much for your response Carl.  The information you provided 
means that my script to reprocess video files on Linux is complete!  
(Assuming I don't run into anything weird when processing different 
video formats in the future of course. ;) )  I'm happy, happy, happy 
about that! :) :) :)


Jim

___
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] write output of find_rect to a file?

2020-06-29 Thread Moritz Barsnick
Hi Michael,

On Mon, Jun 29, 2020 at 13:24:30 +0200, Michael Koch wrote:
> Hello,
>
> I want to track an object and need the x,y coordinates of this object
> for each frame.
> Is it possible to write the output of the find_rect filter to a file?

I don't have any good command line for find_rect handy, but it should
work with something like this (untested, of course):

$ ffprobe -f lavfi -i movie=input.mp4,find_rect=options -show_entries 
frame=pkt_pts_time:frame_tags=lavfi.rect.w,lavfi.rect.h,lavfi.rect.x,lavfi.rect.y
 -of csv

In other words, let ffprobe show you each frame's metadata.

You can redirect this output, or have the logging write a report file.

Cheers,
Moritz
___
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] aresample in_channel_layout has no effect

2020-06-29 Thread Christian Ebert

Hi,

I'm trying to downsample 4 channel (unknown layout) pcm to
stereo. However, aresample's in_channel_layout option has no
effect:

$ ffmpeg -report -guess_layout_max 0 -i 4ac.wav -filter:a 
aresample=in_channel_layout=4.0:out_channel_layout=stereo -c:a pcm_s16le -y 
out.wav
ffmpeg started on 2020-06-29 at 14:53:17
Report written to "ffmpeg-20200629-145317.log"
Log level: 48
ffmpeg version N-98130-g38737b3d4e Copyright (c) 2000-2020 the FFmpeg developers
  built with Apple clang version 11.0.0 (clang-1100.0.33.17)
  configuration: --enable-gpl --enable-nonfree --enable-shared --enable-openssl 
--enable-pic --enable-libspeex --enable-libopus --enable-libfdk-aac 
--enable-libx265 --enable-libx264 --enable-libmp3lame --enable-libbluray 
--enable-libtheora --enable-libvorbis --enable-libvpx --enable-libvidstab 
--enable-libfreetype --enable-libzimg --enable-libass 
--extra-cflags=-I/opt/sw/include --extra-libs='-L/opt/sw/lib 
-L/opt/sw/lib/freetype219/lib -L/opt/sw/lib/gcc9/lib' --disable-htmlpages
  libavutil  56. 54.100 / 56. 54.100
  libavcodec 58. 92.100 / 58. 92.100
  libavformat58. 46.101 / 58. 46.101
  libavdevice58. 11.100 / 58. 11.100
  libavfilter 7. 86.100 /  7. 86.100
  libswscale  5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
  libpostproc55.  8.100 / 55.  8.100
Input #0, wav, from '4ac.wav':
  Metadata:
encoder : Lavf58.46.101
  Duration: 00:00:12.00, bitrate: 3072 kb/s
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, 4 
channels, s16, 3072 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s16le (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, wav, to 'out.wav':
  Metadata:
ISFT: Lavf58.46.101
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, 
s16, 1536 kb/s
Metadata:
  encoder : Lavc58.92.100 pcm_s16le
size=2250kB time=00:00:12.00 bitrate=1536.1kbits/s speed= 387x
video:0kB audio:2250kB subtitle:0kB other streams:0kB global headers:0kB muxing 
overhead: 0.003385%
$ grep -A 2 Matrix ffmpeg-20200629-145317.log
[Parsed_aresample_0 @ 0x7fc03e500a40] [SWR @ 0x1110fe000] Matrix coefficients:
[Parsed_aresample_0 @ 0x7fc03e500a40] [SWR @ 0x1110fe000] FL: FL:0.453082 
FR:0.00 FC:0.320377 BC:0.226541
[Parsed_aresample_0 @ 0x7fc03e500a40] [SWR @ 0x1110fe000] FR: FL:0.00 
FR:0.453082 FC:0.320377 BC:0.226541

$ ffmpeg -report -guess_layout_max 0 -i 4ac.wav -filter:a 
aresample=in_channel_layout=quad:out_channel
_layout=stereo -c:a pcm_s16le -y out.wav
ffmpeg started on 2020-06-29 at 14:59:13
Report written to "ffmpeg-20200629-145913.log"
Log level: 48
ffmpeg version N-98130-g38737b3d4e Copyright (c) 2000-2020 the FFmpeg developers
  built with Apple clang version 11.0.0 (clang-1100.0.33.17)
  configuration: --enable-gpl --enable-nonfree --enable-shared --enable-openssl 
--enable-pic --enable-libspeex --enable-libopus --enable-libfdk-aac 
--enable-libx265 --enable-libx264 --enable-libmp3lame --enable-libbluray 
--enable-libtheora --enable-libvorbis --enable-libvpx --enable-libvidstab 
--enable-libfreetype --enable-libzimg --enable-libass 
--extra-cflags=-I/opt/sw/include --extra-libs='-L/opt/sw/lib 
-L/opt/sw/lib/freetype219/lib -L/opt/sw/lib/gcc9/lib' --disable-htmlpages
  libavutil  56. 54.100 / 56. 54.100
  libavcodec 58. 92.100 / 58. 92.100
  libavformat58. 46.101 / 58. 46.101
  libavdevice58. 11.100 / 58. 11.100
  libavfilter 7. 86.100 /  7. 86.100
  libswscale  5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
  libpostproc55.  8.100 / 55.  8.100
Input #0, wav, from '4ac.wav':
  Metadata:
encoder : Lavf58.46.101
  Duration: 00:00:12.00, bitrate: 3072 kb/s
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, 4 
channels, s16, 3072 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s16le (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, wav, to 'out.wav':
  Metadata:
ISFT: Lavf58.46.101
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, 
s16, 1536 kb/s
Metadata:
  encoder : Lavc58.92.100 pcm_s16le
size=2250kB time=00:00:12.00 bitrate=1536.1kbits/s speed= 375x
video:0kB audio:2250kB subtitle:0kB other streams:0kB global headers:0kB muxing 
overhead: 0.003385%
$ grep -A 2 Matrix ffmpeg-20200629-145913.log
[Parsed_aresample_0 @ 0x7feeca404380] [SWR @ 0x111d48000] Matrix coefficients:
[Parsed_aresample_0 @ 0x7feeca404380] [SWR @ 0x111d48000] FL: FL:0.453082 
FR:0.00 FC:0.320377 BC:0.226541
[Parsed_aresample_0 @ 0x7feeca404380] [SWR @ 0x111d48000] FR: FL:0.00 
FR:0.453082 FC:0.320377 BC:0.226541

Matrix coefficients for icl 4.0 and quad, or for any other 4
channel layout are exactly the same,

What am I overlooking?

Something like aresample=ocl=quad,aresample=ocl=stereo yields a
different matrix, but what is the point of in_channel_layout
the

Re: [FFmpeg-user] extract first 26 seconds not workings as expected

2020-06-29 Thread Leonardo via ffmpeg-user
Hello

>You may want to try the option "-copyinkf" ("copy initial

>non-keyframes") when using "-c copy".

 I tried with this option, but the extracted part was "grayed" at the beginning.


The only workaround that I found that worked was


$ ffmpeg -i main.mp4 -vf "trim=start=0:end=26" part1.mp4

but re-encoded is needed.

As you pointed out, the file has 23.80 fps, and this may be the problem.

I created a sample video (53.63 seconds) if someone want to try some code on it.


The video of the original post and this one were created using 
SimpleScreenRecorder

Perhaps some configuration on the GUI is not properly set to produce a "good 
video file".
Will try to play with it a bit.

Kind regard,
Leonardo
  
___
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] What version of ffmpeg is compatible with libvpx 1.5.0?

2020-06-29 Thread CESAR MURILO DA SILVA JUNIOR
Hello, Motitz

 See the output of the command:

 root@darkstar:~# ffmpeg -codecs | grep libvpx
ffmpeg version 3.2.4 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 5.5.0 (GCC)
  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64
--docdir=/usr/doc/ffmpeg-3.2.4/html --mandir=/usr/man --disable-debug
--enable-shared --disable-static --enable-gpl --enable-version3
--enable-avresample --arch=x86_64 --enable-libfontconfig
--enable-libfreetype --enable-libfribidi --enable-gnutls --enable-libcaca
--enable-libcdio --enable-libspeex --enable-libssh --enable-libtheora
--enable-libv4l2 --enable-libvorbis --enable-libvpx --enable-libx264
--enable-libmp3lame --enable-opengl --enable-libopenjpeg --enable-libpulse
--enable-libsmbclient --enable-libwavpack --enable-x11grab
  libavutil  55. 34.101 / 55. 34.101
  libavcodec 57. 64.101 / 57. 64.101
  libavformat57. 56.101 / 57. 56.101
  libavdevice57.  1.100 / 57.  1.100
  libavfilter 6. 65.100 /  6. 65.100
  libavresample   3.  1.  0 /  3.  1.  0
  libswscale  4.  2.100 /  4.  2.100
  libswresample   2.  3.100 /  2.  3.100
  libpostproc54.  1.100 / 54.  1.100
 DEV.L. vp8  On2 VP8 (decoders: vp8 libvpx ) (encoders:
libvpx )
 DEV.L. vp9  Google VP9 (decoders: vp9 libvpx-vp9 )
(encoders: libvpx-vp9 )

 However, when trying to record on the simplescreenrecorder the error
appears:

[VideoEncoder::PrepareStream] Usando formato de pixel yuv420.
[libvpx @ 0x129dd00] v1.5.0
[libvpx @ 0x129dd00] Failed to initialize encoder: ABI version mismatch
[BaseEncoder::Init] Erro: Não foi possível abrir o o codec!
[PageRecord::StartOutput] Erro: Ocorreu um erro durante a inicialização.

Thanks
*César Murilo da Silva Júnior*
*Téc. Oper. Monit. Computadores Help Desk | Redes e Segurança*
*UNIPAM - Centro Universitário de Patos de Minas*
*T1: 34 3823 0131 | T2: 34 3823 0120 | T3: 34 3823 0356 | C: 34 9 9220 5680*

*cesa...@unipam.edu.br *
 
 







Em seg., 29 de jun. de 2020 às 07:07, Moritz Barsnick 
escreveu:

> On Sun, Jun 28, 2020 at 22:40:39 -0300, CESAR MURILO DA SILVA JUNIOR wrote:
> > I use OS Slackware 14.2, and for it there is libvpx 1.5.0. Which version
> of
> > ffmpeg is supported?
>
> ffmpeg has supported libvpx 1.5.0 for a very long time, and still does.
>
> > I currently have ffmpeg 3.2.4 and wanted to record
> > video with the simplescreenrecorder version 0.4.2, but says that the
> > library is not compatible with the codec.
>
> Who says that, and what does it say?
>
> ffmpeg needs to be compiled with support for libvpx. Perhaps yours
> isn't, but I cannot guess without more detail.
>
> If simplescreenrecorder uses the same ffmpeg libraries as your ffmpeg
> command line tool, you can check with
> $ ffmpeg -codecs
> and check whether libvpx is listed.
>
> (ffmpeg 3.2.4 is very old. If simplescreenrecorder supports anything
> recent, please try to use a new version of ffmpeg.)
>
> Moritz
> ___
> 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 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] write output of find_rect to a file?

2020-06-29 Thread Michael Koch

Hello,

I want to track an object and need the x,y coordinates of this object 
for each frame.

Is it possible to write the output of the find_rect filter to a file?

Michael

___
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] Sound level measuring on the 2nd audio stream

2020-06-29 Thread Nicolas George
Alex (12020-06-29):
> The documentation (https://ffmpeg.org/ffmpeg-filters.html#astats-1) says
> that it's possible to set the channel number (starting from 1) or string
^^^
> 'Overall' for the integral value. I decided to print levels for 1st and
> 2nd audio streams separately and overall levels finally. Here is the
^^^
> command:

Channels and streams are not the same thing.

You need (1) to convince amovie to decode several streams from you file,
(2) to write the filter graph to use both the streams, each in its own
volume detection filters, (3) add the necessary to get the result in
ffprobe's output.

http://ffmpeg.org/ffmpeg-all.html#amovie
http://ffmpeg.org/ffmpeg-all.html#Filtergraph-description

Regards,

-- 
  Nicolas George


signature.asc
Description: PGP signature
___
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] Sound level measuring on the 2nd audio stream

2020-06-29 Thread Paul B Mahol
On 6/29/20, Alex  wrote:
> Hi All!
> I faced difficulties while trying to measure sound level for a
> multimedia file with multiple audio streams. Here is the background:
>
> 1) ffmpeg 4.2.2 and it was used in different OS (Windows, FreeBSD).
>
> 2) The source file:
>
> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test1.mov':
>   Metadata:
> major_brand : qt
> minor_version   : 537199360
> compatible_brands: qt
> creation_time   : 2020-05-05T09:48:02.00Z
>   Duration: 01:01:15.04, start: 0.00, bitrate: 29791 kb/s
> Stream #0:0(eng): Video: mpeg2video (Main) (xdvc / 0x63766478),
> yuv420p(tv, bt709, top coded first (swapped)), 1920x1080 [SAR 1:1 DAR
> 16:9], 26715 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc (default)
> Metadata:
>   creation_time   : 2020-05-05T09:48:02.00Z
>   handler_name: Apple Video Media Handler
>   encoder : XDCAM EX 1080i50 (35 Mb/s VBR)
>   timecode: 00:00:00:00
> Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz,
> stereo, s16, 1536 kb/s (default)
> Metadata:
>   creation_time   : 2020-05-05T09:48:02.00Z
>   handler_name: Apple Sound Media Handler
>   timecode: 00:00:00:00
> Stream #0:2(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz,
> stereo, s16, 1536 kb/s (default)
> Metadata:
>   creation_time   : 2020-05-05T09:48:02.00Z
>   handler_name: Apple Sound Media Handler
>   timecode: 00:00:00:00
> Stream #0:3(eng): Data: none (tmcd / 0x64636D74) (default)
> Metadata:
>   creation_time   : 2020-05-05T11:14:47.00Z
>   handler_name: Time Code Media Handler
>   timecode: 00:00:00:00
> Unsupported codec with id 0 for input stream 3
>
> And the stream #0:2 is empty (no sound at all)! This is important.
>
> 3) The way I used to measure the sound level:
> https://stackoverflow.com/questions/38056970/ffmpeg-txt-from-audio-levels
>
> The documentation (https://ffmpeg.org/ffmpeg-filters.html#astats-1) says
> that it's possible to set the channel number (starting from 1) or string
> 'Overall' for the integral value. I decided to print levels for 1st and
> 2nd audio streams separately and overall levels finally. Here is the
> command:
>
> ffprobe -hide_banner -f lavfi -i
> amovie=test1.mov,astats=metadata=1:reset=1 -show_entries
> frame=pkt_pts_time:frame_tags=lavfi.astats.1.Peak_level,lavfi.astats.2.Peak_level,lavfi.astats.Overall.Peak_level
> -of csv=p=0
>
> And here is what I see:
>
> [mov,mp4,m4a,3gp,3g2,mj2 @ 0x80557b600] st: 0 edit list: 1 Missing key
> frame while searching for timestamp: 0
> [mov,mp4,m4a,3gp,3g2,mj2 @ 0x80557b600] st: 0 edit list 1 Cannot find an
> index entry before timestamp: 0.
> Input #0, lavfi, from
> 'amovie=/mnt/playout6/Playout/Trinity/Exxxotica/Media/test1.mov,astats=metadata=1:reset=1':
>   Duration: N/A, start: 0.00, bitrate: 1536 kb/s
> Stream #0:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
> 0.00,-inf,-inf,-inf
> 0.021333,-inf,-inf,-inf
> 0.042667,-inf,-inf,-inf
> 0.064000,-inf,-inf,-inf
> 0.085333,-inf,-inf,-inf
> 0.106667,-inf,-inf,-inf
> 0.128000,-inf,-inf,-inf
> 0.149333,-inf,-inf,-inf
> 0.170667,-inf,-inf,-inf
> 0.192000,-inf,-inf,-inf
> 0.21,-inf,-inf,-inf
> 0.234667,-inf,-inf,-inf
> 0.256000,-inf,-inf,-inf
> 0.277333,-inf,-inf,-inf
> 0.298667,-inf,-inf,-inf
> 0.32,-inf,-inf,-inf
> 0.341333,-40.124683,-48.232659,-40.124683
> 0.362667,-24.450328,-20.442361,-20.442361
> 0.384000,-15.920450,-15.235541,-15.235541
> 0.405333,-17.108509,-13.644516,-13.644516
> 0.426667,-15.176011,-13.778167,-13.778167
> 0.448000,-14.284777,-14.921187,-14.284777
> 0.469333,-14.353691,-13.147619,-13.147619
> 0.490667,-15.612737,-13.749723,-13.749723
> 0.512000,-15.577617,-14.215043,-14.215043
> 0.53,-15.476248,-14.472115,-14.472115
> 0.554667,-15.115377,-11.835565,-11.835565
> 0.576000,-15.372937,-13.422919,-13.422919
> 0.597333,-5.541789,-4.610649,-4.610649
> 0.618667,-13.954783,-10.754262,-10.754262
> 0.64,-12.198213,-13.178989,-12.198213
> 0.661333,-13.894198,-14.257364,-13.894198
> 0.682667,-14.118886,-12.640048,-12.640048
> 0.704000,-13.659833,-14.141813,-13.659833
> 0.725333,-17.131342,-16.504812,-16.504812
> 0.746667,-18.004467,-18.494126,-18.004467
> 0.768000,-14.940412,-16.608238,-14.940412
> 0.789333,-13.574658,-13.259134,-13.259134
> 0.810667,-12.985351,-13.042276,-12.985351
> 0.832000,-9.460374,-9.366353,-9.366353
> 0.85,-13.081630,-10.817579,-10.817579
> 0.874667,-14.097363,-15.270840,-14.097363
> 0.896000,-15.432269,-13.685421,-13.685421
> 0.917333,-16.315447,-14.210959,-14.210959
> 0.938667,-14.378635,-13.564543,-13.564543
> ...
>
> It is a lie. The second audio stream is totally silent from the
> beginning to the end. Also, note that ffprobe mentioned the only audio
> stream and it was #0:0. Why?
>
> I decided to test audio streams separately and copied them to separate
> files, then checked the sound level. For the first stream:

Re: [FFmpeg-user] extract first 26 seconds not workings as expected

2020-06-29 Thread Moritz Barsnick
On Sun, Jun 28, 2020 at 18:31:15 +, Leonardo via ffmpeg-user wrote:
> $ ffmpeg -i main.mp4 -ss 00:00:00.00 -t 00:00:26.00 -c copy part1.mp4
[...]
> frame=  322 fps=0.0 q=-1.0 Lsize= 523kB time=00:00:25.95 bitrate= 
> 165.2kbits/s speed=8.19e+03x    
> video:519kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB 
> muxing overhead: 0.881877%

322 frames at 23.8 fps looks suspiciously like 13.5 seconds.

> However, file part1.mp4 has only 13 seconds!
>   Duration: 00:00:13.42, start: 12.666016, bitrate: 319 kb/s

13.42 + 12.66 is approximately 25.

So my guess is that your input file's first keyframe is at 12.66
seconds, and ffmpeg refuses to copy the frames before that one.

You may want to try the option "-copyinkf" ("copy initial
non-keyframes") when using "-c copy".

> Also, how can I cut one part that begins at 00:01:00 and ends at 00:02:16 ?

How about "-ss 00:01:00 -t 1:16"? (I'm also not sure how this behaves
without keyframes, and whether that segment will ever be playable.)

Moritz
___
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] libaom - first frame not lossless when > 7 frames in source

2020-06-29 Thread Kieran O Leary
On Sun, Jun 7, 2020 at 10:08 PM Kieran O Leary 
wrote:

>
>
> On Sun, Jun 7, 2020 at 10:06 PM pdr0  wrote:
>
>> Intra only compression , using -g 1 makes it lossless . Maybe a clue there
>>
>
> Aye - I can confirm that -g 1 produces matching framemd5s.
>

Just checking in on this issue - any ideas? Should I raise a bug ticket as
the next step or is this thread enough?

K

>
___
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] Sound level measuring on the 2nd audio stream

2020-06-29 Thread Alex
Hi All!
I faced difficulties while trying to measure sound level for a
multimedia file with multiple audio streams. Here is the background:

1) ffmpeg 4.2.2 and it was used in different OS (Windows, FreeBSD).

2) The source file:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test1.mov':
  Metadata:
    major_brand : qt
    minor_version   : 537199360
    compatible_brands: qt
    creation_time   : 2020-05-05T09:48:02.00Z
  Duration: 01:01:15.04, start: 0.00, bitrate: 29791 kb/s
    Stream #0:0(eng): Video: mpeg2video (Main) (xdvc / 0x63766478),
yuv420p(tv, bt709, top coded first (swapped)), 1920x1080 [SAR 1:1 DAR
16:9], 26715 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc (default)
    Metadata:
  creation_time   : 2020-05-05T09:48:02.00Z
  handler_name    : Apple Video Media Handler
  encoder : XDCAM EX 1080i50 (35 Mb/s VBR)
  timecode    : 00:00:00:00
    Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz,
stereo, s16, 1536 kb/s (default)
    Metadata:
  creation_time   : 2020-05-05T09:48:02.00Z
  handler_name    : Apple Sound Media Handler
  timecode    : 00:00:00:00
    Stream #0:2(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz,
stereo, s16, 1536 kb/s (default)
    Metadata:
  creation_time   : 2020-05-05T09:48:02.00Z
  handler_name    : Apple Sound Media Handler
  timecode    : 00:00:00:00
    Stream #0:3(eng): Data: none (tmcd / 0x64636D74) (default)
    Metadata:
  creation_time   : 2020-05-05T11:14:47.00Z
  handler_name    : Time Code Media Handler
  timecode    : 00:00:00:00
Unsupported codec with id 0 for input stream 3

And the stream #0:2 is empty (no sound at all)! This is important.

3) The way I used to measure the sound level:
https://stackoverflow.com/questions/38056970/ffmpeg-txt-from-audio-levels

The documentation (https://ffmpeg.org/ffmpeg-filters.html#astats-1) says
that it's possible to set the channel number (starting from 1) or string
'Overall' for the integral value. I decided to print levels for 1st and
2nd audio streams separately and overall levels finally. Here is the
command:

ffprobe -hide_banner -f lavfi -i
amovie=test1.mov,astats=metadata=1:reset=1 -show_entries
frame=pkt_pts_time:frame_tags=lavfi.astats.1.Peak_level,lavfi.astats.2.Peak_level,lavfi.astats.Overall.Peak_level
-of csv=p=0

And here is what I see:

[mov,mp4,m4a,3gp,3g2,mj2 @ 0x80557b600] st: 0 edit list: 1 Missing key
frame while searching for timestamp: 0
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x80557b600] st: 0 edit list 1 Cannot find an
index entry before timestamp: 0.
Input #0, lavfi, from
'amovie=/mnt/playout6/Playout/Trinity/Exxxotica/Media/test1.mov,astats=metadata=1:reset=1':
  Duration: N/A, start: 0.00, bitrate: 1536 kb/s
    Stream #0:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
0.00,-inf,-inf,-inf
0.021333,-inf,-inf,-inf
0.042667,-inf,-inf,-inf
0.064000,-inf,-inf,-inf
0.085333,-inf,-inf,-inf
0.106667,-inf,-inf,-inf
0.128000,-inf,-inf,-inf
0.149333,-inf,-inf,-inf
0.170667,-inf,-inf,-inf
0.192000,-inf,-inf,-inf
0.21,-inf,-inf,-inf
0.234667,-inf,-inf,-inf
0.256000,-inf,-inf,-inf
0.277333,-inf,-inf,-inf
0.298667,-inf,-inf,-inf
0.32,-inf,-inf,-inf
0.341333,-40.124683,-48.232659,-40.124683
0.362667,-24.450328,-20.442361,-20.442361
0.384000,-15.920450,-15.235541,-15.235541
0.405333,-17.108509,-13.644516,-13.644516
0.426667,-15.176011,-13.778167,-13.778167
0.448000,-14.284777,-14.921187,-14.284777
0.469333,-14.353691,-13.147619,-13.147619
0.490667,-15.612737,-13.749723,-13.749723
0.512000,-15.577617,-14.215043,-14.215043
0.53,-15.476248,-14.472115,-14.472115
0.554667,-15.115377,-11.835565,-11.835565
0.576000,-15.372937,-13.422919,-13.422919
0.597333,-5.541789,-4.610649,-4.610649
0.618667,-13.954783,-10.754262,-10.754262
0.64,-12.198213,-13.178989,-12.198213
0.661333,-13.894198,-14.257364,-13.894198
0.682667,-14.118886,-12.640048,-12.640048
0.704000,-13.659833,-14.141813,-13.659833
0.725333,-17.131342,-16.504812,-16.504812
0.746667,-18.004467,-18.494126,-18.004467
0.768000,-14.940412,-16.608238,-14.940412
0.789333,-13.574658,-13.259134,-13.259134
0.810667,-12.985351,-13.042276,-12.985351
0.832000,-9.460374,-9.366353,-9.366353
0.85,-13.081630,-10.817579,-10.817579
0.874667,-14.097363,-15.270840,-14.097363
0.896000,-15.432269,-13.685421,-13.685421
0.917333,-16.315447,-14.210959,-14.210959
0.938667,-14.378635,-13.564543,-13.564543
...

It is a lie. The second audio stream is totally silent from the
beginning to the end. Also, note that ffprobe mentioned the only audio
stream and it was #0:0. Why?

I decided to test audio streams separately and copied them to separate
files, then checked the sound level. For the first stream:

ffmpeg -hide_banner -i test1.mov -ss 00:01:00 -t 00:01:00 -map 0:a:0
test1.mp3

ffprobe -hide_banner -f lavfi -i
amovie=test1.mp3,astats=metadata=1:reset=1 -show_entries
frame=pkt_pts_time:frame_tags=lavfi.astats.1.RMS_level -of csv=p=0

The result is 

Re: [FFmpeg-user] Catching all error warnings via ffprobe

2020-06-29 Thread Kieran O Leary
Hi - I've done some more tests and either I'm missing something here or
perhaps this is a bug? It seems like only video errors appear in the JSON,
not audio.
I bumped up the loglevel, added and -show_error and I'm still not seeing
the mp2 header issues appear in the json.
For example this appears in the terminal:

[mpegts @ 023d706538c0] Continuity check failed for pid 2069 expected 7
got 0
[mpegts @ 023d706538c0] Continuity check failed for pid 2068 expected
10 got 9
[mpegts @ 023d706538c0] PES packet size mismatch
[mpegts @ 023d706538c0] Packet corrupt (stream = 1, dts = 203200560).
[mp2 @ 023d70767e40] Header missing

but I see no errors in the audio frames section of the JSON output:
{
"media_type": "audio",
"stream_index": 1,
"key_frame": 1,
"pkt_pts": 203200560,
"pkt_pts_time": "0:37:37.784000",
"pkt_dts": 203200560,
"pkt_dts_time": "0:37:37.784000",
"best_effort_timestamp": 203200560,
"best_effort_timestamp_time": "0:37:37.784000",
"pkt_duration": 2160,
"pkt_duration_time": "0:00:00.024000",
"pkt_pos": "7371266244",
"pkt_size": "1152",
"sample_fmt": "s16p",
"nb_samples": 1152,
"channels": 2,
"channel_layout": "stereo"
},

It seems that any errors for the audio streams are not making their way
into the JSON, but the video errors are, as per my last email.
Any guidance on how I can get these audio errors into the JSON  - am I
missing a command or is this a bug?

ffprobe -loglevel 48 -sexagesimal D:\IFI_Batch_10\MV8805\MV8805.m2t
-show_error -show_log 48 -show_frames -of json > error.json
ffprobe version N-96643-g2942b00285-g2383021a7a+1 Copyright (c) 2007-2020
the FFmpeg developers
  built with gcc 9.2.0 (Rev2, Built by MSYS2 project)
  configuration:  --disable-autodetect --enable-amf --enable-bzlib
--enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-iconv
--enable-lzma --enable-nvenc --enable-zlib --enable-sdl2 --enable-ffnvcodec
--enable-nvdec --enable-cuda-llvm --enable-libmp3lame --enable-libopus
--enable-libvorbis --enable-libx264 --enable-libdav1d --disable-debug
--enable-fontconfig --enable-libass --enable-libbluray --enable-libfreetype
--enable-libmfx --enable-libmysofa --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopenjpeg --enable-libsnappy
--enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame
--enable-libvidstab --enable-libvo-amrwbenc --enable-libwavpack
--enable-libwebp --enable-libxml2 --enable-libzimg --enable-libshine
--enable-gpl --enable-avisynth --enable-libxvid --enable-libaom
--enable-libopenmpt --enable-version3 --enable-openssl
--extra-cflags=-DLIBTWOLAME_STATIC --extra-libs=-lstdc++
--extra-cflags=-DLIBXML_STATIC --extra-libs=-liconv --enable-nonfree
  libavutil  56. 39.100 / 56. 39.100
  libavcodec 58. 67.101 / 58. 67.101
  libavformat58. 37.100 / 58. 37.100
  libavdevice58.  9.103 / 58.  9.103
  libavfilter 7. 74.100 /  7. 74.100
  libswscale  5.  6.100 /  5.  6.100
  libswresample   3.  6.100 /  3.  6.100
  libpostproc55.  6.100 / 55.  6.100
[NULL @ 025ad4843580] Opening 'D:\IFI_Batch_10\MV8805\MV8805.m2t' for
reading
[file @ 025ad308b000] Setting default whitelist 'file,crypto,data'
[mpegts @ 025ad4843580] Format mpegts probed with size=2048 and score=50
[mpegts @ 025ad4843580] stream=0 stream_type=2 pid=810
prog_reg_desc=TSHV
[mpegts @ 025ad4843580] stream=1 stream_type=3 pid=814
prog_reg_desc=TSHV
[mpegts @ 025ad4843580] stream=2 stream_type=a0 pid=815
prog_reg_desc=TSHV
[mpegts @ 025ad4843580] stream=3 stream_type=a1 pid=811
prog_reg_desc=TSHV
[mpegts @ 025ad4843580] Before avformat_find_stream_info() pos: 0 bytes
read:32768 seeks:0 nb_streams:4
[mpegts @ 025ad4843580] parser not found for codec none, packets or
times may be invalid.
Last message repeated 1 times
[mpeg2video @ 025ad4844480] Invalid frame dimensions 0x0.
Last message repeated 1 times
[mpeg2video @ 025ad4844480] Format yuv420p chosen by get_format().
[mpegts @ 025ad4843580] parser not found for codec none, packets or
times may be invalid.
Last message repeated 1 times
[mpegts @ 025ad4843580] Probe buffer size limit of 500 bytes reached
[mpegts @ 025ad4843580] PES packet size mismatch
[mpegts @ 025ad4843580] Packet corrupt (stream = 1, dts = 314015040).
[mpegts @ 025ad4843580] Could not find codec parameters for stream 2
(Unknown: none ([160][0][0][0] / 0x00A0)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize'
options
[mpegts @ 025ad4843580] Could not find codec parameters for stream 3
(Unknown: none ([161][0][0][0] / 0x00A1)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize'
options
[mpegts @ 025ad4843580] After 

Re: [FFmpeg-user] What version of ffmpeg is compatible with libvpx 1.5.0?

2020-06-29 Thread Moritz Barsnick
On Sun, Jun 28, 2020 at 22:40:39 -0300, CESAR MURILO DA SILVA JUNIOR wrote:
> I use OS Slackware 14.2, and for it there is libvpx 1.5.0. Which version of
> ffmpeg is supported?

ffmpeg has supported libvpx 1.5.0 for a very long time, and still does.

> I currently have ffmpeg 3.2.4 and wanted to record
> video with the simplescreenrecorder version 0.4.2, but says that the
> library is not compatible with the codec.

Who says that, and what does it say?

ffmpeg needs to be compiled with support for libvpx. Perhaps yours
isn't, but I cannot guess without more detail.

If simplescreenrecorder uses the same ffmpeg libraries as your ffmpeg
command line tool, you can check with
$ ffmpeg -codecs
and check whether libvpx is listed.

(ffmpeg 3.2.4 is very old. If simplescreenrecorder supports anything
recent, please try to use a new version of ffmpeg.)

Moritz
___
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".