VideoHelp Forum




+ Reply to Thread
Results 1 to 3 of 3
  1. Member
    Join Date
    Sep 2023
    Location
    Washington DC
    Search PM
    Hello, my first post here.

    I'm attempting to generate a downloadable video with 5.1 surround to put on a website of a concert I worked on. Ideally with maximum compatibility with things like QuickTime & Plex. Originally I was using HEVC for HDR10, but I've simplified down to using libx264 for this post, since the issue remains.

    I have a source 2160p29.97 DNxHR video file, and a source Dolby AC-3 5.1 audio encode. The AC3 encode was created with Dolby Media Encoder using a 6ch .wav that had also been exported from Resolve. I'm not sure if the timecode for that was handled correctly.

    Here's my ffmpeg string:

    Code:
    ffmpeg.exe -i .\master-dnx.mov -i .\master-ac3.ac3 -acodec copy -c:v libx264 -pix_fmt yuv420p -color_primaries bt709 -color_trc bt709 -colorspace bt709 -preset medium -crf 22 -movflags +faststart -flags +cgop -f mp4 download.mp4
    The issues:
    • Playback starts fine but QuickTime seems to have trouble seeking in the file, often leading to the audio & video being out of sync or dropping entirely after seeking. Not an issue in MPV, MPC, or VLC.
    • The audio drops out a few seconds early at the end of the file.

    I have noticed the following warnings from ffmpeg:
    • Estimating duration from bitrate, this may be inaccurate
    • [mp4 @ 00000257d7257600] track 1: codec frame size is not set
    • [mp4 @ 00000257d7257600] Dropping invalid packet from start of the stream

    I've also noticed the video stream and audio stream have slightly different durations:
    • Duration: 02:01:15.67, start: 0.000000, bitrate: 879195 kb/s
    • Duration: 02:02:20.61, start: 0.000000, bitrate: 447 kb/s

    I feel there may be some kind of timestamp mismatch. This is my first time attempting to mux AC3 audio into a video this way.

    Thanks so much for any help.
    Last edited by ctcwired; 2nd Sep 2023 at 17:50. Reason: removed HDR aspects for simplicity
    Quote Quote  
  2. Try
    ffmpeg.exe -fflags +genpts -i .\master-dnx.mov -i .\master-ac3.ac3 -acodec copy -c:v libx264 -pix_fmt yuv420p -color_primaries bt709 -color_trc bt709 -colorspace bt709 -preset medium -crf 22 -movflags +faststart download.mp4
    Quote Quote  
  3. Member
    Join Date
    Sep 2023
    Location
    Washington DC
    Search PM
    So I was able to resolve the issue by going back to Dolby Media Encoder, and making sure the initial start timecode was "00:00:00:00." I think the issue is that on the DaVinci timeline the "first frame of action" wasn't at 0, the project I was exporting started somewhere in the middle. Somehow that metadata made it all the way through even into the .wav file which Dolby Media Encoder read from. I'm not sure how I would have fixed it with ffmpeg, but luckily I was able to re-do the encode with fixed timestamps. Now muxing works correctly, and playback works well on all devices tested.
    Last edited by ctcwired; 4th Sep 2023 at 00:08. Reason: typo
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!