Hello!
I have downloaded all the segments of a MPD and converted to MP4. Content of the MPD:
I have checked with the "Network" tab of the browser the segment numbers. Then when I want to join video and audio, the audio is slightly out of sync. The duration of each audio segment changes between 00:00:03.99 and 00:00:04.01 if it is odd or even, while all the video segments are 00:00:04.01Code:<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <MPD id="xxxxxxxxxxxx" profiles="urn:mpeg:dash:profile:isoff-main:2011" type="static" availabilityStartTime="2017-05-09T18:33:14.000Z" publishTime="2017-05-09T18:33:28.000Z" mediaPresentationDuration="P0Y0M0DT1H32M55.442S" minBufferTime="P0Y0M0DT0H0M1.000S" bitmovin:version="1.7.0" xmlns:ns2="http://www.w3.org/1999/xlink" xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:bitmovin="http://www.bitmovin.net/mpd/2015"> <Period> <AdaptationSet mimeType="video/mp4"> <SegmentTemplate media="../video/$RepresentationID$/cenc_dash/segment_$Number$.m4s" initialization="../video/$RepresentationID$/cenc_dash/init.mp4" duration="4004" startNumber="0" timescale="1000"/> <Representation id="938_3072000" bandwidth="3072000" width="1280" height="938" frameRate="30" codecs="avc1.4D0028"> <ContentProtection schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc" cenc:default_KID="xxxxxxxxxxxxxxxxxxx2" xmlns:cenc="urn:mpeg:cenc:2013"/> <ContentProtection schemeIdUri="urn:uuid:xxxxxxxxxxxxxxxxxxx3"> <cenc:pssh xmlns:cenc="urn:mpeg:cenc:2013">xxxxxxxxxxxxxxxxxxx</cenc:pssh> </ContentProtection> </Representation> <Representation id="938_2406400" bandwidth="2406400" width="1280" height="938" frameRate="30" codecs="avc1.4D0028"> <ContentProtection schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc" cenc:default_KID="xxxxxxxxxxxxxxxxxxx2" xmlns:cenc="urn:mpeg:cenc:2013"/> <ContentProtection schemeIdUri="urn:uuid:xxxxxxxxxxxxxxxxxxx3"> <cenc:pssh xmlns:cenc="urn:mpeg:cenc:2013">xxxxxxxxxxxxxxxxxxx</cenc:pssh> </ContentProtection> </Representation> <Representation id="404_1792000" bandwidth="1792000" width="720" height="404" frameRate="30" codecs="avc1.4D001E"> <ContentProtection schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc" cenc:default_KID="xxxxxxxxxxxxxxxxxxx2" xmlns:cenc="urn:mpeg:cenc:2013"/> <ContentProtection schemeIdUri="urn:uuid:xxxxxxxxxxxxxxxxxxx3"> <cenc:pssh xmlns:cenc="urn:mpeg:cenc:2013">xxxxxxxxxxxxxxxxxxx</cenc:pssh> </ContentProtection> </Representation> </AdaptationSet> <AdaptationSet lang="es" mimeType="audio/mp4" codecs="mp4a.40.2" bitmovin:label="Lang 1"> <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/> <SegmentTemplate media="../audio/$RepresentationID$/cenc_dash/segment_$Number$.m4s" initialization="../audio/$RepresentationID$/cenc_dash/init.mp4" duration="4000" startNumber="0" timescale="1000"/> <Representation id="2_stereo_128000" bandwidth="128000" audioSamplingRate="48000"> <ContentProtection schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc" cenc:default_KID="xxxxxxxxxxxxxxxxxxx2" xmlns:cenc="urn:mpeg:cenc:2013"/> <ContentProtection schemeIdUri="urn:uuid:xxxxxxxxxxxxxxxxxxx3"> <cenc:pssh xmlns:cenc="urn:mpeg:cenc:2013">xxxxxxxxxxxxxxxxxxx</cenc:pssh> </ContentProtection> </Representation> </AdaptationSet> <AdaptationSet lang="en" mimeType="audio/mp4" codecs="mp4a.40.2" bitmovin:label="Lang 2"> <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/> <SegmentTemplate media="../audio/$RepresentationID$/cenc_dash/segment_$Number$.m4s" initialization="../audio/$RepresentationID$/cenc_dash/init.mp4" duration="4000" startNumber="0" timescale="1000"/> <Representation id="1_stereo_128000" bandwidth="128000" audioSamplingRate="48000"> <ContentProtection schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc" cenc:default_KID="xxxxxxxxxxxxxxxxxxx2" xmlns:cenc="urn:mpeg:cenc:2013"/> <ContentProtection schemeIdUri="urn:uuid:xxxxxxxxxxxxxxxxxxx3"> <cenc:pssh xmlns:cenc="urn:mpeg:cenc:2013">xxxxxxxxxxxxxxxxxxx</cenc:pssh> </ContentProtection> </Representation> </AdaptationSet> </Period> </MPD>
The total video duration number is not correct either, since in the player it appears as 01:32.55 and with the ffmpeg the "muxed" video returns 01:32:56.83
When I downloaded and converted it didn't throw me any errors.
Here the commands I used (list.txt contains: file 'segment0.mp4', 'segment1.mp4', etc):
Could someone help?Code:ffmpeg -f concat -safe 0 -i list.txt -c copy video.mp4 ffmpeg -f concat -safe 0 -i list.txt -c copy audio.m4a ffmpeg -i audio.m4a -i video.mp4 -c copy muxed.mp4
Thanks in advance!
+ Reply to Thread
Results 1 to 4 of 4
-
-
Play your mp4 with VLC player, Tool menu, track synchronization, change the audio track synch value while playing, until the synch is ok. Then go to a later point in your video. Synch still ok?
Then this is a constant audio/video delay, which you can easily correct by remuxing the video and entering the found A/V delay in the audio track.
Similar Threads
-
how to download video files with "mpd" (mpeg dash manifest)?
By nzhd in forum Video Streaming DownloadingReplies: 59Last Post: 17th Apr 2021, 05:26 -
Bento4 and MPEG-DASH
By vega69-ux in forum Video Streaming DownloadingReplies: 1Last Post: 21st Sep 2020, 16:26 -
Download DASH stream (audio and video mp4)
By axes in forum Video Streaming DownloadingReplies: 1Last Post: 30th May 2020, 07:30 -
MPEG-1 audio/video out of sync
By louv68 in forum AudioReplies: 12Last Post: 25th Oct 2019, 06:07 -
download video or audio in a url mpd (.dash)?
By brunomoreno71 in forum Video Streaming DownloadingReplies: 1Last Post: 28th Mar 2018, 12:10