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:
The issues: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
- 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.
+ Reply to Thread
Results 1 to 3 of 3
-
Last edited by ctcwired; 2nd Sep 2023 at 17:50. Reason: removed HDR aspects for simplicity
-
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 -
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
Similar Threads
-
Seeking recommendations for VHS player, capture devices & cleaning tapes
By philvideofilm in forum Capturing and VCRReplies: 4Last Post: 21st Apr 2023, 16:55 -
How many license challenges should I be answering with a CDM?
By Diazole in forum Video Streaming DownloadingReplies: 4Last Post: 19th Sep 2022, 13:00 -
I ask you to convert a script file to HEVC & H264 format
By frpkingymd in forum Video ConversionReplies: 3Last Post: 5th Jun 2021, 12:21 -
Newbie seeking advice how to convert HEVC to x264
By vhwul62 in forum Video ConversionReplies: 12Last Post: 20th May 2021, 04:34 -
VSDC & (GoPro) HEVC playback. Possible or not?
By I_Le in forum EditingReplies: 1Last Post: 2nd Dec 2018, 05:30