It has happened to me a few times where an h264 mp4 file will play perfectly in VLC, but not at all in Quicktime player.
Quicktime will open the file. But when you press play, there's is a long pause, and after a few seconds the elapsed time starts to count up. The video freezes on one of the first frames, and the audio plays in the background.
FFPLAY works fine
MPLAYER shows frozen garbage with audio in the background.
Why?
Here is meta info from a sample file:
Code:ffprobe version 4.4.1 Copyright (c) 2007-2021 the FFmpeg developers Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/joe/test.mp4': Metadata: compatible_brands: isommp42 major_brand : isom minor_version : 0 creation_time : 2020-08-08T11:08:03.000000Z encoder : Lavf58.12.100 Duration: 00:40:39.15, start: 0.000000, bitrate: 1811 kb/s Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 960x544 [SAR 1:1 DAR 30:17], 1613 kb/s, 23.97 fps, 23.98 tbr, 14336 tbn, 56 tbc (default) Metadata: creation_time : 2020-08-08T11:08:03.000000Z handler_name : VideoHandler vendor_id : [0][0][0][0] Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 192 kb/s (default) Metadata: creation_time : 2020-08-08T11:08:03.000000Z handler_name : SoundHandler vendor_id : [0][0][0][0]
+ Reply to Thread
Results 1 to 30 of 44
-
Last edited by exekutive; 3rd Jan 2022 at 05:38.
-
remuxing doesn't help.
Interesting that in all non-playing cases, the encoder is Lavf58.12.100Last edited by exekutive; 4th Jan 2022 at 04:13.
-
if you have ffmpeg installed, try ffmpeg -i input.mp4 -vcodec copy -acodec copy -tag:v hvc1 output.mp4
see if this works - https://discussions.apple.com/thread/252776714 -
@october262
Code:[mp4 @ 0x7fafb4022800] Tag hvc1 incompatible with output codec id '27' (avc1) Could not write header for output file #0 (incorrect codec parameters ?): Invalid data found when processing input Error initializing output stream 0:1 --
HVC1 is a h265 designation. The topic you linked is about h265 video.
Furthermore the issue the poster in that Apple discussion was having had nothing to do with tags. The problem was that he was trying to play 4:2:2 video. Not my case.
I'm trying to play h264 4:2:0 video as you can see from the info I included.Last edited by exekutive; 5th Jan 2022 at 02:28.
-
Code:
General Complete name : /Users/joe/stage/corrupt.mp4 Format : MPEG-4 Format profile : Base Media Codec ID : isom (isom/iso2/avc1/mp41) File size : 527 MiB Duration : 40 min 39 s Overall bit rate : 1 812 kb/s Encoded date : UTC 2020-08-08 11:08:03 Tagged date : UTC 2020-08-08 11:08:03 major_brand : isom minor_version : 0 compatible_brands : isommp42 creation_time : 2020-08-08T11:08:03.000000Z encoder : Lavf58.12.100 Video ID : 1 Format : AVC Format/Info : Advanced Video Codec Format profile : High@L3.1 Format settings : CABAC / 4 Ref Frames Format settings, CABAC : Yes Format settings, Reference frames : 4 frames Format settings, GOP : M=1, N=12 Codec ID : avc1 Codec ID/Info : Advanced Video Coding Duration : 40 min 39 s Bit rate : 1 614 kb/s Width : 960 pixels Height : 544 pixels Display aspect ratio : 16:9 Original display aspect ratio : 16:9 Frame rate mode : Variable Frame rate : 23.976 (23976/1000) FPS Minimum frame rate : 11.987 FPS Maximum frame rate : 59.733 FPS Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Bits/(Pixel*Frame) : 0.129 Stream size : 469 MiB (89%) Language : English Encoded date : UTC 2020-08-08 11:08:03 Tagged date : UTC 2020-08-08 11:08:03 Codec configuration box : avcC Audio ID : 2 Format : AAC LC Format/Info : Advanced Audio Codec Low Complexity Codec ID : mp4a-40-2 Duration : 40 min 39 s Bit rate mode : Constant Bit rate : 192 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 : 55.8 MiB (11%) Language : English Default : Yes Alternate group : 1 Encoded date : UTC 2020-08-08 11:08:03 Tagged date : UTC 2020-08-08 11:08:03
-
Could be the profile level. Check the working files levels.
You could change the profile level for a test from 3.1 to 3.0.
Can be done without reencode with clever Ffmpeg-GUI. -
-
I tried with ffmpeg
Code:ffmpeg -i in.mp4 -c copy -level:v 3.0 out.mp4
-
Properly changing the level requires a reencode simply remuxing can only change the headers not the content,...
users currently on my ignore list: deadrats, Stears555, marcorocchini -
-
I have other videos with the same codec ID, major/compatible brand, and they play fine
Quicktime has no problem with VFR video. Not surprising since Quicktime player itself record VFR video and so do Apple devices.
That's what I thought.
If you make a Mac port, then I'll try it.
If it can be done with a GUI, it can be done with the CLI
It could be the Mac forum, and yes Quicktime player is Apple software for Macs. -
It's ages since I used Quicktime, but here are a few thoughts from me:
VLC, FFplay,.. all use libav.
No clue why mplayer can't play the file, my guess is that the container parser doesn't properly handle vfr content. (if used through a command line adding '-demuxer lavf' probably helps)
Quicktime has limited H.264 support (not all profiles, no 10bit, chapters&subtitle need special meta data,..) older quicktime didn't support H.264 fiels where the first audio stream is something other than aac,... Might also be an issue with b-frame, iirc. Quicktime does not support more than one b-frame.
Quick Google search gave me: http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-quicktime-7.html
QuickTime's support for H.264 is limited, so you will need to drop some advanced features. If you encode your video with features that QuickTime 7 does not support, QuickTime-based players will show you a pretty white screen instead of your expected video.[list][*]B-frames: QuickTime 7 supports a maximum of 1 B-frame, i.e. -x264encopts bframes=1. This means that b_pyramid and weight_b will have no effect, since they require bframes to be greater than 1.[*]Macroblocks: QuickTime 7 does not support 8x8 DCT macroblocks. This option (8x8dct) is off by default, so just be sure not to explicitly enable it. This also means that the i8x8 option will have no effect, since it requires 8x8dct.[*]Aspect ratio: QuickTime 7 does not support SAR (sample aspect ratio) information in MPEG-4 files; it assumes that SAR=1. Read the section on scaling for a workaround. QuickTime X no longer has this limitation.
Cu Selurusers currently on my ignore list: deadrats, Stears555, marcorocchini -
Well Apple have released Windoze versions as well hence the confusion.
I have a version installed and many h264 vids with similar codec characteristics but not such an extreme VFR as that one (several were created with avidemux which I believe uses ffmpeg for the encoding.
And not one of them plays in Quicktime
You might try a quick COPY using avidemux just to see if it solves the issue.
Yet, as our friend points out, without an actual example we can not explore this further. -
Last edited by exekutive; 8th Jan 2022 at 12:51.
-
And is the Mac version any more recent ? Not according to the software page here.
Well if you do not want assistance.......
Or just accept that you need to use a different player. -
try ffmpeg -i in.mp4 -c:v libx264 -profile:v high10 -level:v 4.0 -vf scale=300:-1 -vf format=yuv420p o.mp4
https://stackoverflow.com/questions/59741043/quicktime-not-playing-a-h264-aac-encoded-file-why -
Very strange this
https://support.apple.com/downloads/quicktime
No note about version 10 (other than an OS) -
I know the file work if I re-encode it.
I'm trying to find out why it doesn't play in QT as-is (despite working fine in most other SW)
That person is getting a "This file isn't compatible with quicktime player" error. I am not.
They are trying to play a 10 bit file (yuv420p10le). Mine is plain old yuv420
The file opens and plays, but the video is frozen as I described in my original post. -
-
Interesting. Without the lavf option, mplayer just displays green garbage. With the option, it freezes on the opening title , with sound in bg, just like Quicktime. I wonder if they share the same limitations.
I guess that must be it. That's disappointing considering Quicktime is modern software and actively developed. What's more surprising is that Apple adopted AVC very early on, and is an AVC patent holder. They aggressively pushed the standard in commercial downloading, and helped leverage AAC into popularity with iTunes. Maybe it has to do with the Nokia lawsuits, or maybe they only want to support their own devices and commercial media content.
That's a fairly old document. Would be interesting to find a more recent one.
what would you do with it? -
what would you do with it?
b. try some other things if after the analysis it' still unclear what the issue is (+ test in a Mac VM) (check frame types, validate headers & video stream, test whether removing the audio fixes the video playback,....)
That's a fairly old document. Would be interesting to find a more recent one.
b. mencoder&mplayer are no longer developed
-> nobody will update it
About the demuxer: if your video is inside a .mov and not .mp4 container, you could try '-demuxer mov'.
Cu Selur
Ps.: a short sample (a few seconds with a scene change in it) that allows the reproduction is enough,..users currently on my ignore list: deadrats, Stears555, marcorocchini
Similar Threads
-
Potplayer doesn't play this video
By ConverterCrazy in forum Newbie / General discussionsReplies: 11Last Post: 4th Mar 2021, 09:14 -
h264 to h265 doesn't reduce size
By Hahaha in forum Video ConversionReplies: 11Last Post: 6th May 2020, 03:33 -
How can I get GraphEdit to resolve a Quicktime lossless H264 4:2:2 4K file?
By GoauldGod in forum Video ConversionReplies: 5Last Post: 6th May 2019, 10:38 -
VLC doesn't play m3u8 file
By Nagasaki in forum Video Streaming DownloadingReplies: 0Last Post: 4th Mar 2018, 12:48 -
Samsung TV doesn't play 4K clip
By geohei in forum Video ConversionReplies: 3Last Post: 28th Jul 2017, 01:39