[FFmpeg-user] Problem extracting subclips of Avid DNxHD 36 to-the-frame

Media Mouth communque at gmail.com
Thu Apr 13 01:49:37 EEST 2023


I've got a 90 minute source DNxHD36-encoded source clip (Exported from Avid)
Frame rate is 23.976

Intended subclip would be from 0 to 778.041666 seconds.
Testing the following
ffmpeg -i {Source} -ss 0 -t '778.041666' -c copy {Dest}
ffmpeg -i {Source} -ss 0 -to '778.041666' -c copy {Dest}

The resulting clips, when re-imported to Avid come up 18 frames short.
Should be TRT 12:58:01 but imported clip's TRT is 12:57:07

I'm thinking it has to do with the frame rate?


Here's the terminal out.  I'm on an old Avid system running MacOS Mojave

ffmpeg version 4.2.2-tessus  https://evermeet.cx/ffmpeg/  Copyright (c) 2000-2019 the FFmpeg developers
  built with Apple clang version 11.0.0 (clang-1100.0.33.16)
  configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --disable-ffplay
  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
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Source':
  Metadata:
    major_brand     : qt  
    minor_version   : 537199360
    compatible_brands: qt  
    creation_time   : 2023-04-12T17:31:47.000000Z
    timecode        : 01:00:00:00
  Duration: 01:30:56.46, start: 0.000000, bitrate: 36139 kb/s
    Stream #0:0(eng): Video: dnxhd (DNXHD) (AVdn / 0x6E645641), yuv422p(tv, bt709), 1920x1080, 36139 kb/s, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 23976 tbn, 23976 tbc (default)
    Metadata:
      creation_time   : 2023-04-12T17:31:47.000000Z
      handler_name    : Apple Video Media Handler
      encoder         : Avid DNxHD Codec
    Stream #0:1(eng): Data: none (tmcd / 0x64636D74) (default)
    Metadata:
      creation_time   : 2023-04-12T17:40:04.000000Z
      handler_name    : Time Code Media Handler
      timecode        : 01:00:00:00
Output #0, mov, to 'Dest':
  Metadata:
    major_brand     : qt  
    minor_version   : 537199360
    compatible_brands: qt  
    timecode        : 01:00:00:00
    encoder         : Lavf58.29.100
    Stream #0:0(eng): Video: dnxhd (DNXHD) (AVdn / 0x6E645641), yuv422p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 36139 kb/s, 0.04 fps, 23.98 tbr, 23976 tbn, 23976 tbc (default)
    Metadata:
      creation_time   : 2023-04-12T17:31:47.000000Z
      handler_name    : Apple Video Media Handler
      encoder         : Avid DNxHD Codec
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
frame=  206 fps=0.0 q=-1.0 size=   37888kB time=00:00:08.55 bitrate=36300.5kbits
frame=  394 fps=392 q=-1.0 size=   72448kB time=00:00:16.39 bitrate=36207.6kbits
frame=  491 fps=326 q=-1.0 size=   90112kB time=00:00:20.43 bitrate=36120.4kbits
frame=  701 fps=349 q=-1.0 size=  128768kB time=00:00:29.19 bitrate=36130.7kbits
...etc etc...
frame=18427 fps=365 q=-1.0 size= 3390464kB time=00:12:48.51 bitrate=36140.5kbits
frame=18609 fps=365 q=-1.0 size= 3424000kB time=00:12:56.10 bitrate=36141.0kbits
frame=18655 fps=365 q=-1.0 Lsize= 3432536kB time=00:12:58.02 bitrate=36141.8kbits/s speed=15.2x    

video:3432520kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000468%


More information about the ffmpeg-user mailing list