VideoHelp Forum

+ Reply to Thread
Results 1 to 6 of 6
Thread
  1. I have an MP4 file and I want to discard all content from 2:22:27 to the end. Using the command
    Code:
    mp4box -splitx 0:8547 input.mp4 --alltk
    produces an MP4 file which, according to Windows Explorer, is 2:20:43 long (the first oddity; the file should be almost two minutes longer).

    Additionally, when watching the output in VLC, the timeline shows a length of 2:20:43, but the audio ends at 1:55:26 and the video ends one second later, at which point VLC closes the file automatically. According to the SRT extracted from the output MP4 with My MP4Box GUI, the subtitles end at that time as well. I want to clarify that the input file (length 2h39min) has fully uncorrupted video, audio and subtitles.

    Does anybody know what is going on here and how I can fix it?

    I am not using ffmpeg because it can't seem to handle the tx3g subtitle stream particularly well; the MP4 created by ffmpeg contains a subtitle stream but no subs are shown by VLC when activated.

    Thank you!
    Last edited by Fleand; 17th Jul 2021 at 07:35.
    Quote Quote  
  2. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Post the complete text view mediainfo report of the source file
    Quote Quote  
  3. Originally Posted by davexnet View Post
    Post the complete text view mediainfo report of the source file
    Source file:
    Code:
    General
    Complete name                            : D:\input.mp4
    Format                                   : MPEG-4
    Format profile                           : Base Media / Version 2
    Codec ID                                 : mp42 (mp42/isom/iso2/iso5/dash/avc1/dby1/mp41)
    File size                                : 5.79 GiB
    Duration                                 : 2 h 39 min
    Overall bit rate                         : 5 188 kb/s
    
    Video
    ID                                       : 1
    Format                                   : AVC
    Format/Info                              : Advanced Video Codec
    Format profile                           : Main@L3.2
    Format settings                          : CABAC / 2 Ref Frames
    Format settings, CABAC                   : Yes
    Format settings, Reference frames        : 2 frames
    Format settings, GOP                     : M=2, N=80
    Codec ID                                 : avc1
    Codec ID/Info                            : Advanced Video Coding
    Duration                                 : 2 h 39 min
    Bit rate                                 : 4 554 kb/s
    Width                                    : 1 280 pixels
    Height                                   : 720 pixels
    Display aspect ratio                     : 16:9
    Frame rate mode                          : Constant
    Frame rate                               : 50.000 FPS
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Progressive
    Bits/(Pixel*Frame)                       : 0.099
    Stream size                              : 5.08 GiB (88%)
    Language                                 : German
    Codec configuration box                  : avcC
    
    Audio #1
    ID                                       : 2
    Format                                   : AAC LC
    Format/Info                              : Advanced Audio Codec Low Complexity
    Codec ID                                 : mp4a-40-2
    Duration                                 : 2 h 39 min
    Bit rate mode                            : Constant
    Bit rate                                 : 128 kb/s
    Channel(s)                               : 2 channels
    Channel layout                           : L R
    Sampling rate                            : 48.0 kHz
    Frame rate                               : 46.875 FPS (1024 SPF)
    Compression mode                         : Lossy
    Stream size                              : 145 MiB (2%)
    Language                                 : German
    Default                                  : Yes
    Alternate group                          : 1
    
    Audio #2
    ID                                       : 3
    Format                                   : E-AC-3
    Format/Info                              : Enhanced AC-3
    Commercial name                          : Dolby Digital Plus
    Codec ID                                 : ec-3
    Duration                                 : 2 h 39 min
    Bit rate mode                            : Constant
    Bit rate                                 : 256 kb/s
    Channel(s)                               : 6 channels
    Channel layout                           : L R C LFE Ls Rs
    Sampling rate                            : 48.0 kHz
    Frame rate                               : 31.250 FPS (1536 SPF)
    Compression mode                         : Lossy
    Stream size                              : 292 MiB (5%)
    Language                                 : German
    Service kind                             : Complete Main
    Default                                  : No
    Alternate group                          : 1
    
    Text
    ID                                       : 4
    Format                                   : Timed Text
    Muxing mode                              : sbtl
    Codec ID                                 : tx3g
    Duration                                 : 2 h 39 min
    Bit rate                                 : 131 b/s
    Stream size                              : 153 KiB (0%)
    Language                                 : German
    Default                                  : Yes
    Forced                                   : No
    Alternate group                          : 2
    And the outputted file:
    Code:
    General
    Complete name                            : D:\input_0.1000_8547000.1000.mp4
    Format                                   : MPEG-4
    Format profile                           : Base Media / Version 2
    Codec ID                                 : mp42 (isom/mp42/iso2/iso5/dash/avc1/dby1/mp41)
    File size                                : 4.00 GiB
    Duration                                 : 2 h 20 min
    Overall bit rate mode                    : Variable
    Overall bit rate                         : 4 067 kb/s
    Encoded date                             : UTC 2021-07-17 05:50:36
    Tagged date                              : UTC 2021-07-17 05:50:36
    
    Video
    ID                                       : 1
    Format                                   : AVC
    Format/Info                              : Advanced Video Codec
    Format profile                           : Main@L3.2
    Format settings                          : CABAC / 2 Ref Frames
    Format settings, CABAC                   : Yes
    Format settings, Reference frames        : 2 frames
    Format settings, GOP                     : M=2, N=80
    Codec ID                                 : avc1
    Codec ID/Info                            : Advanced Video Coding
    Duration                                 : 1 h 55 min
    Bit rate                                 : 4 566 kb/s
    Maximum bit rate                         : 6 409 kb/s
    Width                                    : 1 280 pixels
    Height                                   : 720 pixels
    Display aspect ratio                     : 16:9
    Frame rate mode                          : Constant
    Frame rate                               : 50.000 FPS
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Progressive
    Bits/(Pixel*Frame)                       : 0.099
    Stream size                              : 3.68 GiB (92%)
    Language                                 : German
    Tagged date                              : UTC 2021-07-17 05:54:00
    Codec configuration box                  : avcC
    
    Audio #1
    ID                                       : 2
    Format                                   : AAC LC
    Format/Info                              : Advanced Audio Codec Low Complexity
    Codec ID                                 : mp4a-40-2
    Duration                                 : 1 h 55 min
    Bit rate mode                            : Variable
    Bit rate                                 : 127 kb/s
    Maximum bit rate                         : 147 kb/s
    Channel(s)                               : 2 channels
    Channel layout                           : L R
    Sampling rate                            : 48.0 kHz
    Frame rate                               : 46.875 FPS (1024 SPF)
    Compression mode                         : Lossy
    Stream size                              : 105 MiB (3%)
    Language                                 : German
    Default                                  : Yes
    Alternate group                          : 1
    Tagged date                              : UTC 2021-07-17 05:54:00
    
    Audio #2
    ID                                       : 3
    Format                                   : E-AC-3
    Format/Info                              : Enhanced AC-3
    Commercial name                          : Dolby Digital Plus
    Codec ID                                 : ac-3
    Duration                                 : 1 h 55 min
    Bit rate mode                            : Constant
    Bit rate                                 : 256 kb/s
    Maximum bit rate                         : 270 kb/s
    Channel(s)                               : 6 channels
    Channel layout                           : L R C LFE Ls Rs
    Sampling rate                            : 48.0 kHz
    Frame rate                               : 31.250 FPS (1536 SPF)
    Compression mode                         : Lossy
    Stream size                              : 211 MiB (5%)
    Language                                 : German
    Service kind                             : Complete Main
    Default                                  : No
    Alternate group                          : 1
    Tagged date                              : UTC 2021-07-17 05:54:00
    
    Text
    ID                                       : 4
    Format                                   : Timed Text
    Muxing mode                              : sbtl
    Codec ID                                 : tx3g
    Duration                                 : 2 h 20 min
    Bit rate mode                            : Variable
    Bit rate                                 : 130 b/s
    Stream size                              : 134 KiB (0%)
    Language                                 : German
    Default                                  : Yes
    Forced                                   : No
    Alternate group                          : 2
    Tagged date                              : UTC 2021-07-17 05:54:00
    Quote Quote  
  4. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    I don't see anything suspicious. Have you tried remuxing the whole file with ffmpeg to another mp4
    then using mp4box with the new file?
    Quote Quote  
  5. Originally Posted by davexnet View Post
    I don't see anything suspicious.
    I noticed that the file outputted by mp4box is exactly 4.00 GiB large, is that maybe some sort of limit for mp4box?


    Originally Posted by davexnet View Post
    Have you tried remuxing the whole file with ffmpeg to another mp4 then using mp4box with the new file?
    Unfortunately, as soon as ffmpeg "touches" my file, the subtitles become broken. I assume you are suggesting something like this?
    Code:
    ffmpeg -i input.mp4 -map 0 -c copy input2.mp4
    Then input2.mp4 does not seem to have working subtitles. I have extracted the subtitle files from both input.mp4 and input2.mp4 via "mp4box -raw 4" and attached them (or you can find them here: https://we.tl/t-Jww3LmqGN8)
    Maybe somebody can see what the issue with the subtitles seems to be, because if I find a solution for that, I won't have to use mp4box for the cutting at all since ffmpeg does that just fine (save for the subtitles).
    Image Attached Files
    Last edited by Fleand; 17th Jul 2021 at 19:55.
    Quote Quote  
  6. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    There was this from 2016
    https://github.com/gpac/gpac/issues/680
    Quote Quote  



Similar Threads