Opened 6 years ago

Last modified 6 years ago

#7450 new defect

Audio not working when recording FLV on OSX

Reported by: Jason Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

ffmpeg -v info -f avfoundation -r 30 -s 1440x900 -i 1:0 -c:v libx264 -pix_fmt yuv420p -preset veryfast -b:v 2500k -f flv out.flv

The above command is recording my screen and also audio from my laptop's built-in microphone.

The video records properly, but the audio sounds really weird and then just stops all together.

I'm going to attach a video where I'm saying "testing 1 2 3". What you hear is a very garbled "testing 1" and no "2 3" are heard.

Attachments (2)

out.flv (775.2 KB ) - added by Jason 6 years ago.
sample output file
output.png (243 bytes ) - added by Steven Liu 6 years ago.

Download all attachments as: .zip

Change History (5)

by Jason, 6 years ago

Attachment: out.flv added

sample output file

comment:1 by Carl Eugen Hoyos, 6 years ago

Component: ffmpegundetermined
Priority: importantnormal

Please provide the command line you tested together with the complete, uncut console output to make this a valid ticket.
Is the issue really flv-related or is it also reproducible if you encode to mov?

comment:2 by Jason, 6 years ago

Good point, I just tested using .mov and .mp4 and the problem exists for those formats as well.

./ffmpeg2 -v info -f avfoundation -r 30 -s 1440x900 -i 1:0 -c:v libx264 -pix_fmt yuv420p -preset veryfast -b:v 2500k -f flv out.flv
ffmpeg version N-91972-gbd10c1e9a8-tessus https://evermeet.cx/ffmpeg/ Copyright (c) 2000-2018 the FFmpeg developers

built with Apple LLVM version 10.0.0 (clang-1000.11.45.2)
configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --disable-ffplay
libavutil 56. 19.101 / 56. 19.101
libavcodec 58. 30.100 / 58. 30.100
libavformat 58. 18.101 / 58. 18.101
libavdevice 58. 4.103 / 58. 4.103
libavfilter 7. 32.100 / 7. 32.100
libswscale 5. 2.100 / 5. 2.100
libswresample 3. 2.100 / 3. 2.100
libpostproc 55. 2.100 / 55. 2.100

[avfoundation @ 0x7fa259001600] Selected pixel format (yuv420p) is not supported by the input device.
[avfoundation @ 0x7fa259001600] Supported pixel formats:
[avfoundation @ 0x7fa259001600] uyvy422
[avfoundation @ 0x7fa259001600] yuyv422
[avfoundation @ 0x7fa259001600] nv12
[avfoundation @ 0x7fa259001600] 0rgb
[avfoundation @ 0x7fa259001600] bgr0
[avfoundation @ 0x7fa259001600] Overriding selected pixel format to use uyvy422 instead.
[avfoundation @ 0x7fa259001600] Stream #0: not enough frames to estimate rate; consider increasing probesize
Input #0, avfoundation, from '1:0':

Duration: N/A, start: 112847.856000, bitrate: 2822 kb/s

Stream #0:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 3360x2100, 1000k tbr, 1000k tbn, 1000k tbc
Stream #0:1: Audio: pcm_f32le, 44100 Hz, stereo, flt, 2822 kb/s

File 'out.flv' already exists. Overwrite ? [y/N] y
Stream mapping:

Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (pcm_f32le (native) -> mp3 (libmp3lame))

Press [q] to stop, ? for help
[libx264 @ 0x7fa25a86e800] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x7fa25a86e800] profile High, level 5.1, 4:2:0, 8-bit
[libx264 @ 0x7fa25a86e800] 264 - core 157 r2932 303c484 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=2 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=12 lookahead_threads=4 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=1 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=10 rc=abr mbtree=1 bitrate=2500 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, flv, to 'out.flv':

Metadata:

encoder : Lavf58.18.101
Stream #0:0: Video: h264 (libx264) ([7][0][0][0] / 0x0007), yuv420p(progressive), 3360x2100, q=-1--1, 2500 kb/s, 30 fps, 1k tbn, 30 tbc
Metadata:

encoder : Lavc58.30.100 libx264

Side data:

cpb: bitrate max/min/avg: 0/0/2500000 buffer size: 0 vbv_delay: -1

Stream #0:1: Audio: mp3 (libmp3lame) ([2][0][0][0] / 0x0002), 44100 Hz, stereo, fltp
Metadata:

encoder : Lavc58.30.100 libmp3lame

frame= 178 fps= 30 q=-1.0 Lsize= 1255kB time=00:00:09.00 bitrate=1141.8kbits/s speed= 1.5x
video:1192kB audio:57kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.483774%
[libx264 @ 0x7fa25a86e800] frame I:1 Avg QP:24.45 size:269563
[libx264 @ 0x7fa25a86e800] frame P:45 Avg QP:25.49 size: 20396
[libx264 @ 0x7fa25a86e800] frame B:132 Avg QP:20.80 size: 248
[libx264 @ 0x7fa25a86e800] consecutive B-frames: 1.1% 0.0% 0.0% 98.9%
[libx264 @ 0x7fa25a86e800] mb I I16..4: 60.4% 14.9% 24.7%
[libx264 @ 0x7fa25a86e800] mb P I16..4: 0.4% 0.1% 0.1% P16..4: 9.2% 0.2% 0.1% 0.0% 0.0% skip:89.9%
[libx264 @ 0x7fa25a86e800] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 0.1% 0.0% 0.0% direct: 0.1% skip:99.9% L0:26.4% L1:73.5% BI: 0.1%
[libx264 @ 0x7fa25a86e800] final ratefactor: 23.82
[libx264 @ 0x7fa25a86e800] 8x8 transform intra:14.1% inter:24.3%
[libx264 @ 0x7fa25a86e800] coded y,uvDC,uvAC intra: 34.7% 30.1% 19.1% inter: 0.9% 0.9% 0.4%
[libx264 @ 0x7fa25a86e800] i16 v,h,dc,p: 75% 20% 3% 2%
[libx264 @ 0x7fa25a86e800] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 12% 28% 29% 5% 5% 4% 6% 4% 8%
[libx264 @ 0x7fa25a86e800] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 27% 24% 12% 5% 7% 6% 7% 5% 7%
[libx264 @ 0x7fa25a86e800] i8c dc,h,v,p: 71% 17% 9% 3%
[libx264 @ 0x7fa25a86e800] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x7fa25a86e800] kb/s:1645.08
Exiting normally, received signal 2.

by Steven Liu, 6 years ago

Attachment: output.png added

comment:3 by Steven Liu, 6 years ago

https://trac.ffmpeg.org/raw-attachment/ticket/7450/output.png

ffmpeg -f avfoundation -s 848x480 -r:v 30 -i 0:0 -c:v h264_videotoolbox -c:a aac -f flv - | ffmpeg -i - -filter_complex "showwavespic=s=640x20" -frames:v 1 -y output.png

That is ok.

Note: See TracTickets for help on using tickets.