[FFmpeg-user] Sony XAVC codec errors when trying to clip

Mike Dahman mike.dahman at gmail.com
Thu Jan 23 19:02:54 EET 2020


Hello all,

This is my first post, hopefully all the pertinent info is included to get
some assistance.

I'm trying to clip a XAVC file on MacOS 10.15.2. In the past, I've used
ffmpeg to pull clips from large files so I don't have to pull the whole
file into iMovie and clip it there. I just started using the higher quality
XAVC files, but seem to be running into codec issue.

First attempt bombs out with codec pcm_s16be in stream #1, codec not
currently supported in container.

ffmpeg -i C0003.MP4 -ss 00:06:15 -t 00:00:15 -c:v copy -c:a copy
/tmp/clip.MP4
ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
  built with Apple clang version 11.0.0 (clang-1100.0.33.16)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.2.2 --enable-shared
--enable-pthreads --enable-version3 --enable-avresample --cc=clang
--host-cflags='-I/Library/Java/JavaVirtualMachines/adoptopenjdk-13.0.1.jdk/Contents/Home/include
-I/Library/Java/JavaVirtualMachines/adoptopenjdk-13.0.1.jdk/Contents/Home/include/darwin
-fno-stack-check' --host-ldflags= --enable-ffplay --enable-gnutls
--enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame
--enable-libopus --enable-librubberband --enable-libsnappy
--enable-libtesseract --enable-libtheora --enable-libvidstab
--enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265
--enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype
--enable-frei0r --enable-libass --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp
--enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack
--disable-indev=jack
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Guessed Channel Layout for Input Stream #0.1 : stereo
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C0003.MP4':
  Metadata:
    major_brand     : XAVC
    minor_version   : 16785407
    compatible_brands: XAVCmp42iso2
    creation_time   : 2020-01-18T20:40:36.000000Z
  Duration: 00:08:48.03, start: 0.000000, bitrate: 51954 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv,
bt709/bt709/iec61966-2-4), 1920x1080 [SAR 1:1 DAR 16:9], 49925 kb/s, 59.94
fps, 59.94 tbr, 60k tbn, 119.88 tbc (default)
    Metadata:
      creation_time   : 2020-01-18T20:40:36.000000Z
      handler_name    : Video Media Handler
      encoder         : AVC Coding
    Stream #0:1(und): Audio: pcm_s16be (twos / 0x736F7774), 48000 Hz,
stereo, s16, 1536 kb/s (default)
    Metadata:
      creation_time   : 2020-01-18T20:40:36.000000Z
      handler_name    : Sound Media Handler
    Stream #0:2(und): Data: none (rtmd / 0x646D7472), 491 kb/s (default)
    Metadata:
      creation_time   : 2020-01-18T20:40:36.000000Z
      handler_name    : Timed Metadata Media Handler
      timecode        : 83:01:01;02
[mp4 @ 0x7f8f4e002e00] Could not find tag for codec pcm_s16be in stream #1,
codec not currently supported in container
Could not write header for output file #0 (incorrect codec parameters ?):
Invalid argument
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
    Last message repeated 1 times

I found another thread that suggested converting to MKV. This completes,
however the audio is terrible when played back through VLC (the clip won't
open with quicktime 10.5: the file isn't compatible).

VLC:

/Applications/VLC.app/Contents/MacOS/VLC /tmp/clip.mkv
VLC media player 3.0.8 Vetinari (revision 3.0.8-0-gf350b6b5a7)
[00007ff603800640] main libvlc: Running vlc with the default interface. Use
'cvlc' to use vlc without interface.
[00007ff60390a570] videotoolbox decoder: Using Video Toolbox to decode
'h264'
[00007ff60390a570] videotoolbox decoder: vt cvpx chroma: 420v
2020-01-23 08:56:16.934 VLC[34425:942116] Can't find app with identifier
com.apple.iTunes
2020-01-23 08:56:16.934 VLC[34425:942116] Can't find app with identifier
com.spotify.client
2020-01-23 08:56:16.946 VLC[34425:942116] Can't find app with identifier
com.apple.iTunes
2020-01-23 08:56:16.946 VLC[34425:942116] Can't find app with identifier
com.spotify.client

Any suggestions on different syntax, codec, conversion process is welcomed!

regards,

-mike


More information about the ffmpeg-user mailing list