**************************************************
To see the solution to this problem along with a recap, see post #37
**************************************************
I have a streaming MP4 file (for this post I will call it orig.mp4) that I have downloaded that is 2:51:54 long. At about the 1:57:07 mark, using VLC or Zoom Player, the video speeds up but the audio does not. This continues to the end, where the video has stopped minutes earlier but the audio continues. I have downloaded this file multiple times and the exact thing happens at the same time mark each time. When I view the streaming video in a browser, the video never speeds up in relationship to the audio.
I understand that a possible solution is to find another video downloader and see if the same thing occurs. I have tried multiple apps but I have not found any others that will download from that site.
When I play this orig.mp4 in VLC, it shows that it is using the H264 codec and the frame rate is 94.126760. In another MP4 that I have downloaded from that site where the video and audio is out of sync, the frame rate is 33.056366. Those two seem like really weird rates - which is probably an indication that something is wrong. Except for these two MP4s, when I use my Adobe Premiere Elements 14 to edit the MP4s from that site, I see a value of 30 fps and VLC shows a frame rate for 29.969922 for those MP4s.
When I use Premier Elements to look at orig.mp4, the counter shows that I can only see 30 frames per second. It shows the file to be 2:24:31 long but nothing is cut off at the end. And, the place in orig.mp4 in VLC where it speeds up is at 1:38:38 in Premier Elements and the video does not speed up at that point.
I can't figure out what is going on here, what to look for to fix, and, how to fix it. In addition to fixing this MP4, I want to understand more about how the problem happened and how to figure out what needs to change. So, I have several questions:
- first, is "frames per second" and "frame rate" the same thing and, if not, how are they different?
- what tool can I use to see exactly where this change is happening?
- what is the name of the setting(s) that I am looking for to see the change?
- other than trying to concatenating two files with different fps, is it really possible to have an MP4 that has a fps change within an MP4?
- I know that speeding up the video (a la Benny Hill) is desirable in some situations, but, how /why would a video downloader want to, or be able to, do that?
- if I decide to use the ffmpeg "setpts" switch to fix this, how can I figure out exactly what value to use?
- is there a tool other than ffmpeg that can fix this problem?
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays!
+ Reply to Thread
Results 1 to 30 of 38
Thread
-
Last edited by the_steve_randolph; 5th Sep 2021 at 21:22. Reason: removing the links to the named apps
-
Code:
General Complete name : C:\out.mp4 Format : MPEG-4 Format profile : Base Media Codec ID : isom (isom/iso2/avc1/mp41) File size : 7.82 GiB Duration : 2 h 51 min Overall bit rate mode : Variable Overall bit rate : 6 512 kb/s Video ID : 1 Format : AVC Format/Info : Advanced Video Codec Format profile : High@L4 Format settings : CABAC / 4 Ref Frames Format settings, CABAC : Yes Format settings, Reference frames : 4 frames Codec ID : avc1 Codec ID/Info : Advanced Video Coding Duration : 54 min 44 s Source duration : 2 h 24 min Bit rate : 7 620 kb/s Width : 1 912 pixels Original width : 1 920 pixels Height : 1 088 pixels Original height : 1 080 pixels Display aspect ratio : 16:9 Frame rate mode : Variable Frame rate : 35.648 FPS Minimum frame rate : 5.994 FPS Maximum frame rate : 120.000 FPS Original frame rate : 29.970 (30000/1001) FPS Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Bits/(Pixel*Frame) : 0.103 Stream size : 2.45 GiB (31%) Source stream size : 7.70 GiB (98%) mdhd_Duration : 3284125 Codec configuration box : avcC Audio ID : 2 Format : AAC LC Format/Info : Advanced Audio Codec Low Complexity Codec ID : mp4a-40-2 Duration : 2 h 51 min Bit rate mode : Variable Bit rate : 93.6 kb/s Maximum bit rate : 424 kb/s Channel(s) : 2 channels Channel layout : L R Sampling rate : 44.1 kHz Frame rate : 43.066 FPS (1024 SPF) Compression mode : Lossy Stream size : 115 MiB (1%) Text #1 ID : 1-CC1 Format : EIA-608 Muxing mode : SCTE 128 / DTVCC Transport Muxing mode, more info : Muxed in Video #1 Duration : 54 min 44 s Bit rate mode : Constant Stream size : 0.00 Byte (0%) CaptionServiceName : CC1 Text #2 ID : 1-CC3 Format : EIA-608 Muxing mode : SCTE 128 / DTVCC Transport Muxing mode, more info : Muxed in Video #1 Duration : 54 min 44 s Bit rate mode : Constant Stream size : 0.00 Byte (0%) CaptionServiceName : CC3
-
After executing this command, I play the newout.mp4 in both VLC and Zoom Player. The video track stops at 54:44 (this end is before the actual end of the MP4 file) but the audio track continues to the end at 2:51:54. The original out.mp4 has the size of 8199 MB in Windows Explorer but the newout.mp4 has the size of 2691 MB. This is the Mediainfo output of outnew.mp4:
Code:General Complete name : C:\newout.mp4 Format : MPEG-4 Format profile : Base Media Codec ID : isom (isom/iso2/avc1/mp41) File size : 2.57 GiB Duration : 2 h 51 min Overall bit rate : 2 137 kb/s Writing application : Lavf58.78.100 Video ID : 1 Format : AVC Format/Info : Advanced Video Codec Format profile : High@L4 Format settings : CABAC / 4 Ref Frames Format settings, CABAC : Yes Format settings, Reference frames : 4 frames Codec ID : avc1 Codec ID/Info : Advanced Video Coding Duration : 54 min 45 s Source duration : 54 min 45 s Bit rate : 6 405 kb/s Maximum bit rate : 20.1 Mb/s Width : 1 920 pixels Height : 1 080 pixels Display aspect ratio : 16:9 Frame rate mode : Variable Frame rate : 29.970 (30000/1001) FPS Minimum frame rate : 5.994 FPS Maximum frame rate : 121.091 FPS Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Bits/(Pixel*Frame) : 0.103 Stream size : 2.45 GiB (95%) Source stream size : 2.45 GiB (95%) mdhd_Duration : 3285870 Codec configuration box : avcC Audio ID : 2 Format : AAC LC Format/Info : Advanced Audio Codec Low Complexity Codec ID : mp4a-40-2 Duration : 2 h 51 min Bit rate mode : Constant Bit rate : 93.6 kb/s Channel(s) : 2 channels Channel layout : L R Sampling rate : 44.1 kHz Frame rate : 43.066 FPS (1024 SPF) Compression mode : Lossy Stream size : 115 MiB (4%) Default : Yes Alternate group : 1 Text #1 ID : 1-CC1 Format : EIA-608 Muxing mode : SCTE 128 / DTVCC Transport Muxing mode, more info : Muxed in Video #1 Duration : 54 min 45 s Bit rate mode : Constant Stream size : 0.00 Byte (0%) CaptionServiceName : CC1 Text #2 ID : 1-CC3 Format : EIA-608 Muxing mode : SCTE 128 / DTVCC Transport Muxing mode, more info : Muxed in Video #1 Duration : 54 min 45 s Bit rate mode : Constant Stream size : 0.00 Byte (0%) CaptionServiceName : CC3
Last edited by the_steve_randolph; 18th Aug 2021 at 01:51.
-
-
Perhaps something like this to force the 29.97 constant frame rate. It's going to re-encode the file
Code:ffmpeg -r 29.970 -vsync 1 -i in.mp4 -c:v libx264 out29.mp4
-
Sounds like someone joined 2 segments together that had different encoding parameters. I've had this happen to me and I've always had to split at the mismatch point and reencode the failing half. If you use ffprobe you will probably see some wild swings in PTS and DTS times, especially at the join point.
-
-
When running this command, ffmpeg generated the message "More than 1000 frames duplicated" at the 00:34:09.53 mark while continuing. It also displayed the "q=29.0" information during the re-encoding. The resulting output file showed an O/S size of 2068 MB and a time of 2:51:54. When I clicked on the output file to view it in VLCl], a panel displayed that said:
VLC crash reporting
Ooops: VLC media player just crashed.
Would you like to send a bug report to the developers team?
Yes No
My computer then automatically opened VLC with the MP4 that showed a length of 2:51:54. The video was in sync with the audio, but, stopped at 54:44 while the audio continued until the end. VLC shows a fps of 29.970000 -
First, why would a streaming service do that? Second, I don't see that "speeding up" effect when viewing the streaming file in real time. Third, when I run ffprobe on the file, I get the same output as from ffmpeg - so I am not sure what you are claiming I will see. Please clarify.
Last edited by the_steve_randolph; 18th Aug 2021 at 04:27.
-
When I run that command, ffmpeg displays the "q=31.0" information during the re-encoding. After it is finished, the O/S information shows the file to be 1829 MB in size and 54:44 in length. VLC shows the file to be 54:44 in length, the fps is 29.970030, and, the video quality is greatly reduced. In VLC the video and audio are in sync, and, everything ends at 54:44.
Last edited by the_steve_randolph; 18th Aug 2021 at 04:39.
-
Another one
Code:ffmpeg -i out.mp4 -map 0 -c:v copy -c:s copy -c:a ac3 -b:a 256k newout.mp4
Last edited by ProWo; 18th Aug 2021 at 06:37.
-
-
-
-
It's a portable program to repair truncated avc videos.
Unpack the archive and start untrunc-gui.
In the left field search for the reference file (read above), in the right field for your out.mp4.
Then click on untrunc (bottom right).
That's all. -
OK, several issues. I have Avidemux but don't know how to use it. So, I don't know what you mean by "cut the first 1min with Avidemux". If you mean, create a 1 minute file from the first minute of the MP4, I can do that with my Premiere Elements. But, I don't know if Avidemux is doing something special other than just taking the first minute. Plus, again, I don't know how to use Avidemux, so, I don't know how to use it to get just the first minute. But, I ran it and opened my MP4 and it generated this error:
This video contains B-frames, but presentation time stamps (PTS) are either missing or monotonically increasing. Avidemux can try to reconstruct correct PTS by decoding the entire video. This may take a lot of time. Proceed?
Can you tell me what Avidemux and untrunc are doing according to what you want me to do? And, why do you think that the video is "truncated" when it seems that part of it is sped up? -
My suspicion, FWIW, is that the download was in 2 pieces with different formats, sampling rates, etc. During a scrne change the second part began streaming behind the first. You streaming device accepts different formats so it play fine. Capturing as one file does not play well during the second half.
My suggestion is to cut the final third of the video and see if that plays ok. -
I used the same video downloader (Video DownloadHelper) to download multiple MP4s from the same site that are larger/longer than my problem MP4 and those other MP4s do not have the same problem. Also, what is "a scrne change"? Video DownloadHelper does not give me any information or options that indicate this particular file is in two parts, although the fact that I have downloaded this file multiple times and the problem starts at the same timestamp every time lends itself to the idea that it may be in two parts at some point in my process. But, why would the streaming site create two parts that have "different formats, sampling rates, etc."? My "streaming device" is my PC and I am viewing it in Firefox and using Video DownloadHelper in the same browser window.
My suggestion is to cut the final third of the video and see if that plays ok. -
Oh, OK, I thought you meant to get rid of the end part.
So, I ran this command to get the part after the video starts to speed up:
Code:ffmpeg -ss 01:57:10.000 -in.mp4 -c copy out2.mp4
So, this would prove that the first part is not causing problems for the second part.
The MediaInfo for the original MP4 is in post #3. And, here is the MediaInfo for this MP4:
Code:General Complete name : C:out2.mp4 Format : MPEG-4 Format profile : Base Media Codec ID : isom (isom/iso2/avc1/mp41) File size : 79.7 MiB Overall bit rate : 156 b/s Writing application : Lavf58.78.100 Video ID : 1 Format : AVC Format/Info : Advanced Video Codec Format profile : High@L4 Format settings : CABAC / 4 Ref Frames Format settings, CABAC : Yes Format settings, Reference frames : 4 frames Codec ID : avc1 Codec ID/Info : Advanced Video Coding Source duration : 17 ms Bit rate : 61.1 Mb/s Width : 1 920 pixels Height : 1 080 pixels Display aspect ratio : 16:9 Frame rate mode : Constant Frame rate : 59.940 (59940/1000) FPS Original frame rate : 29.970 (30000/1001) FPS Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Bits/(Pixel*Frame) : 0.492 Stream size : 29.8 TiB Source stream size : 124 KiB (0%) mdhd_Duration : 43977728 Codec configuration box : avcC Audio ID : 2 Format : AAC LC Format/Info : Advanced Audio Codec Low Complexity Codec ID : mp4a-40-2 Duration : 54 min 44 s Source duration : 1 h 57 min Bit rate mode : Constant Bit rate : 93.6 kb/s Channel(s) : 2 channels Channel layout : L R Sampling rate : 44.1 kHz Frame rate : 43.066 FPS (1024 SPF) Compression mode : Lossy Stream size : 36.6 MiB (46%) Source stream size : 78.4 MiB (98%) Default : Yes Alternate group : 1 mdhd_Duration : 3284536
Last edited by the_steve_randolph; 18th Aug 2021 at 10:40.
-
I gave you some hints and you answer with questions instead of working off the hints.
I am out
Similar Threads
-
How do I synchronize audio with video in an MP4 file?
By ilyaz in forum Video ConversionReplies: 3Last Post: 31st Mar 2022, 07:13 -
how do i replace part of mp4 file
By cns00 in forum EditingReplies: 7Last Post: 2nd Jan 2021, 10:05 -
How to Remove Some Middle Part From Video .mp4 File
By Daringbaaz in forum Newbie / General discussionsReplies: 2Last Post: 12th Feb 2019, 07:02 -
ToolNix / Avidemux merging mp4, 2nd part grey video correct audio
By jfjfjf in forum EditingReplies: 5Last Post: 18th Nov 2017, 16:56 -
MP4Box: How to extract a given part of a mp4 video
By semantics in forum Newbie / General discussionsReplies: 1Last Post: 9th Jan 2017, 18:38