VideoHelp Forum
+ Reply to Thread
Results 1 to 9 of 9
Thread
  1. Hello everybody, I need some help from you.

    I'm converting movies recorded with my digital terrestrial TV decoder from their MPG (MPEG-2+MP2) format to MP4 (H.264+MP3).

    The original movies are played back correctly, but the converted ones, particularly those longer than one hour have this problem: after the first ad break, the audio isn't in sync with the video anymore, it's about one second early. And sometimes, if I well remember, it becomes even more out of sync during the movie.

    The only "thing that happens" during the ad break is a change of the pixel aspect ratio. But I don't know if that could mean something.

    I also manage recorded movies a little shorter than one hour and with two ad breaks inside them, but in these case the problem doesn't happen.

    For the conversion I'm using Handbrake, since it's the faster H.264 converter that I found after having tested other software, so I didn't (yet) make test conversions to understand whether the problem happens with other converters too.

    Have you any suggestion?
    Thank you very much in advance for your help.
    Falco

    P.S. Here below are the Activity Logs of a test I did converting (and resizing) one hour of movie. The first ad break is at 46m29s and the movie starts again at 50m13s. I'm not sure but it seems that during that ad, the audio becomes out of sync by 0.5 seconds, and when the movie starts again, it's out of sync by 1 second (like if the pixel aspect ratio change would add a 0.5 video delay each time).

    Code:
    ###################
    SCAN LOG
    ###################
    HandBrake 0.9.8 2012071700
    OS: Microsoft Windows NT 6.1.7601 Service Pack 1
    CPU: Intel(R) Core(TM)2 Duo CPU     T5550  @ 1.83GHz
    Ram: 2046 MB, Screen: 1280x800
    Temp Dir: C:\Users\Username\AppData\Local\Temp\
    Install Dir: C:\Program Files\Handbrake
    Data Dir: C:\Users\Username\AppData\Roaming\HandBrake\HandBrake\0.9.8.4861
    
    -------------------------------------------
     -i "I:\input_movie.mpg" -t0  --previews 30 --min-duration=10 -v 
    [20:44:20] hb_init: starting libhb thread
    HandBrake 0.9.8 (2012071700) - MinGW i686 - http://handbrake.fr
    2 CPUs detected
    Opening I:\input_movie.mpg...
    [20:44:20] hb_scan: path=I:\input_movie.mpg, title_index=0
    libbluray/bdnav/index_parse.c:157: indx_parse(): error opening I:\input_movie.mpg/BDMV/index.bdmv
    libbluray/bluray.c:1471: nav_get_title_list(I:\input_movie.mpg) failed (01AF30C8)
    [20:44:20] bd: not a bd - trying as a stream/file instead
    libdvdnav: Using dvdnav version 4.1.3
    libdvdread: Encrypted DVD support unavailable.
    libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
    libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
    libdvdread: Can't open file VIDEO_TS.IFO.
    libdvdnav: vm: failed to read VIDEO_TS.IFO
    [20:44:20] dvd: not a dvd - trying as a stream/file instead
    [20:44:20] file is MPEG Program Stream
    [20:44:21] Probing 1 unknown stream
    [20:44:21]     Probe: Found stream mpeg2video. stream id 0xe0-0x0
    [20:44:21] Found the following streams
    [20:44:21]     Video Streams : 
    [20:44:21]       0xe0-0x0 type MPEG2 (0x2)
    [20:44:21]     Audio Streams : 
    [20:44:21]       0xc0-0x0 type MPEG2 (0x4)
    [20:44:21]     Other Streams : 
    [20:44:21] stream id 0xc0 (type 0x4 substream 0x0) audio 0xc0
    [20:44:23] scan: decoding previews for title 1
    Scanning title 1 of 1...
    [20:44:23] scan: audio 0xc0: mp2, rate=48000Hz, bitrate=200000 Unknown (MPEG2) (2.0 ch)
    Scanning title 1 of 1...
    Scanning title 1 of 1...
    Scanning title 1 of 1...
    Scanning title 1 of 1...
    Scanning title 1 of 1...
    Scanning title 1 of 1...
    Scanning title 1 of 1...
    Scanning title 1 of 1...
    Scanning title 1 of 1...
    Scanning title 1 of 1...
    [20:44:25] scan: 30 previews, 704x576, 25.000 fps, autocrop = 74/36/0/0, aspect 16:9, PAR 16:11
    [20:44:25] scan: title (0) job->width:704, job->height:320
    [20:44:25] stream: 38 good frames, 0 errors (0%)
    Scanning title 1 of 1...
    [20:44:25] libhb: scan thread found 1 valid title(s)
    + title 1:
      + stream: I:\input_movie.mpg
      + duration: 02:16:19
      + size: 704x576, pixel aspect: 16/11, display aspect: 1.78, 25.000 fps
      + autocrop: 74/36/0/0
      + chapters:
        + 1: cells 0->0, 0 blocks, duration 02:16:19
      + audio tracks:
        + 1, Unknown (MPEG2) (2.0 ch) (iso639-2: und)
      + subtitle tracks:
    HandBrake has exited.
    
    
    
    #####################
    ENCODE LOG
    #####################
    HandBrake 0.9.8 2012071700
    OS: Microsoft Windows NT 6.1.7601 Service Pack 1
    CPU: Intel(R) Core(TM)2 Duo CPU     T5550  @ 1.83GHz
    Ram: 2046 MB, Screen: 1280x800
    Temp Dir: C:\Users\Username\AppData\Local\Temp\
    Install Dir: C:\Program Files\Handbrake
    Data Dir: C:\Users\Username\AppData\Roaming\HandBrake\HandBrake\0.9.8.4861
    
    -------------------------------------------
    CLI Query:  -i "I:\input_movie.mpg" -t 1 --start-at duration:0 --stop-at duration:3600 -o "I:\output_movie.mp4"  -f mp4 --deinterlace="fast" -w 90 --crop 74:74:0:0 --loose-anamorphic  -e x264 -q 23.75 --vfr  -a 1 -E lame -B 96 -6 stereo -R Auto -D 0 --gain=0 --audio-copy-mask none --audio-fallback ffac3 -x ref=1:weightp=1:subq=2:rc-lookahead=10:trellis=0:8x8dct=0 --verbose=2 --previews 30 
    User Query: True
    
    [07:34:44] hb_init: starting libhb thread
    [07:34:44] thread 1af2d68 started ("libhb")
    HandBrake 0.9.8 (2012071700) - MinGW i686 - http://handbrake.fr
    2 CPUs detected
    Opening I:\input_movie.mpg...
    [07:34:44] hb_scan: path=I:\input_movie.mpg, title_index=1
    [07:34:44] thread 1af2ed8 started ("scan")
    libbluray/bdnav/index_parse.c:157: indx_parse(): error opening I:\input_movie.mpg/BDMV/index.bdmv
    libbluray/bluray.c:1471: nav_get_title_list(I:\input_movie.mpg) failed (01AF3E80)
    [07:34:44] bd: not a bd - trying as a stream/file instead
    libdvdnav: Using dvdnav version 4.1.3
    libdvdread: Encrypted DVD support unavailable.
    libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
    libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
    libdvdread: Can't open file VIDEO_TS.IFO.
    libdvdnav: vm: failed to read VIDEO_TS.IFO
    [07:34:44] dvd: not a dvd - trying as a stream/file instead
    [07:34:44] file is MPEG Program Stream
    [07:34:44] Probing 1 unknown stream
    [07:34:44]     Probe: Found stream mpeg2video. stream id 0xe0-0x0
    [07:34:44] Found the following streams
    [07:34:44]     Video Streams : 
    [07:34:44]       0xe0-0x0 type MPEG2 (0x2)
    [07:34:44]     Audio Streams : 
    [07:34:44]       0xc0-0x0 type MPEG2 (0x4)
    [07:34:44]     Other Streams : 
    [07:34:44] stream id 0xc0 (type 0x4 substream 0x0) audio 0xc0
    [07:34:47] scan: decoding previews for title 1
    [07:34:47] scan: preview 1
    [07:34:47] fifo_close: trashing 0 buffer(s)
    [07:34:47] scan: audio 0xc0: mp2, rate=48000Hz, bitrate=200000 Unknown (MPEG2) (2.0 ch)
    [07:34:47] scan: preview 2
    Scanning title 1...
    Scanning title 1...
    Scanning title 1...
    Scanning title 1...
    Scanning title 1...
    Scanning title 1...
    Scanning title 1...
    [07:34:48] scan: preview 3
    Scanning title 1...
    Scanning title 1...
    Scanning title 1...
    [07:34:49] scan: preview 4
    Scanning title 1...
    Scanning title 1...
    Scanning title 1...
    Scanning title 1...
    [07:34:49] scan: preview 5
    Scanning title 1...
    Scanning title 1...
    Scanning title 1...
    [07:34:50] scan: preview 6
    Scanning title 1...
    [07:34:50] scan: preview 7
    Scanning title 1...
    Scanning title 1...
    [07:34:51] scan: preview 8
    Scanning title 1...
    Scanning title 1...
    [07:34:51] scan: preview 9
    Scanning title 1...
    Scanning title 1...
    [07:34:51] scan: preview 10
    Scanning title 1...
    [07:34:52] scan: preview 11
    Scanning title 1...
    [07:34:52] scan: preview 12
    Scanning title 1...
    Scanning title 1...
    Scanning title 1...
    [07:34:53] scan: preview 13
    Scanning title 1...
    [07:34:53] scan: preview 14
    Scanning title 1...
    Scanning title 1...
    [07:34:53] scan: preview 15
    [07:34:53] scan: preview 16
    [07:34:53] scan: preview 17
    Scanning title 1...
    [07:34:53] scan: preview 18
    [07:34:53] scan: preview 19
    [07:34:53] scan: preview 20
    Scanning title 1...
    [07:34:53] scan: preview 21
    [07:34:53] scan: preview 22
    [07:34:53] scan: preview 23
    [07:34:54] scan: preview 24
    Scanning title 1...
    [07:34:54] scan: preview 25
    [07:34:54] scan: preview 26
    [07:34:54] scan: preview 27
    Scanning title 1...
    [07:34:54] scan: preview 28
    [07:34:54] scan: preview 29
    [07:34:54] scan: preview 30
    [07:34:54] scan: 30 previews, 704x576, 25.000 fps, autocrop = 74/36/0/0, aspect 16:9, PAR 16:11
    [07:34:54] scan: title (0) job->width:704, job->height:320
    [07:34:54] stream: 38 good frames, 0 errors (0%)
    [07:34:54] thread 1af2ed8 exited ("scan")
    [07:34:54] thread 1af2ed8 joined ("scan")
    [07:34:54] libhb: scan thread found 1 valid title(s)
    + title 1:
      + stream: I:\input_movie.mpg
      + duration: 02:16:19
      + size: 704x576, pixel aspect: 16/11, display aspect: 1.78, 25.000 fps
      + autocrop: 74/36/0/0
      + chapters:
        + 1: cells 0->0, 0 blocks, duration 02:16:19
      + audio tracks:
        + 1, Unknown (MPEG2) (2.0 ch) (iso639-2: und)
      + subtitle tracks:
    [07:34:54] thread 1af2ed8 started ("work")
    [07:34:54] 1 job(s) to process
    [07:34:54] starting job
    [07:34:54] work: compression level not specified, track 1 setting compression level 2.00
    [07:34:54] sync: expecting 90025 video frames
    [07:34:54] job configuration:
    [07:34:54]  * source
    [07:34:54]    + I:\input_movie.mpg
    [07:34:54]    + title 1, start 0:0:0.00 stop 1:0:0.00
    [07:34:54]  * destination
    [07:34:54]    + I:\output_movie.mp4
    [07:34:54]    + container: MPEG-4 (.mp4 and .m4v)
    [07:34:54]  * video track
    [07:34:54]    + decoder: mpeg2
    [07:34:54]      + bitrate 15000 kbps
    [07:34:54]    + frame rate: same as source (around 25.000 fps)
    [07:34:54]    + loose anamorphic
    [07:34:54]      + storage dimensions: 704 * 576 -> 96 * 64, crop 74/74/0/0, mod 0
    [07:34:54]      + pixel aspect ratio: 512 / 321
    [07:34:54]      + display dimensions: 153 * 64
    [07:34:54]    + filter
    [07:34:54]      + Deinterlace (ffmpeg or yadif/mcdeint) (-1)
    [07:34:54]    + encoder: H.264 (x264)
    [07:34:54]      + options: ref=1:weightp=1:subq=2:rc-lookahead=10:trellis=0:8x8dct=0
    [07:34:54]      + quality: 23.75 (RF)
    [07:34:54]  * audio track 1
    [07:34:54]    + decoder: Unknown (MPEG2) (2.0 ch) (track 1, id 0xc0)
    [07:34:54]    + mixdown: Stereo
    [07:34:54]    + encoder: MP3 (lame)
    [07:34:54]      + bitrate: 96 kbps, samplerate: 48000 Hz
    [07:34:54]      + compression level: 2.00
    [07:34:54] file is MPEG Program Stream
    [07:34:54] Probing 1 unknown stream
    [07:34:54]     Probe: Found stream mpeg2video. stream id 0xe0-0x0
    [07:34:54] thread 1af5768 started ("Reader")
    [07:34:54] reader: first SCR 338 id 0xe0 DTS 36866
    [07:34:54] thread 1af7488 started ("AudioSynchronization")
    [07:34:54] thread 1af7740 started ("MPEG-2 decoder (libmpeg2)")
    [07:34:54] thread 1b100a0 started ("Renderer")
    [07:34:54] encx264: encoding with stored aspect 512/321
    [07:34:54] encx264: Encoding at constant RF 23.750000
    [07:34:54] encx264: opening libx264 (pass 0)
    x264 [warning]: --psnr used with psy on: results will be invalid!
    x264 [warning]: --tune psnr should be used if attempting to benchmark psnr!
    x264 [info]: using SAR=512/321
    [07:34:54] mpeg2: "" (1) at frame 0 time 0
    x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
    [07:34:54] mpeg2 tag botch: pts 43832, tag pts 4402 buf 0x00000000
    [07:34:54] mpeg2 tag botch: pts 36628, tag pts 7924 buf 0x00000000
    x264 [info]: profile Main, level 1.0
    [07:34:54] thread 3fc22b8 started ("H.264/AVC encoder (libx264)")
    [07:34:54] thread 3fcff30 started ("Audio decoder (libavcodec)")
    [07:34:54] enclame: opening libmp3lame
    [mp2 @ 03FC2800] Header missing
    [07:34:54] thread 3fc7118 started ("MP3 encoder (libmp3lame)")
    [07:34:54] thread 40af7f0 started ("Video Synchronization")
    [07:34:54] sync: adding 123 ms of silence to audio 0xc0  start 15424, next 4320
    [07:34:54] muxmp4: track 0, chunk duration 14400
    [07:34:54] muxmp4: track 1, chunk duration 7680
    [07:34:54] thread 40af920 started ("Muxer")
    [07:39:26] mpeg2 tag botch: pts 121684076, tag pts 121644422 buf 0x00000000
    [07:39:26] mpeg2 tag botch: pts 121745468, tag pts 121727302 buf 0x00000000
    [07:39:35] mpeg2 tag botch: pts 124830588, tag pts 124805718 buf 0x00000000
    [07:39:35] mpeg2 tag botch: pts 125039304, tag pts 125021302 buf 0x00000000
    [07:39:36] mpeg2 tag botch: pts 125208422, tag pts 125165222 buf 0x00000000
    [07:39:37] sync: video time didn't advance - dropped 4 frames (delta 125 ms, current 125529344, next 125532422, dur 3078)
    [07:43:07] sync: audio 0xc0 time went backwards 15 ms, dropped 1 frames (start 204794694, next 204796080)
    [07:43:57] sync: video time didn't advance - dropped 1 frames (delta 0 ms, current 224082422, next 224086022, dur 3600)
    [07:43:57] mpeg2 tag botch: pts 224115236, tag pts 224075222 buf 0x00000000
    [07:45:45] sync: video time didn't advance - dropped 1 frames (delta 39 ms, current 263574496, next 263574572, dur 76)
    [07:45:45] mpeg2 tag botch: pts 263596628, tag pts 263567682 buf 0x00000000
    [07:48:35] sync: reached pts 324000504, exiting early
    [07:48:36] thread 40af920 exited ("Muxer")
    [07:48:36] work: average encoding speed for job is 109.696770 fps
    [07:48:36] thread 1af7740 exited ("MPEG-2 decoder (libmpeg2)")
    [07:48:36] thread 3fc7118 exited ("MP3 encoder (libmp3lame)")
    [07:48:36] thread 3fc22b8 exited ("H.264/AVC encoder (libx264)")
    [07:48:36] thread 1b100a0 exited ("Renderer")
    [07:48:36] reader: done. 1 scr changes
    [07:48:36] thread 1af5768 exited ("Reader")
    [07:48:36] thread 3fcff30 exited ("Audio decoder (libavcodec)")
    [07:48:36] thread 1af7488 exited ("AudioSynchronization")
    [07:48:36] thread 40af7f0 exited ("Video Synchronization")
    [07:48:36] thread 40af7f0 joined ("Video Synchronization")
    [07:48:36] sync: got 89991 frames, 90025 expected
    [07:48:36] thread 1af7488 joined ("AudioSynchronization")
    [07:48:36] thread 1af7740 joined ("MPEG-2 decoder (libmpeg2)")
    [07:48:36] mpeg2 done: 90242 frames
    [07:48:36] thread 1b100a0 joined ("Renderer")
    [07:48:36] render: lost time: 0 (0 frames)
    [07:48:36] render: gained time: 0 (0 frames) (0 not accounted for)
    [07:48:36] fifo_close: trashing 0 buffer(s)
    [07:48:36] fifo_close: trashing 0 buffer(s)
    [07:48:36] thread 3fc22b8 joined ("H.264/AVC encoder (libx264)")
    x264 [info]: frame I:1156  Avg QP:22.67  size:   937  PSNR Mean Y:41.41 U:44.54 V:45.18 Avg:42.14 Global:41.24
    x264 [info]: frame P:49834 Avg QP:26.91  size:   183  PSNR Mean Y:37.46 U:41.40 V:42.19 Avg:38.40 Global:37.78
    x264 [info]: frame B:39001 Avg QP:29.42  size:    34  PSNR Mean Y:37.60 U:41.96 V:42.80 Avg:38.61 Global:37.83
    x264 [info]: consecutive B-frames: 27.8% 39.7% 10.9% 21.6%
    x264 [info]: mb I  I16..4: 13.7%  0.0% 86.3%
    x264 [info]: mb P  I16..4:  2.7%  0.0%  1.2%  P16..4: 39.2% 20.2% 14.7%  0.0%  0.0%    skip:22.2%
    x264 [info]: mb B  I16..4:  0.1%  0.0%  0.1%  B16..8:  9.0%  5.0%  0.8%  direct: 3.0%  skip:82.0%  L0:22.5% L1:43.9% BI:33.6%
    x264 [info]: coded y,uvDC,uvAC intra: 58.7% 64.6% 35.1% inter: 18.0% 7.5% 1.0%
    x264 [info]: i16 v,h,dc,p: 55% 16% 25%  4%
    x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 30% 13% 23%  5%  5%  7%  4%  7%  5%
    x264 [info]: i8c dc,h,v,p: 64% 11% 22%  4%
    x264 [info]: Weighted P-Frames: Y:4.9% UV:1.1%
    x264 [info]: SSIM Mean Y:0.9651558 (14.579db)
    x264 [info]: PSNR Mean Y:37.573 U:41.685 V:42.492 Avg:38.537 Global:37.832 kb/s:25.63
    [07:48:36] thread 3fcff30 joined ("Audio decoder (libavcodec)")
    [07:48:36] mp2-decoder done: 0 frames, 0 decoder errors, 0 drops
    [07:48:36] thread 3fc7118 joined ("MP3 encoder (libmp3lame)")
    [07:48:36] thread 40af920 joined ("Muxer")
    [07:48:42] mux: file size, 54668681 bytes
    [07:48:42] mux: track 0, 89991 frames, 11491594 bytes, 25.54 kbps, fifo 32768
    [07:48:42] mux: track 1, 149939 frames, 40387008 bytes, 89.75 kbps, fifo 32768
    [07:48:42] mux: overhead, 11.63 bytes per frame
    [07:48:42] thread 1af5768 joined ("Reader")
    [07:48:42] stream: 706597 good frames, 0 errors (0%)
    [07:48:42] fifo_close: trashing 18 buffer(s)
    [07:48:42] fifo_close: trashing 0 buffer(s)
    [07:48:42] fifo_close: trashing 0 buffer(s)
    [07:48:42] fifo_close: trashing 0 buffer(s)
    [07:48:42] fifo_close: trashing 0 buffer(s)
    [07:48:42] fifo_close: trashing 0 buffer(s)
    [07:48:42] fifo_close: trashing 0 buffer(s)
    [07:48:42] fifo_close: trashing 0 buffer(s)
    [07:48:42] fifo_close: trashing 0 buffer(s)
    [07:48:42] Freed 32 buffers of size 1024
    [07:48:42] Freed 32 buffers of size 2048
    [07:48:42] Freed 32 buffers of size 4096
    [07:48:42] Freed 32 buffers of size 16384
    [07:48:42] Freed 2 buffers of size 65536
    [07:48:42] Freed 32 buffers of size 262144
    [07:48:42] Freed 32 buffers of size 1048576
    [07:48:42] Allocated 43104256 bytes of buffers on this pass and Freed 42827776 bytes, 276480 bytes leaked
    [07:48:42] thread 1af2ed8 exited ("work")
    [07:48:42] thread 1af2ed8 joined ("work")
    [07:48:42] libhb: work result = 0
    Encode done!
    [07:48:42] thread 1af2d68 exited ("libhb")
    [07:48:42] thread 1af2d68 joined ("libhb")
    HandBrake has exited.
    Last edited by falco2000; 16th May 2013 at 06:47. Reason: Added logs + Some corrections
    Falco2000, video newbie.
    Let's everyone help each other.
    Quote Quote  
  2. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    You might have to "repair" the mpg file.

    I have had good results with videoredo using the quickstream fix. It might also work with the free pvastrumento.
    Quote Quote  
  3. Originally Posted by Baldrick View Post
    You might have to "repair" the mpg file.
    I have had good results with videoredo using the quickstream fix. It might also work with the free pvastrumento.
    Thank you very much for your answer Baldrick.

    Unfortunately I haven't got money to buy VideoReDo, so I tried using the "make ps" pvastrumento function from the original 2.5GB recorded MPG file (MPEG-2 + MP2), but - after one long hour of wait - I got as output a 1.9GB movie with hundreds of video and audio "random" cuts, with only its first quarter having the audio (the remaining three quarters are completely mute, about 1.5 hours of silence) and the "current time" and "total duration" timestamps are continuously changing during playback. A complete fail.

    I also tried the pvastrumento "demux" function to see what happened, but the result is the same as above, only divided into two distinct files (.mpv and .mpa).

    P.S.: I edited my first post since I'm thinking that I could have induced you to think that also the original MPG movies have the out-of-sync problem. Well, it's not so. The problem is in the converted MP4 file only.
    Last edited by falco2000; 29th Nov 2012 at 07:28.
    Falco2000, video newbie.
    Let's everyone help each other.
    Quote Quote  
  4. Ok, I finally tried both VideoReDo QuickStreamFix and ProjectX, but they worked only some times. The other times they failed: the "repaired" movie, once converted with Handbrake, became out of sync as well as the "non-repaired" one.

    An important thing that I noticed, instead, is the fact that the out-of-sync problem doesn't come up if in the Handbrake conversion I change the frame size (with the width and height parameters, not with the crop values): audio and video are in-sync from the start of the movie up to its very end.
    If, instead, I choose "anamorphic: strict", so that there isn't any resize, audio and video progressively become out of sync.

    Does anyone know the reason of this and - consequently - a workaround to have in-sync output movies?
    Last edited by falco2000; 21st Jan 2013 at 06:59.
    Falco2000, video newbie.
    Let's everyone help each other.
    Quote Quote  
  5. the "repaired" movie, once converted with Handbrake, became out of sync.
    This is often the cause if the time codes are not properly fixed and end up being indicating vfr.
    For me it normally works to:
    1. remux such files to mkv using mkvmerge
    2. making sure to passthrough the time codes during reencoding
    this way the output is still vfr but sync (at least on devices that support vfr).

    Sorry, but I have no knowledge about how handbrake handles vfr content.
    Quote Quote  
  6. Originally Posted by Selur View Post
    1. remux such files to mkv using mkvmerge
    I tried it on a 2 hours long movie, but after about 1 hour the muxing failed due to this error (please note that this is a translation from the message that mkvmerge gave me in my language):

    "Error: memory.cpp/safemalloc() called from file src/mpegparser/M2VParser.cpp, line 304: malloc() returned nullptr for a size of 51585 bytes."

    Originally Posted by Selur View Post
    2. making sure to passthrough the time codes during reencoding
    How?
    Falco2000, video newbie.
    Let's everyone help each other.
    Quote Quote  
  7. How?
    no clue how to do it with handbrake never used it

    "Error: memory.cpp/safemalloc() called from file src/mpegparser/M2VParser.cpp, line 304: malloc() returned nullptr for a size of 51585 bytes."
    Sounds like the mpeg2 stream is broken. mkvmerge doesn't handle to broken streams.

    ----
    just as a small note: if you use ProjectX, let it demux the streams otherwise it can't do all it's magic when trying to fix them.
    Quote Quote  
  8. I'd wish to thank each of you for the help you gave me.

    I've been able to put myself "at work" again only now, after some weeks.

    Here's the continuation of my attempts, if you should be interested in:

    https://forum.videohelp.com/threads/353776-MP2-audio-cutting-problem-in-MeGUI-%280-bytes-rejoin%29

    Falco2000, video newbie.
    Let's everyone help each other.
    Quote Quote  
  9. I finally found a solution: if I re-encode the movie setting a start frame different from 0 (ex.: 1) and a final frame, the audio is in-sync with the video. That doesn't happen in the standard Handbrake encode, that is with "Chapters" set as Type of range.
    Bye
    Falco2000, video newbie.
    Let's everyone help each other.
    Quote Quote  



Similar Threads

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