VideoHelp Forum




+ Reply to Thread
Results 1 to 16 of 16
  1. What is the easiest way to put the sound from the video with a lower resolution to the other with a higher one?
    Need to convert framerate? Which is the correct way - on the video or on the sound? And how?

    Code:
    General
    Unique ID                      : 331632889004050566256917554047996010971 (0xF97E2BD0552CC88C632C59E280C621DB)
    Complete name                  : D:\ALF.01x01.720p.DVDRemux.MPEG2.AC3-STM.mkv
    Format                         : Matroska
    Format version                 : Version 4
    File size                      : 980 MiB
    Duration                       : 24 min 13 s
    Overall bit rate mode          : Variable
    Overall bit rate               : 5 655 kb/s
    Frame rate                     : 25.000 FPS
    Movie name                     : ALF.S01E01-STM
    Encoded date                   : 2020-04-18 12:21:22 UTC
    Writing application            : mkvmerge v45.0.0 ('Heaven in Pennies') 64-bit
    Writing library                : libebml v1.3.10 + libmatroska v1.5.2
    Cover                          : Yes
    Attachments                    : cover.jpg
    
    Video
    ID                             : 1
    Format                         : MPEG Video
    Format version                 : Version 2
    Format profile                 : Main@Main
    Format settings                : CustomMatrix / BVOP
    Format settings, BVOP          : Yes
    Format settings, Matrix        : Custom
    Format settings, GOP           : M=3, N=15
    Format settings, picture struc : Frame
    Codec ID                       : V_MPEG2
    Codec ID/Info                  : MPEG 1 or 2 Video
    Duration                       : 24 min 13 s
    Bit rate mode                  : Variable
    Bit rate                       : 4 691 kb/s
    Maximum bit rate               : 7 500 kb/s
    Width                          : 720 pixels
    Height                         : 576 pixels
    Display aspect ratio           : 4:3
    Frame rate mode                : Constant
    Frame rate                     : 25.000 FPS
    Standard                       : PAL
    Color space                    : YUV
    Chroma subsampling             : 4:2:0
    Bit depth                      : 8 bits
    Scan type                      : Interlaced
    Scan order                     : Top Field First
    Compression mode               : Lossy
    Bits/(Pixel*Frame)             : 0.452
    Time code of first frame       : 00:00:00:00
    Time code source               : Group of pictures header
    GOP, Open/Closed               : Open
    GOP, Open/Closed of first fram : Closed
    Stream size                    : 813 MiB (83%)
    Title                          : MPEG2, 576i50, 25.000 fps
    Default                        : No
    Forced                         : No
    
    Audio #1
    ID                             : 2
    Format                         : AC-3
    Format/Info                    : Audio Coding 3
    Commercial name                : Dolby Digital
    Codec ID                       : A_AC3
    Duration                       : 24 min 13 s
    Bit rate mode                  : Constant
    Bit rate                       : 192 kb/s
    Channel(s)                     : 2 channels
    Channel layout                 : L R
    Sampling rate                  : 48.0 kHz
    Frame rate                     : 31.250 FPS (1536 SPF)
    Compression mode               : Lossy
    Stream size                    : 33.3 MiB (3%)
    Title                          : Bulgarian, AC3, 2.0, 192 kbps
    Language                       : Bulgarian
    Service kind                   : Complete Main
    Default                        : Yes
    Forced                         : No
    Code:
    General
    Complete name                  : D:\Alf S01E01 A.L.F..mp4
    Format                         : MPEG-4
    Format profile                 : Base Media / Version 2
    Codec ID                       : mp42 (mp42/iso2/avc1/mp41)
    File size                      : 443 MiB
    Duration                       : 24 min 11 s
    Overall bit rate mode          : Variable
    Overall bit rate               : 2 562 kb/s
    Frame rate                     : 23.976 FPS
    Encoded date                   : 2022-07-17 13:08:13 UTC
    Tagged date                    : 2022-07-17 13:08:13 UTC
    Writing application            : HandBrake 1.4.0 2021071800
    
    Video
    ID                             : 1
    Format                         : AVC
    Format/Info                    : Advanced Video Codec
    Format profile                 : High@L4.1
    Format settings                : CABAC / 1 Ref Frames
    Format settings, CABAC         : Yes
    Format settings, Reference fra : 1 frame
    Codec ID                       : avc1
    Codec ID/Info                  : Advanced Video Coding
    Duration                       : 24 min 11 s
    Bit rate                       : 2 397 kb/s
    Width                          : 1 432 pixels
    Height                         : 1 072 pixels
    Display aspect ratio           : 4:3
    Frame rate mode                : Variable
    Frame rate                     : 23.976 (24000/1001) FPS
    Minimum frame rate             : 23.974 FPS
    Maximum frame rate             : 23.981 FPS
    Color space                    : YUV
    Chroma subsampling             : 4:2:0
    Bit depth                      : 8 bits
    Scan type                      : Progressive
    Bits/(Pixel*Frame)             : 0.065
    Stream size                    : 415 MiB (94%)
    Writing library                : x264 core 163 r3059 b684ebe0
    Encoding settings              : cabac=1 / ref=1 / deblock=1:0:0 / analyse=0x3:0 / me=hex / subme=9 / psy=0 / mixed_ref=0 / me_range=16 / chroma_me=0 / trellis=0 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=0 / threads=24 / lookahead_threads=16 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=0 / weightp=0 / keyint=240 / keyint_min=24 / scenecut=100 / intra_refresh=1 / rc_lookahead=32 / rc=crf / mbtree=0 / crf=24.8 / qcomp=1.00 / qpmin=0 / qpmax=69 / qpstep=2 / vbv_maxrate=62500 / vbv_bufsize=78125 / crf_max=0.0 / nal_hrd=none / filler=0 / ip_ratio=1.00 / aq=3:0.05
    Encoded date                   : 2022-07-17 13:08:13 UTC
    Tagged date                    : 2022-07-17 13:08:13 UTC
    Color range                    : Limited
    Color primaries                : BT.709
    Transfer characteristics       : BT.709
    Matrix coefficients            : BT.709
    Codec configuration box        : avcC
    
    Audio
    ID                             : 2
    Format                         : AAC LC
    Format/Info                    : Advanced Audio Codec Low Complexity
    Codec ID                       : mp4a-40-2
    Duration                       : 24 min 11 s
    Source duration                : 24 min 11 s
    Bit rate mode                  : Constant
    Bit rate                       : 160 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                    : 27.7 MiB (6%)
    Source stream size             : 27.7 MiB (6%)
    Title                          : Stereo / Stereo
    Language                       : English
    Default                        : Yes
    Alternate group                : 1
    Encoded date                   : 2022-07-17 13:08:13 UTC
    Tagged date                    : 2022-07-17 13:08:13 UTC
    mdhd_Duration                  : 1451755
    Quote Quote  
  2. You can use clever FFmpeg-GUI to change the audio, so the video quality isn't changed.

    Image
    [Attachment 75936 - Click to enlarge]
    Quote Quote  
  3. The new duration should be 00:24:11.
    The content of both video files is exactly the same. From start to finish 1:1. Only 2 seconds difference.
    Why does this happen?
    Image Attached Thumbnails Click image for larger version

Name:	Untitled.png
Views:	25
Size:	331.4 KB
ID:	75955  

    Last edited by amxcs; 4th Jan 2024 at 04:46.
    Quote Quote  
  4. Because the 23.976 fps video is shorter then the 25 fps video.
    The two videos are not the same.
    Last edited by ProWo; 4th Jan 2024 at 05:05.
    Quote Quote  
  5. Yes, by 2 seconds.
    And when I convert audio from 25 to 23.967, there is a difference of over 1 minute.

    As a test, I tried putting the audio from a 25fps video into the video with 23.976 at the beginning of the video it is fine, but towards the end of the video there is a discrepancy of 1-2 seconds.
    Last edited by amxcs; 4th Jan 2024 at 05:30.
    Quote Quote  
  6. Originally Posted by amxcs View Post
    Yes, by 2 seconds.
    And when I convert audio from 25 to 23.967, there is a difference of over 1 minute.

    As a test, I tried putting the audio from a 25fps video into the video with 23.976 at the beginning of the video it is fine, but towards the end of the video there is a discrepancy of 1-2 seconds.
    The second video (at 23.976 fps) is not encoded correctly. If the frames content is exactly the same, this video MUST have a longer duration than the 25 fps video.
    The first video displays 25 frames per second, the second 23.976 frames per second, which means that the second video takes longer to display all frames.
    The 23.976 fps video was obviously re-encoded from a source with a different fps without adjusting the duration, and frames were lost in the process.
    This 23.976 fps video also has a variable frame rate.
    Mux this mp4 into an mkv container and see what framerate is displayed in mediainfo.
    Quote Quote  
  7. I think it's the same?
    Image Attached Thumbnails Click image for larger version

Name:	Screenshot 2024-01-04 231516.png
Views:	13
Size:	107.9 KB
ID:	75990  

    Quote Quote  
  8. No, it's not the same.
    Now mux the 25 fps audio to the new mkv video.
    Quote Quote  
  9. Again 2 sec out of sync towards the end of the video.
    I've tried reducing the audio by 2 seconds or increasing the video by 2 seconds then it's synced but I'm not sure that's the right way.
    Quote Quote  
  10. Then try this:
    The exact duration in seconds of the audio stream of the 25 fps video is already specified in the upper field (24:13.920 is equal to 1453.920 seconds).

    Determine the exact duration of the 23.976 video (load the video in clever-FFmpeg-GUI and the exact duration will be displayed in the top right corner), convert to seconds and milliseconds (as above) and then enter this value in the second field.

    Image
    [Attachment 76020 - Click to enlarge]


    Then encode the 25 fps audio stream and mux it with the 23.976 video.
    The 2 second difference is now gone.

    This operation (see picture above) must clearly be carried out with the 25 fps video audio stream.


    If the audio is still not synchronized, you will have to adjust it manually.
    As I said, the two videos are not identical.
    Last edited by ProWo; 5th Jan 2024 at 04:38. Reason: added info
    Quote Quote  
  11. Thanks! This is exactly what I needed!
    Image Attached Thumbnails Click image for larger version

Name:	2.png
Views:	19
Size:	237.7 KB
ID:	76023  

    Quote Quote  
  12. You are right, the two values must be swapped.
    I'm glad it worked.
    Leave a positive review.
    Quote Quote  
  13. Originally Posted by ProWo View Post
    Leave a positive review.
    Of course, but I don't know how?
    Quote Quote  
  14. Originally Posted by amxcs View Post
    Originally Posted by ProWo View Post
    Leave a positive review.
    Of course, but I don't know how?
    see here

    Image
    [Attachment 76031 - Click to enlarge]
    Quote Quote  
  15. Done.

    The problem is that the next episode is 4 seconds longer.
    When I compared it, it turned out that there is 1.5 seconds more at the beginning and 1-2 seconds at the end.
    I tried converting the audio by a factor of 1.001491 and moving it by 1.5s, at the beginning it's fine, but at the end the video is out of sync again.
    I'm getting tired already, I've done it with another series and it was very quick and easy. But I had no problems with the frames there.
    Quote Quote  
  16. I'm a Super Moderator johns0's Avatar
    Join Date
    Jun 2002
    Location
    canada
    Search Comp PM
    Most likely there will be different scene changes which can be longer or shorter compared to the other video,you will need to check at the first scene change how long it goes and edit the audio,this will need to be done for all the scene changes if that's the issue.
    I think,therefore i am a hamster.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!