[FFmpeg-user] Audio sample format in alsa?

2020-06-30 Thread Simon Roberts
I'm trying to grab audio from a USB device that's managed by alsa. I find
that if I configure pulse to use this device, then I can grab successfully
with:

ffmpeg -f alsa -i pulse audiotest.mp3

But I need to refer to the hardware device directly, and I'm failing to do
that.

I have these cards:

$ cat /proc/asound/cards
 0 [HDMI   ]: HDA-Intel - HDA Intel HDMI
  HDA Intel HDMI at 0xf7e34000 irq 44
 1 [UA3FX  ]: USB-Audio - UA-3FX
  EDIROL UA-3FX at usb-:00:14.0-3, full speed
 2 [PCH]: HDA-Intel - HDA Intel PCH
  HDA Intel PCH at 0xf7e3 irq 43

and these devices:

$ cat /proc/asound/devices
  1:: sequencer
  2: [ 1]   : control
  3: [ 1- 0]: digital audio playback
  4: [ 1- 0]: digital audio capture
  5: [ 1- 1]: digital audio playback
  6: [ 0]   : control
  7: [ 0- 3]: digital audio playback
  8: [ 0- 7]: digital audio playback
  9: [ 0- 8]: digital audio playback
 10: [ 0- 9]: digital audio playback
 11: [ 0- 0]: hardware dependent
 12: [ 2]   : control
 13: [ 2- 0]: digital audio playback
 14: [ 2- 0]: digital audio capture
 15: [ 2- 0]: hardware dependent
 33:: timer

But when I try:

$ ffmpeg -f alsa -i hw:1,0 audiotest.mp3

I get:
[alsa @ 0x55ac7254fd80] cannot set sample format 0x1 2 (Invalid
argument)
hw:1,0: Input/output error

But I'm not sure where to start with configuring this sample format. Can
someone point me in the right direction? I didn't find much in the alsa
section of the online manual.

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] Low CPU HQ format for local streaming?

2020-06-30 Thread Simon Roberts
>
>
>
> > I need to find an encoding, and presumably a file type, that a) works in
> a
> > streaming format, and b) is as low CPU usage as possible. I don't
> believe I
> > care about bandwidth, this is just shipped from one process to another
> and
> > consumed in real time.
> >
> > I tried using rawvideo, but it crashes out. To distinguish the encoding
> > side from the decoding side, I used this command line:
> >
> > ffmpeg -i capture-4chan.mov -c:v rawvideo -f mpegts - | cat /dev/null
> >
>


> That happens because rawvideo is not a supported video codec in
> MPEG-TS.
>


> And apparently neither are prores nor PCM audio supported codecs.
>
> If you stream from ffmpeg to ffplay, the "nut" format may be a choice
> for you. It streams well, and it handles rawvideo as well as prores and
> PCM audio (I just tested with all of these).
>

This is all most helpful thank you! Being able to ship rawvideo across the
system bus rather than compressing it solely to decompress it again has
definitely reduced the CPU usage (though mpeg1video was quite low too and
an acceptable image for the purpose) so absent anything unexpected I think
this will be the route I take.

Many thanks Carl and 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] doubt with hardware acceleration

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

I'm trying to speed up conversion using hardware acceleration and the 
improvement is amazing but there a kind of "warning" when using ffmpeg that I 
would like to "remove".


Command and output:


$ ffmpeg -vaapi_device /dev/dri/renderD128 -i test.mp4 -vf 
'hwupload,scale_vaapi=w=1280:h=720:format=nv12' -c:v h264_vaapi -qp 18 
test_hw.mp4ffmpeg 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
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mp4':
  Metadata:
    major_brand : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder : Lavf58.47.100
  Duration: 00:00:20.73, start: 0.00, bitrate: 963 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 
1366x768, 762 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
    Metadata:
  handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, 
fltp, 192 kb/s (default)
    Metadata:
  handler_name    : SoundHandler
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_vaapi))
  Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
Duplicate formats in ff_merge_formats detected
Output #0, mp4, to 'test_hw.mp4':
  Metadata:
    major_brand : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder : Lavf58.47.100
    Stream #0:0(und): Video: h264 (h264_vaapi) (High) (avc1 / 0x31637661), 
vaapi_vld, 1280x720, q=-1--1, 30 fps, 15360 tbn, 30 tbc (default)
    Metadata:
  handler_name    : VideoHandler
  encoder : Lavc58.93.100 h264_vaapi
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, 
fltp, 128 kb/s (default)
    Metadata:
  handler_name    : SoundHandler
  encoder : Lavc58.93.100 aac
frame=   76 fps=0.0 q=-0.0 size= 256kB time=00:00:02.62 bitrate= 
799.4kbits/frame=  159 fps=159 q=-0.0 size= 256kB time=00:00:05.38 bitrate= 
389.4kbits/frame=  241 fps=160 q=-0.0 size= 512kB time=00:00:08.12 bitrate= 
516.1kbits/frame=  318 fps=158 q=-0.0 size= 768kB time=00:00:10.68 bitrate= 
589.1kbits/frame=  399 fps=159 q=-0.0 size=    1024kB time=00:00:13.39 bitrate= 
626.1kbits/frame=  482 fps=160 q=-0.0 size=    1024kB time=00:00:16.16 bitrate= 
519.1kbits/frame=  563 fps=160 q=-0.0 size=    1536kB time=00:00:18.85 bitrate= 
667.4kbits/frame=  622 fps=159 q=-0.0 Lsize=    2365kB time=00:00:20.66 
bitrate= 937.6kbits/s speed=5.29x    
video:2016kB audio:324kB subtitle:0kB other streams:0kB global headers:0kB 
muxing overhead: 1.062382%
[aac @ 0x55e29ed14e00] Qavg: 223.224


The "warning" is the line

Duplicate formats in ff_merge_formats detected

I could not find any information about the duplication.

Any tips?

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

Re: [FFmpeg-user] Low CPU HQ format for local streaming?

2020-06-30 Thread Moritz Barsnick
Hi Simon,
in addition to what Carl Eugen wrote:

On Tue, Jun 30, 2020 at 10:21:52 -0600, Simon Roberts wrote:
> I need to find an encoding, and presumably a file type, that a) works in a
> streaming format, and b) is as low CPU usage as possible. I don't believe I
> care about bandwidth, this is just shipped from one process to another and
> consumed in real time.
>
> I tried using rawvideo, but it crashes out. To distinguish the encoding
> side from the decoding side, I used this command line:
>
> ffmpeg -i capture-4chan.mov -c:v rawvideo -f mpegts - | cat /dev/null
>
> and these appear to be the lines of interest from the output (though I
> suspect it's simply that rawvideo doesn't have markers in it that allow a
> receiver to know what the heck it's looking at?)

If the container has information about the rawvideo, the receiver
should be able to play it.

> [mpegts @ 0x55f18d555440] Stream 0, codec rawvideo, is muxed as a private
> data stream and may not be recognized upon reading.
> av_interleaved_write_frame(): Broken pipe
> Error writing trailer of pipe:: Broken pipe

That happens because rawvideo is not a supported video codec in
MPEG-TS.

> I also tried using "copy" codec, that is in effect just sending the
> prores across the pipe, like this:
>
> ffmpeg -i capture-4chan.mov -c:v copy -c:a copy -f mpegts - | ffplay
> -analyzeduration 10 -f mpegts -
>
> But that complained too:
> [mpegts @ 0x5604ba2e85c0] Stream 0, codec prores, is muxed as a private
> data stream and may not be recognized upon reading.
> [mpegts @ 0x5604ba2e85c0] Stream 1, codec pcm_s16le, is muxed as a private
> data stream and may not be recognized upon reading.

And apparently neither are prores nor PCM audio supported codecs.

If you stream from ffmpeg to ffplay, the "nut" format may be a choice
for you. It streams well, and it handles rawvideo as well as prores and
PCM audio (I just tested with all of these).

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] Different MD5 hashes for identical tracks

2020-06-30 Thread raistlin . mlists
Hello Moritz,

Tuesday, June 30, 2020, 11:12:13 PM, you wrote:

> 192 kb/s stereo vs. 448 kb/s stereo.
> They can't be identical, can they?

I got it now. I defined stream numbers using tsMuxer and considered
TrueHD stream with embedded AC3 stream as one stream while ffmpeg
considers them as two separate streams.
Thanks!

-- 
Best regards,
raistlin.mli...@yandex.ru

___
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] Low CPU HQ format for local streaming?

2020-06-30 Thread Carl Eugen Hoyos
Am Di., 30. Juni 2020 um 18:22 Uhr schrieb Simon Roberts
:

> So, I think my question is "what encoding, and what file type" would suit
> my needs for a very low CPU overhead, but not caring about bandwidth

-vcodec mpeg1video -qscale 2 -mbd 2
(You will probably not be happy with the result, but first, this is the answer
to your question and second, "low cpu" is not generally achievable)

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] Different MD5 hashes for identical tracks

2020-06-30 Thread Reindl Harald


Am 30.06.20 um 21:54 schrieb raistlin.mli...@yandex.ru:
> Hello Reindl,
> 
> Tuesday, June 30, 2020, 10:23:54 PM, you wrote:
> 
>> are you mentally ill
> 
> No why? It's probably just you who can't read. Yes I used diff and it
> says files are identical

if they are identical they have the same checksum
it's that easy

___
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] Different MD5 hashes for identical tracks

2020-06-30 Thread Moritz Barsnick
On Tue, Jun 30, 2020 at 19:31:24 +0300, raistlin.mli...@yandex.ru wrote:
> There are 2 sample m2ts files (about 84 MB each):
> https://mir.cr/0Y8ROTYT (1)
> https://mir.cr/RFI1MNOM (2)
>
> Stream a:5 in (1) and stream a:4 in (2) are identical (being binary
> compared). Though ffmpeg reports they have different MD5 hashes:
>
> ffmpeg -loglevel 4 -i 1.m2ts -map 0:a:5 -codec copy -f md5 -
> MD5=cee9775826b81d395c7d012e69309270

Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p(tv, 
bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k 
tbn, 47.95 tbc
Stream #0:1[0x1100](rus): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 
5.1(side), fltp, 384 kb/s
Stream #0:2[0x1101](rus): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 
5.1(side), fltp, 448 kb/s
Stream #0:3[0x1102](rus): Audio: dts (DTS) ([130][0][0][0] / 0x0082), 48000 
Hz, 5.1(side), fltp, 1536 kb/s
Stream #0:4[0x1103](eng): Audio: truehd (AC-3 / 0x332D4341), 48000 Hz, 
5.1(side), s32 (24 bit)
Stream #0:5[0x1103]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), 
fltp, 640 kb/s
Stream #0:6[0x1104](eng): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, 
fltp, 192 kb/s

> ffmpeg -loglevel 4 -i 0.m2ts  -map 0:a:4 -codec copy -f md5 -
> MD5=32ccb6d7af46bfdd2100cd68c7622171

Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p(tv, 
bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k 
tbn, 47.95 tbc
Stream #0:1[0x1100](eng): Audio: truehd (AC-3 / 0x332D4341), 48000 Hz, 
5.1(side), s32 (24 bit)
Stream #0:2[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), 
fltp, 640 kb/s
Stream #0:3[0x1101](rus): Audio: dts (DTS) ([130][0][0][0] / 0x0082), 48000 
Hz, 5.1(side), fltp, 1536 kb/s
Stream #0:4[0x1102](rus): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 
5.1(side), fltp, 640 kb/s
Stream #0:5[0x1103](ukr): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, 
fltp, 448 kb/s

192 kb/s stereo vs. 448 kb/s stereo.
They can't be identical, can they?

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] Different MD5 hashes for identical tracks

2020-06-30 Thread raistlin . mlists
Hello Reindl,

Tuesday, June 30, 2020, 10:23:54 PM, you wrote:

> are you mentally ill

No why? It's probably just you who can't read. Yes I used diff and it
says files are identical.

-- 
Best regards,
raistlin.mli...@yandex.ru

___
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] Different MD5 hashes for identical tracks

2020-06-30 Thread Reindl Harald


Am 30.06.20 um 21:17 schrieb raistlin.mli...@yandex.ru:
> There are 2 sample m2ts files (about 84 MB each):
> https://mir.cr/0Y8ROTYT (1)
> https://mir.cr/RFI1MNOM (2)
>
>> you use diff?
>> ___
>> 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".
> 
> Yes. You can try yourself, that's why I gave the links

are you mentally ill or why do you think someone goes through all that
fuckup of your links enable javasript for half of the world when you
just xould do "diff -uNr a b > diff.diff" and post the result as
plaintext on a service which don#t require shields down?
___
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] Different MD5 hashes for identical tracks

2020-06-30 Thread raistlin . mlists
Hello Reindl,

Tuesday, June 30, 2020, 9:58:33 PM, you wrote:



> Am 30.06.20 um 20:51 schrieb raistlin.mli...@yandex.ru:
>> Hello Reindl,
>> 
 There are 2 sample m2ts files (about 84 MB each):
 https://mir.cr/0Y8ROTYT (1)
 https://mir.cr/RFI1MNOM (2)

 Stream a:5 in (1) and stream a:4 in (2) are identical (being binary
 compared). Though ffmpeg reports they have different MD5 hashes:

 ffmpeg -loglevel 4 -i 1.m2ts -map 0:a:5 -codec copy -f md5 -
 MD5=cee9775826b81d395c7d012e69309270

 ffmpeg -loglevel 4 -i 0.m2ts  -map 0:a:4 -codec copy -f md5 -
 MD5=32ccb6d7af46bfdd2100cd68c7622171

 MD5 hashes for these streams being decoded (without '-codec copy') are
 also different.

 How could it be
>> 
>>> most files have timestamps inside
>> 
>> Are these timestamps removed by demuxing? As I wrote demuxed tracks
>> are byte-to-byte identical

> you use diff?
> ___
> 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".

Yes. You can try yourself, that's why I gave the links.

-- 
Best regards,
raistlin.mli...@yandex.ru

___
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] Different MD5 hashes for identical tracks

2020-06-30 Thread Reindl Harald


Am 30.06.20 um 20:51 schrieb raistlin.mli...@yandex.ru:
> Hello Reindl,
> 
>>> There are 2 sample m2ts files (about 84 MB each):
>>> https://mir.cr/0Y8ROTYT (1)
>>> https://mir.cr/RFI1MNOM (2)
>>>
>>> Stream a:5 in (1) and stream a:4 in (2) are identical (being binary
>>> compared). Though ffmpeg reports they have different MD5 hashes:
>>>
>>> ffmpeg -loglevel 4 -i 1.m2ts -map 0:a:5 -codec copy -f md5 -
>>> MD5=cee9775826b81d395c7d012e69309270
>>>
>>> ffmpeg -loglevel 4 -i 0.m2ts  -map 0:a:4 -codec copy -f md5 -
>>> MD5=32ccb6d7af46bfdd2100cd68c7622171
>>>
>>> MD5 hashes for these streams being decoded (without '-codec copy') are
>>> also different.
>>>
>>> How could it be
> 
>> most files have timestamps inside
> 
> Are these timestamps removed by demuxing? As I wrote demuxed tracks
> are byte-to-byte identical

you use diff?
___
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] Different MD5 hashes for identical tracks

2020-06-30 Thread raistlin . mlists
Hello Reindl,

>> There are 2 sample m2ts files (about 84 MB each):
>> https://mir.cr/0Y8ROTYT (1)
>> https://mir.cr/RFI1MNOM (2)
>> 
>> Stream a:5 in (1) and stream a:4 in (2) are identical (being binary
>> compared). Though ffmpeg reports they have different MD5 hashes:
>> 
>> ffmpeg -loglevel 4 -i 1.m2ts -map 0:a:5 -codec copy -f md5 -
>> MD5=cee9775826b81d395c7d012e69309270
>> 
>> ffmpeg -loglevel 4 -i 0.m2ts  -map 0:a:4 -codec copy -f md5 -
>> MD5=32ccb6d7af46bfdd2100cd68c7622171
>> 
>> MD5 hashes for these streams being decoded (without '-codec copy') are
>> also different.
>> 
>> How could it be

> most files have timestamps inside

Are these timestamps removed by demuxing? As I wrote demuxed tracks
are byte-to-byte identical.

-- 
Best regards,
raistlin.mli...@yandex.ru

___
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] Different MD5 hashes for identical tracks

2020-06-30 Thread Reindl Harald


Am 30.06.20 um 18:31 schrieb raistlin.mli...@yandex.ru:
> Hello Ffmpeg-user,
> 
> There are 2 sample m2ts files (about 84 MB each):
> https://mir.cr/0Y8ROTYT (1)
> https://mir.cr/RFI1MNOM (2)
> 
> Stream a:5 in (1) and stream a:4 in (2) are identical (being binary
> compared). Though ffmpeg reports they have different MD5 hashes:
> 
> ffmpeg -loglevel 4 -i 1.m2ts -map 0:a:5 -codec copy -f md5 -
> MD5=cee9775826b81d395c7d012e69309270
> 
> ffmpeg -loglevel 4 -i 0.m2ts  -map 0:a:4 -codec copy -f md5 -
> MD5=32ccb6d7af46bfdd2100cd68c7622171
> 
> MD5 hashes for these streams being decoded (without '-codec copy') are
> also different.
> 
> How could it be

most files have timestamps inside
___
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] Different MD5 hashes for identical tracks

2020-06-30 Thread raistlin . mlists
Hello Ffmpeg-user,

There are 2 sample m2ts files (about 84 MB each):
https://mir.cr/0Y8ROTYT (1)
https://mir.cr/RFI1MNOM (2)

Stream a:5 in (1) and stream a:4 in (2) are identical (being binary
compared). Though ffmpeg reports they have different MD5 hashes:

ffmpeg -loglevel 4 -i 1.m2ts -map 0:a:5 -codec copy -f md5 -
MD5=cee9775826b81d395c7d012e69309270

ffmpeg -loglevel 4 -i 0.m2ts  -map 0:a:4 -codec copy -f md5 -
MD5=32ccb6d7af46bfdd2100cd68c7622171

MD5 hashes for these streams being decoded (without '-codec copy') are
also different.

How could it be?

-- 
Best regards,
raistlin.mli...@yandex.ru

___
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] Low CPU HQ format for local streaming?

2020-06-30 Thread Simon Roberts
Hi, I'm looking to monitor the output of an ffmpeg capture, and am
investigating local streaming from ffmpeg to ffplay.

The following command line takes input from a file, rather than a capture,
but the file is an example of what the capture will generate, so I believe
it's representative.

ffmpeg -i capture-4chan.mov -f mpegts - | ffplay -f mpegts -

The capture...mov file contains prores encoded video, and I don't actually
want the audio, though I've not attempted to drop that part yet.

I've also succeeded using the matroska file as the format between the two
processes.

My problem, as was the case in one of my previous questions, seems to be
that there's some default encoding going on, and I don't like what it's
doing (low quality and high CPU usage), and I want to find a better choice.

I need to find an encoding, and presumably a file type, that a) works in a
streaming format, and b) is as low CPU usage as possible. I don't believe I
care about bandwidth, this is just shipped from one process to another and
consumed in real time.

I tried using rawvideo, but it crashes out. To distinguish the encoding
side from the decoding side, I used this command line:

ffmpeg -i capture-4chan.mov -c:v rawvideo -f mpegts - | cat /dev/null

and these appear to be the lines of interest from the output (though I
suspect it's simply that rawvideo doesn't have markers in it that allow a
receiver to know what the heck it's looking at?)

[mpegts @ 0x55f18d555440] Stream 0, codec rawvideo, is muxed as a private
data stream and may not be recognized upon reading.
av_interleaved_write_frame(): Broken pipe
Error writing trailer of pipe:: Broken pipe

I also tried using "copy" codec, that is in effect just sending the
prores across the pipe, like this:

ffmpeg -i capture-4chan.mov -c:v copy -c:a copy -f mpegts - | ffplay
-analyzeduration 10 -f mpegts -

But that complained too:
[mpegts @ 0x5604ba2e85c0] Stream 0, codec prores, is muxed as a private
data stream and may not be recognized upon reading.
[mpegts @ 0x5604ba2e85c0] Stream 1, codec pcm_s16le, is muxed as a private
data stream and may not be recognized upon reading.

and

Failed to open file 'pipe:' or configure filtergraph
av_interleaved_write_frame(): Broken pipe
Error writing trailer of pipe:: Broken pipe

So, I think my question is "what encoding, and what file type" would suit
my needs for a very low CPU overhead, but not caring about bandwidth, for
this?

TIA,
Simon

-- 
Simon Roberts
(303) 249 3613
___
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-30 Thread Jim


On 06/29/20 11:18, Moritz Barsnick wrote:

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



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



I would like to say that the progress this project has made since I 
initially wrote this script is absolutely amazing!  When I first wrote 
my processing script, I wanted to simply down-sample the audio from n 
channels to stereo and transcode to MP3 - no volume manipulation at 
all.  (The DVR I had at the time would totally freak if I threw audio at 
it with more than 2 channels.)  There were many people complaining about 
it at the time, but no real solutions.  I had to use a 2-step process - 
dump to stereo wave and then encode to MP3 - because ffmpeg refused to 
reduce the number of channels in an audio stream.  (Having to do this 
2-step process combined with my continual frustration with the volume of 
various files is what led me to work out the maximization of the volume 
throughout each file.)  Now, ffmpeg has the ability to do everything 
itself!  I know it's been several years, but still... excellent work 
guys - very impressive. :)


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

2020-06-30 Thread Jim


On 06/29/20 17:39, Carl Eugen Hoyos wrote:

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?

I absolutely do understand that Carl.  I am sorry - should have phrased 
it differently.  'Windows version' = the older version that I had 
running on the computer that recently died which ran the windows xp 
professional operating system, the full version of which was reported in 
my original post:


ffmpeg version N-78758-g5156578 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.3.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
--enable-gnutls --enable-iconv --enable-libass --enable-libbluray
--enable-libbs2b
--enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme
--enable-libgsm
--enable-libilbc --enable-libmodplug --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
--enable-libopus
--enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex
--enable-libtheora --enable-libtwolame --enable-libvidstab
--enable-libvo-amrwbenc
--enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp
--enable-libx264
--enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg
--enable-lzma
--enable-decklink --enable-zlib
libavutil 55. 19.100 / 55. 19.100
libavcodec 57. 27.100 / 57. 27.100
libavformat 57. 26.100 / 57. 26.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 37.100 / 6. 37.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100



When I said 'Linux version', I was referring to the newer version I am 
running on the Linux machine:


ffmpeg version 4.3-statichttps://johnvansickle.com/ffmpeg/   Copyright (c)
2000-2020 the FFmpeg developers
  built with gcc 8 (Debian 8.3.0-6)
  configuration: --enable-gpl --enable-version3 --enable-static
--disable-debug --disable-ffplay --disable-indev=sndio
--disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r
--enable-gnutls --enable-gmp --enable-libgme --enable-gray
--enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf
--enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband
--enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis
--enable-libopus --enable-libtheora --enable-libvidstab
--enable-libvo-amrwbenc --enable-libvpx --enable-libwebp
--enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d
--enable-libxvid --enable-libzvbi --enable-libzimg
  libavutil  56. 51.100 / 56. 51.100
  libavcodec 58. 91.100 / 58. 91.100
  libavformat58. 45.100 / 58. 45.100
  libavdevice58. 10.100 / 58. 10.100
  libavfilter 7. 85.100 /  7. 85.100
  libswscale  5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc55.  7.100 / 55.  7.100



What I should have said was: "Interesting that this warning is not 
present in ffmpeg version N-78758-g5156578 running on a windows xp 
operating system yet is on ffmpeg version 4.3-static running on Ubuntu 
Linux 20.04, each with the above reported compilation options & versions 
of the related libraries, when operating on identical files."  I 
apologize - did not realize that using shorthand as I did would cause 
confusion.


I've no idea how N-78758-g5156578 compares with 4.3-static as far as age 
goes, other than it's older because I've been running it for years.  
(And this is assuming it's not something to do with the underlying 
operating system and not ffmpeg itself.)  I am curious as to why the 
older version doesn't issue a warning that the newer version does, but 
it's not important either.


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] last 2 seconds are cut recording screen - hardware aceleration

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


> For x264 compressed video use -crf 17see for other options

> https://trac.ffmpeg.org/wiki/Encode/H.264

> For aac audio compression use -b:a 192k for the bitrate see for other

> options https://trac.ffmpeg.org/wiki/Encode/AAC

Thank you

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

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

2020-06-30 Thread Tom Sparks
On 30/06/2020, Leonardo via ffmpeg-user  wrote:
> 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



> 3) Are those commands above "correct"? I mean, is there something "wrong" or
> can it be improved to reduce file size, improve video quality or sound
> quality? I know that ffmpeg has tons of options and "improve" is not a clear
> question.

For x264 compressed video use -crf 17see for other options
https://trac.ffmpeg.org/wiki/Encode/H.264

For aac audio compression use -b:a 192k for the bitrate see for other
options https://trac.ffmpeg.org/wiki/Encode/AAC

$ 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 -b:a 192k  -c:v libx264  -crf 17  -vf
"format=yuv420p" output.mp4
___
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-30 Thread Michael Koch

Am 29.06.2020 um 22:28 schrieb 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.)


Unfortunately I can't compile ffmpeg myself on my Windows system.
Ticket 8766   (I've also added some other things that are missing in the 
documentation)


It's important to also have the "best_score" value to the log file, 
because it contains valuable information about how reliable the x,y 
coordinates are.


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

2020-06-30 Thread Verachten Bruno
Thanks a lot Moritz, I figured the option placement later on, I
thought it applied to the whole command.
And you're right, all is done so that I can't stream from inside the
company to outside the company... except the company now wants to
stream outside.
I will try to get a SOCKS proxy installed... and will go on with my
redsocks2 experiments (it worked on one machine) with the CONNECT
proxy command.

Best regards,

On Mon, Jun 29, 2020 at 10:26 PM Moritz Barsnick  wrote:
>
> 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".



-- 
Bruno Verachten
___
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".