VideoHelp Forum

+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 44
Thread
  1. 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]
    Image Attached Thumbnails Click image for larger version

Name:	vlc.png
Views:	7
Size:	426.8 KB
ID:	62720  

    Last edited by exekutive; 3rd Jan 2022 at 06:38.
    Quote Quote  
  2. Try to remux only the mp4. Can be done by clever FFmpeg-GUI.
    Quote Quote  
  3. remuxing doesn't help.

    Interesting that in all non-playing cases, the encoder is Lavf58.12.100
    Last edited by exekutive; 4th Jan 2022 at 05:13.
    Quote Quote  
  4. Member
    Join Date
    Feb 2006
    Location
    United States
    Search Comp PM
    Originally Posted by exekutive View Post
    remuxing doesn't help.

    Interesting that in all non-playing cases, the encoder is Lavf58.12.100
    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
    Quote Quote  
  5. @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 --
    resulting file was 0 bytes.

    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 03:28.
    Quote Quote  
  6. Could you post a mediainfo report (text mode) of the buggy mp4 file here?
    Missing some details in your info above.
    Quote Quote  
  7. Originally Posted by ProWo View Post
    Could you post a mediainfo report (text mode) of the buggy mp4 file here?
    Missing some details in your info above.
    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
    Quote Quote  
  8. 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.
    Quote Quote  
  9. I generated a sample video with video Format Profile: High@L3.1 using Handbrake. It plays just fine in Quicktime player.

    As far as I know, profile cannot be changed without transcoding.
    Last edited by exekutive; 6th Jan 2022 at 03:15.
    Quote Quote  
  10. Originally Posted by exekutive View Post
    As far as I know, profile cannot be changed without transcoding.
    Profile no, but level yes.
    I wrote this because some TV players do not play certain levels, e.g. high l3.2 does not but high l3.0 does.
    Quote Quote  
  11. I tried with ffmpeg
    Code:
    ffmpeg -i in.mp4 -c copy -level:v 3.0 out.mp4
    but mediainfo shows the level is still 3.1
    Quote Quote  
  12. 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
    Quote Quote  
  13. Member DB83's Avatar
    Join Date
    Jul 2007
    Location
    United Kingdom
    Search Comp PM
    Originally Posted by ProWo View Post
    Use clever Ffmpeg-GUI

    The OP is on a Mac !!!


    Methinks the issue is that quirky ISOM. Variable frame-rate does not help either.
    Quote Quote  
  14. Originally Posted by DB83 View Post
    The OP is on a Mac !!!
    How do you know that? Because he uses Quicktime?
    Quote Quote  
  15. Member DB83's Avatar
    Join Date
    Jul 2007
    Location
    United Kingdom
    Search Comp PM
    Educated guess.


    He posted in the Mac forum.
    Quote Quote  
  16. Originally Posted by DB83 View Post
    Educated guess.


    He posted in the Mac forum.
    Ok, sorry, my mistake
    Quote Quote  
  17. Originally Posted by DB83 View Post
    Methinks the issue is that quirky ISOM.
    I have other videos with the same codec ID, major/compatible brand, and they play fine

    Originally Posted by DB83 View Post
    Variable frame-rate does not help either.
    Quicktime has no problem with VFR video. Not surprising since Quicktime player itself record VFR video and so do Apple devices.

    Originally Posted by Selur View Post
    Properly changing the level requires a reencode simply remuxing can only change the headers not the content,...
    That's what I thought.

    Originally Posted by ProWo View Post
    Use clever Ffmpeg-GUI
    If you make a Mac port, then I'll try it.

    Originally Posted by ProWo View Post
    Can be done without reencode with clever Ffmpeg-GUI.
    If it can be done with a GUI, it can be done with the CLI

    Originally Posted by ProWo View Post
    How do you know that? Because he uses Quicktime?
    It could be the Mac forum, and yes Quicktime player is Apple software for Macs.
    Quote Quote  
  18. There must be a reason why some software can play it, and some does not. They must decode differently.

    I tried a few different applications:

    VLC - Yes
    AVIdemux - Yes
    FFplay - Yes
    Osmo4 - Yes
    mpv (forked from MPlayer)- Yes
    SMPlayer - Yes

    Quicktime - No
    MPlayer - No
    Quote Quote  
  19. 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.
    -> without access to a file which you can't playback that is as much as I can say about the issue at hand

    Cu Selur
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  20. Member DB83's Avatar
    Join Date
    Jul 2007
    Location
    United Kingdom
    Search Comp PM
    Originally Posted by exekutive View Post


    Originally Posted by ProWo View Post
    How do you know that? Because he uses Quicktime?
    It could be the Mac forum, and yes Quicktime player is Apple software for Macs.

    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.
    Quote Quote  
  21. Originally Posted by DB83 View Post
    Apple have released Windoze versions
    Not since 2016


    Originally Posted by DB83 View Post
    avidemux which I believe uses ffmpeg for the encoding...
    You might try a quick COPY using avidemux just to see if it solves the issue.
    Results of remuxing with ffmpeg are above


    Originally Posted by DB83 View Post
    without an actual example we can not explore this further.
    what would you do with it?
    Last edited by exekutive; 8th Jan 2022 at 13:51.
    Quote Quote  
  22. Member DB83's Avatar
    Join Date
    Jul 2007
    Location
    United Kingdom
    Search Comp PM
    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.
    Quote Quote  
  23. Member
    Join Date
    Feb 2006
    Location
    United States
    Search Comp PM
    Originally Posted by exekutive View Post
    Originally Posted by DB83 View Post
    Apple have released Windoze versions
    Not since 2016


    Originally Posted by DB83 View Post
    avidemux which I believe uses ffmpeg for the encoding...
    You might try a quick COPY using avidemux just to see if it solves the issue.
    Results of remuxing with ffmpeg are above


    Originally Posted by DB83 View Post
    without an actual example we can not explore this further.
    what would you do with it?
    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
    Quote Quote  
  24. Originally Posted by DB83 View Post
    And is the Mac version any more recent ?
    7 years more recent. You're talking about version 7. I have version 10.
    Quicktime is a core MacOS component and is actively developed.




    Originally Posted by DB83 View Post
    Well if you do not want assistance.......
    I guess I'm looking for a different kind.
    Quote Quote  
  25. Member DB83's Avatar
    Join Date
    Jul 2007
    Location
    United Kingdom
    Search Comp PM
    Very strange this


    https://support.apple.com/downloads/quicktime


    No note about version 10 (other than an OS)
    Quote Quote  
  26. Originally Posted by october262 View Post
    try ffmpeg -i in.mp4 -c:v libx264 -profile:v high10 -level:v 4.0 -vf scale=300:-1 -vf format=yuv420p o.mp4
    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.
    Quote Quote  
  27. Originally Posted by DB83 View Post
    Very strange this
    Please ... I'm really not interested in arguing with you.

    It's ok if you don't know the answer. Just leave the topic alone.
    Image Attached Thumbnails Click image for larger version

Name:	Screen Shot 2022-01-09 at 01.45.13.png
Views:	4
Size:	185.8 KB
ID:	62834  

    Quote Quote  
  28. Originally Posted by Selur View Post
    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)
    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.



    Originally Posted by Selur View Post
    Quicktime has limited H.264 support (not all profiles, no 10bit, chapters&subtitle need special meta data,..)
    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.


    Originally Posted by Selur View Post
    That's a fairly old document. Would be interesting to find a more recent one.


    Originally Posted by Selur View Post
    without access to a file
    what would you do with it?
    Quote Quote  
  29. what would you do with it?
    a. properly analyse it (extract raw video look at what features are used, look at container headers with detailed mediainfo output)
    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.
    a. Quicktime restrictions regarding H.264 haven't changed since they first supported H.264 (same happend with MPEG-4 ASP) and the H.264 standard was finalized ages ago.
    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
    Quote Quote