Re: [FFmpeg-user] error with hero 7 white gopro audio stream
It seems that even though there is an error message, the audio stream is copied to the output file with no perceptible loss. I thought I had a different outcome before I posted. As far as hardware acceleration (hwaccel) is concerned, I found a couple of useful links and have successfully used my macbook air hardware with the following command. $ ffmpeg -y -threads 2 -i GH010087.MP4 -vf "lenscorrection=cx=0.5:cy=0.5:k1=-0.211:k2=0.0" -vcodec h264_videotoolbox -b:v 1K out.mp4 Adjust the bitrate (-b:v) and threads as appropriate for your desired results. Elsewhere ( https://stackoverflow.com/questions/30832248/is-there-a-way-to-remove-gopro-fisheye-using-ffmpeg) I found recommended values for GoPro correction to be k1=-0.227 and k2=-0.022. After running a test grid image through ffmpeg at different settings I settled on the settings in the example command. I found these two links helpful for figuring out a working use of hardware acceleration. https://forum.videohelp.com/threads/386398-ffmpeg-videotoolbox-options https://www.reddit.com/r/ffmpeg/comments/59qglv/your_experiences_with_h264_videotoolbox/ I need to do some more research to see if opencl can be used. When I tried, it errored out but so did my attempts with videotoolbox until I found the above links for guidance. On Wed, Dec 26, 2018 at 7:58 PM Harry Levinson wrote: > I am trying to use ffmpeg to defish my gopro videos on a mac. The lens > correction is working reasonably well though eventually I'd like to have > hardware acceleration working, but first I am having a more basic problem. > When ffmpeg gets to the audio stream it complains about the audio stream. > > Error while decoding stream #0:1: Invalid argument:00:47.31 > > I tried a few stream mapping options but no success. Below is the most > basic command and resulting output. I tried another MP4 file and it worked > fine. > > Thanks, > Harry > > > $ ffmpeg -i GH010087.MP4out.MP4 > ffmpeg version 4.1 Copyright (c) 2000-2018 the FFmpeg developers > built with Apple LLVM version 10.0.0 (clang-1000.11.45.5) > configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1_1 --enable-shared > --enable-pthreads --enable-version3 --enable-hardcoded-tables > --enable-avresample --cc=clang --host-cflags= --host-ldflags= > --enable-ffplay --enable-gpl --enable-libmp3lame --enable-libopus > --enable-libsnappy --enable-libtheora --enable-libvorbis --enable-libvpx > --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma > --enable-opencl --enable-videotoolbox > libavutil 56. 22.100 / 56. 22.100 > libavcodec 58. 35.100 / 58. 35.100 > libavformat58. 20.100 / 58. 20.100 > libavdevice58. 5.100 / 58. 5.100 > libavfilter 7. 40.101 / 7. 40.101 > libavresample 4. 0. 0 / 4. 0. 0 > libswscale 5. 3.100 / 5. 3.100 > libswresample 3. 3.100 / 3. 3.100 > libpostproc55. 3.100 / 55. 3.100 > Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'GH010087.MP4': > Metadata: > major_brand : mp41 > minor_version : 538120216 > compatible_brands: mp41 > creation_time : 2018-02-08T17:33:57.00Z > firmware: H18.02.01.21.00 > Duration: 00:00:47.49, start: 0.00, bitrate: 30131 kb/s > Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, > smpte170m), 1920x1440, 30025 kb/s, 30 fps, 30 tbr, 90k tbn, 60 tbc (default) > Metadata: > creation_time : 2018-02-08T17:33:57.00Z > handler_name: GoPro AVC > encoder : GoPro AVC encoder > timecode: 00:23:00:11 > Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, > stereo, fltp, 127 kb/s (default) > Metadata: > creation_time : 2018-02-08T17:33:57.00Z > handler_name: GoPro AAC > timecode: 00:23:00:11 > Stream #0:2(eng): Data: none (tmcd / 0x64636D74) (default) > Metadata: > creation_time : 2018-02-08T17:33:57.00Z > handler_name: GoPro TCD > timecode: 00:23:00:11 > Stream #0:3(eng): Data: bin_data (gpmd / 0x646D7067), 30 kb/s (default) > Metadata: > creation_time : 2018-02-08T17:33:57.00Z > handler_name: GoPro MET > Stream #0:4(eng): Data: none (fdsc / 0x63736466), 10 kb/s (default) > Metadata: > creation_time : 2018-02-08T17:33:57.00Z > handler_name: GoPro SOS > File 'out.MP4' already exists. Overwrite ? [y/N] Stream mapping: > Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264)) > Stream #0:1 -> #0:1 (aac (native) -> aac (native)) > Press [q] to stop, [?] for help > [libx264 @ 0x7fa020818200] using cpu capabilities: MMX2 SSE2Fast SSSE3 > SSE4.2 AVX FMA3 BMI2 AVX2 > [libx264 @ 0x7fa020
[FFmpeg-user] Fwd: error with hero 7 white gopro audio stream
I am trying to use ffmpeg to defish my gopro videos on a mac. The lens correction is working reasonably well though eventually I'd like to have hardware acceleration working, but first I am having a more basic problem. When ffmpeg gets to the audio stream it complains about the audio stream. Error while decoding stream #0:1: Invalid argument:00:47.31 I tried a few stream mapping options but no success. Below is the most basic command and resulting output. I tried another MP4 file and it worked fine. Thanks, Harry $ ffmpeg -i GH010087.MP4out.MP4 ffmpeg version 4.1 Copyright (c) 2000-2018 the FFmpeg developers built with Apple LLVM version 10.0.0 (clang-1000.11.45.5) configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1_1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gpl --enable-libmp3lame --enable-libopus --enable-libsnappy --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-opencl --enable-videotoolbox libavutil 56. 22.100 / 56. 22.100 libavcodec 58. 35.100 / 58. 35.100 libavformat58. 20.100 / 58. 20.100 libavdevice58. 5.100 / 58. 5.100 libavfilter 7. 40.101 / 7. 40.101 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 3.100 / 5. 3.100 libswresample 3. 3.100 / 3. 3.100 libpostproc55. 3.100 / 55. 3.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'GH010087.MP4': Metadata: major_brand : mp41 minor_version : 538120216 compatible_brands: mp41 creation_time : 2018-02-08T17:33:57.00Z firmware: H18.02.01.21.00 Duration: 00:00:47.49, start: 0.00, bitrate: 30131 kb/s Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, smpte170m), 1920x1440, 30025 kb/s, 30 fps, 30 tbr, 90k tbn, 60 tbc (default) Metadata: creation_time : 2018-02-08T17:33:57.00Z handler_name: GoPro AVC encoder : GoPro AVC encoder timecode: 00:23:00:11 Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s (default) Metadata: creation_time : 2018-02-08T17:33:57.00Z handler_name: GoPro AAC timecode: 00:23:00:11 Stream #0:2(eng): Data: none (tmcd / 0x64636D74) (default) Metadata: creation_time : 2018-02-08T17:33:57.00Z handler_name: GoPro TCD timecode: 00:23:00:11 Stream #0:3(eng): Data: bin_data (gpmd / 0x646D7067), 30 kb/s (default) Metadata: creation_time : 2018-02-08T17:33:57.00Z handler_name: GoPro MET Stream #0:4(eng): Data: none (fdsc / 0x63736466), 10 kb/s (default) Metadata: creation_time : 2018-02-08T17:33:57.00Z handler_name: GoPro SOS File 'out.MP4' already exists. Overwrite ? [y/N] Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264)) Stream #0:1 -> #0:1 (aac (native) -> aac (native)) Press [q] to stop, [?] for help [libx264 @ 0x7fa020818200] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 [libx264 @ 0x7fa020818200] profile High, level 5.0 [libx264 @ 0x7fa020818200] 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 'out.MP4': Metadata: major_brand : mp41 minor_version : 538120216 compatible_brands: mp41 firmware: H18.02.01.21.00 encoder : Lavf58.20.100 Stream #0:0(eng): Video: h264 (libx264) (avc1 / 0x31637661), yuvj420p(pc), 1920x1440, q=-1--1, 0.03 fps, 15360 tbn, 30 tbc (default) Metadata: creation_time : 2018-02-08T17:33:57.00Z handler_name: GoPro AVC timecode: 00:23:00:11 encoder : Lavc58.35.100 libx264 Side data: cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1 Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default) Metadata: creation_time : 2018-02-08T17:33:57.00Z handler_name: GoPro AAC timecode: 00:23:00:11 encoder : Lavc58.35.100 aac Error while decoding stream #0:1: Invalid argument:00:47.31 bitrate=12144.0kbits/s speed=0.248x frame= 1421 fps=7.2 q=-1.0 Lsize= 75675kB