Problems with converting M2TS to MP4/M4V

HandBrake for Windows support
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
DaMn26
Posts: 3
Joined: Mon May 04, 2009 8:06 am

Problems with converting M2TS to MP4/M4V

Post by DaMn26 »

Hi,

I've been searching the forums and the entire web in order to find a solution to the following problem, but so far - unsuccessfully.
Using HandBrake, I'm trying to convert an M2TS video file (~29GB in size) to MP4/M4V (Large File option selected using the Apple TV preset).

HandBrake does seem to be able to convert most of the video, but not all of it. In fact, of the 2h10m video, only 1h46m are converted in the final ~3.8GB-MP4 file.

Code: Select all

### Windows GUI 0.9.3 2008112300 
### Running: Microsoft Windows NT 6.0.6000.0 
###
### CPU: Intel(R) Core(TM)2 Quad CPU    Q6700  @ 2.66GHz 
### Ram: 2019 MB 
### Screen: 1680x1050 
### Temp Dir: C:\Users\Daniel\AppData\Local\Temp\ 
### Install Dir: C:\Program Files\HandBrake 
### Data Dir: C:\Users\Daniel\AppData\Roaming\HandBrake\HandBrake\0.9.3.0 
#########################################

### CLI Query:  -i "D:\Music\kylie\KylieX2008__HD-1080P_.m2ts" -t 1 -c 1 -o "D:\Temp\XTour.mp4" -f mp4 -4  -w 1280 -P  -e x264 -b 5000 -r 24 -a 1 -E faac,ac3 -B 160 -R 48,0 -6 stereo -D 1 --markers="C:\Users\Daniel\AppData\Local\Temp\KylieX2008__HD-1080P_.m2ts-1-chapters.csv" -x level=30:cabac=0:ref=3:mixed-refs=1:bframes=6:weightb=1:direct=auto:no-fast-pskip=1:me=umh:subq=7:analyse=all -v 
#########################################
[01:50:52] hb_init: checking cpu count
[01:50:52] hb_init: starting libhb thread
HandBrake 0.9.3 (2008112300) - http://handbrake.fr/
4 CPUs detected
Opening D:\Music\kylie\KylieX2008__HD-1080P_.m2ts...
[01:50:52] hb_scan: path=D:\Music\kylie\KylieX2008__HD-1080P_.m2ts, title_index=1
[01:50:52] scan: trying to open with libdvdread
[01:50:52] dvd: not a dvd - trying as a stream/file instead
[01:50:52] file is MPEG Transport Stream with 192 byte packets offset 4 bytes
[01:50:52] hb_ts_stream_find_pids - found the following PIDS
[01:50:52]     Video PIDS : 
[01:50:52]       0x1011 type H.264 (0x1b)
[01:50:52]     Audio PIDS : 
[01:50:52]       0x1100 type Unknown (0x80)
[01:50:52]       0x1101 type SCTE 35 splice info (0x86)
[01:50:52]       0x1102 type AC-3 (0x81)
[01:50:52] transport stream pid 0x1100 (type 0x81) is AC-3 audio id 0x80bd
[01:50:52] transport stream pid 0x1101 (type 0x81) is AC-3 audio id 0x81bd
[01:50:52] transport stream pid 0x1102 (type 0x81) is AC-3 audio id 0x82bd
[01:50:52] scan: decoding previews for title 1
[01:50:52] scan: audio 0x82bd: AC-3, rate=48000Hz, bitrate=640000 Unknown (AC3) (5.1 ch)
[01:50:52] scan: audio 0x81bd: AC-3, rate=32000Hz, bitrate=80000 Unknown (AC3) (5.0 ch)
[01:50:52] scan: audio 0x80bd: AC-3, rate=48000Hz, bitrate=64000 Unknown (AC3) (2.0 ch)
Scanning title 1...
Scanning title 1...
Scanning title 1...
Scanning title 1...
[01:50:53] scan: 10 previews, 1920x1080, 29.970 fps, autocrop = 0/0/6/6, aspect 16:9, PAR 1:1
[01:50:53] scan: title (0) job->width:1904, job->height:1072
[01:50:53] stream: 3 good frames, 0 errors (0%)
[01:50:53] libhb: scan thread found 1 valid title(s)
+ title 1:
  + vts 0, ttn 0, cells 0->0 (0 blocks)
  + duration: 02:09:42
  + size: 1920x1080, aspect: 1.78, 29.970 fps
  + autocrop: 0/0/6/6
  + chapters:
    + 1: cells 0->0, 0 blocks, duration 02:09:42
  + audio tracks:
    + 1, Unknown (AC3) (2.0 ch), 48000Hz, 64000bps
    + 2, Unknown (AC3) (5.0 ch), 32000Hz, 80000bps
    + 3, Unknown (AC3) (5.1 ch), 48000Hz, 640000bps
  + subtitle tracks:
Reading chapter markers from file C:\Users\Daniel\AppData\Local\Temp\KylieX2008__HD-1080P_.m2ts-1-chapters.csv
More audio codecs than audio tracks, copying track 1 and using encoder ac3
Invalid sample rate 0, using input rate 48000
[01:50:53] 1 job(s) to process
[01:50:53] starting job
[01:50:53] job configuration:
[01:50:53]  * source
[01:50:53]    + D:\Music\kylie\KylieX2008__HD-1080P_.m2ts
[01:50:53]    + title 1, chapter(s) 1 to 1
[01:50:53]  * destination
[01:50:53]    + D:\Temp\XTour.mp4
[01:50:53]    + container: MPEG-4 (.mp4 and .m4v)
[01:50:53]      + 64-bit formatting
[01:50:53]      + chapter markers
[01:50:53]  * video track
[01:50:53]    + decoder: h264
[01:50:53]      + bitrate 200 kbps
[01:50:53]    + frame rate: 29.970 fps -> constant 24.000 fps
[01:50:53]    + loose anamorphic
[01:50:53]      + storage dimensions: 1920 * 1080 -> 1280 * 720, crop 0/0/6/6
[01:50:53]      + pixel aspect ratio: 159 / 160
[01:50:53]      + display dimensions: 1272 * 720
[01:50:53]    + encoder: x264
[01:50:53]      + options: level=30:cabac=0:ref=3:mixed-refs=1:bframes=6:weightb=1:direct=auto:no-fast-pskip=1:me=umh:subq=7:analyse=all
[01:50:53]      + bitrate: 5000 kbps, pass: 0
[01:50:53]  * audio track 0
[01:50:53]    + decoder: Unknown (AC3) (2.0 ch) (track 1, id 80bd)
[01:50:53]      + bitrate: 64 kbps, samplerate: 48000 Hz
[01:50:53]    + mixdown: Stereo
[01:50:53]    + encoder: faac
[01:50:53]      + bitrate: 160 kbps, samplerate: 48000 Hz
[01:50:53]  * audio track 1
[01:50:53]    + decoder: Unknown (AC3) (2.0 ch) (track 1, id 80bd)
[01:50:53]      + bitrate: 64 kbps, samplerate: 48000 Hz
[01:50:53]    + AC3 passthrough
[01:50:53] dvd: not a dvd - trying as a stream/file instead
[01:50:53] reader: first SCR 377877005
[01:50:54] encx264: keyint-min: 25, keyint-max: 241
[01:50:54] encx264: encoding with stored aspect 159/160
x264 [info]: using SAR=159/160
x264 [warning]: frame MB size (80x45) > level limit (1620)
x264 [warning]: DPB size (3 frames, 4147200 bytes) > level limit (2 frames, 3110400 bytes)
x264 [warning]: MB rate (86400) > level limit (40500)
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
x264 [info]: profile Main, level 3.0
[05:24:08] next_packet: eof while re-establishing sync @ 25036604736
[05:24:08] hb_ts_stream_decode - eof
[05:24:08] stream: 191489 good frames, 0 errors (0%)
[05:24:08] reader: done. 1 scr changes
[h264 @ 0x1d2e270]error while decoding MB 88 16, bytestream (-36)
[h264 @ 0x1d2e270]concealing 6201 DC, 6201 AC, 6201 MV errors
[b][05:24:08] sync: got 153345 frames, 186803 expected
[05:24:08] sync: 38145 frames dropped, 2 duplicated[/b][05:24:08] work: average encoding speed for job is 11.985925 fps
[05:24:11] h264-decoder done: 191489 frames, 0 decoder errors, 0 drops
[05:24:11] render: lost time: 0 (0 frames)
[05:24:11] render: gained time: 0 (0 frames) (0 not accounted for)
x264 [info]: slice I:2486  Avg QP:22.00  size: 84506  PSNR Mean Y:41.27 U:45.61 V:46.81 Avg:42.30 Global:40.55
x264 [info]: slice P:116794 Avg QP:24.11  size: 29872  PSNR Mean Y:39.68 U:43.68 V:45.06 Avg:40.64 Global:38.41
x264 [info]: slice B:34065 Avg QP:28.32  size:  8820  PSNR Mean Y:38.18 U:43.10 V:44.05 Avg:39.21 Global:36.66
x264 [info]: consecutive B-frames: 56.8% 39.3%  1.7%  0.9%  0.5%  0.4%  0.4%
x264 [info]: mb I  I16..4: 31.5%  0.0% 68.5%
x264 [info]: mb P  I16..4:  5.9%  0.0%  8.7%  P16..4: 50.7% 15.2%  7.1%  0.2%  0.3%    skip:12.0%
x264 [info]: mb B  I16..4:  0.3%  0.0%  0.7%  B16..8: 37.9%  1.3%  1.6%  direct: 6.2%  skip:52.1%  L0:37.0% L1:54.2% BI: 8.7%
x264 [info]: final ratefactor: 24.09
x264 [info]: direct mvs  spatial:100.0%  temporal:0.0%
x264 [info]: ref P L0  70.0% 17.2% 12.8%
x264 [info]: ref B L0  86.7% 13.3%
x264 [info]: SSIM Mean Y:0.9452174
x264 [info]: PSNR Mean Y:39.370 U:43.582 V:44.863 Avg:40.353 Global:37.980 kb/s:5007.55
[05:24:11] libhb: work result = 0
Rip done!

 ############ End of Log ############## 


Can anyone please help me in finding a solution to that problem?


Thx,
Daniel.
nathug
Bright Spark User
Posts: 204
Joined: Fri Apr 11, 2008 10:21 pm

Re: Problems with converting M2TS to MP4/M4V

Post by nathug »

DaMn26 wrote:Hi,

I've been searching the forums and the entire web in order to find a solution to the following problem, but so far - unsuccessfully.
Using HandBrake, I'm trying to convert an M2TS video file (~29GB in size) to MP4/M4V (Large File option selected using the Apple TV preset).

HandBrake does seem to be able to convert most of the video, but not all of it. In fact, of the 2h10m video, only 1h46m are converted in the final ~3.8GB-MP4 file.

Code: Select all

### Windows GUI 0.9.3 2008112300 
### Running: Microsoft Windows NT 6.0.6000.0 
###
### CPU: Intel(R) Core(TM)2 Quad CPU    Q6700  @ 2.66GHz 
### Ram: 2019 MB 
### Screen: 1680x1050 
### Temp Dir: C:\Users\Daniel\AppData\Local\Temp\ 
### Install Dir: C:\Program Files\HandBrake 
### Data Dir: C:\Users\Daniel\AppData\Roaming\HandBrake\HandBrake\0.9.3.0 
#########################################

### CLI Query:  -i "D:\Music\kylie\KylieX2008__HD-1080P_.m2ts" -t 1 -c 1 -o "D:\Temp\XTour.mp4" -f mp4 -4  -w 1280 -P  -e x264 -b 5000 -r 24 -a 1 -E faac,ac3 -B 160 -R 48,0 -6 stereo -D 1 --markers="C:\Users\Daniel\AppData\Local\Temp\KylieX2008__HD-1080P_.m2ts-1-chapters.csv" -x level=30:cabac=0:ref=3:mixed-refs=1:bframes=6:weightb=1:direct=auto:no-fast-pskip=1:me=umh:subq=7:analyse=all -v 
#########################################
[01:50:52] hb_init: checking cpu count
[01:50:52] hb_init: starting libhb thread
HandBrake 0.9.3 (2008112300) - http://handbrake.fr/
4 CPUs detected
Opening D:\Music\kylie\KylieX2008__HD-1080P_.m2ts...
[01:50:52] hb_scan: path=D:\Music\kylie\KylieX2008__HD-1080P_.m2ts, title_index=1
[01:50:52] scan: trying to open with libdvdread
[01:50:52] dvd: not a dvd - trying as a stream/file instead
[01:50:52] file is MPEG Transport Stream with 192 byte packets offset 4 bytes
[01:50:52] hb_ts_stream_find_pids - found the following PIDS
[01:50:52]     Video PIDS : 
[01:50:52]       0x1011 type H.264 (0x1b)
[01:50:52]     Audio PIDS : 
[01:50:52]       0x1100 type Unknown (0x80)
[01:50:52]       0x1101 type SCTE 35 splice info (0x86)
[01:50:52]       0x1102 type AC-3 (0x81)
[01:50:52] transport stream pid 0x1100 (type 0x81) is AC-3 audio id 0x80bd
[01:50:52] transport stream pid 0x1101 (type 0x81) is AC-3 audio id 0x81bd
[01:50:52] transport stream pid 0x1102 (type 0x81) is AC-3 audio id 0x82bd
[01:50:52] scan: decoding previews for title 1
[01:50:52] scan: audio 0x82bd: AC-3, rate=48000Hz, bitrate=640000 Unknown (AC3) (5.1 ch)
[01:50:52] scan: audio 0x81bd: AC-3, rate=32000Hz, bitrate=80000 Unknown (AC3) (5.0 ch)
[01:50:52] scan: audio 0x80bd: AC-3, rate=48000Hz, bitrate=64000 Unknown (AC3) (2.0 ch)
Scanning title 1...
Scanning title 1...
Scanning title 1...
Scanning title 1...
[01:50:53] scan: 10 previews, 1920x1080, 29.970 fps, autocrop = 0/0/6/6, aspect 16:9, PAR 1:1
[01:50:53] scan: title (0) job->width:1904, job->height:1072
[01:50:53] stream: 3 good frames, 0 errors (0%)
[01:50:53] libhb: scan thread found 1 valid title(s)
+ title 1:
  + vts 0, ttn 0, cells 0->0 (0 blocks)
  + duration: 02:09:42
  + size: 1920x1080, aspect: 1.78, 29.970 fps
  + autocrop: 0/0/6/6
  + chapters:
    + 1: cells 0->0, 0 blocks, duration 02:09:42
  + audio tracks:
    + 1, Unknown (AC3) (2.0 ch), 48000Hz, 64000bps
    + 2, Unknown (AC3) (5.0 ch), 32000Hz, 80000bps
    + 3, Unknown (AC3) (5.1 ch), 48000Hz, 640000bps
  + subtitle tracks:
Reading chapter markers from file C:\Users\Daniel\AppData\Local\Temp\KylieX2008__HD-1080P_.m2ts-1-chapters.csv
More audio codecs than audio tracks, copying track 1 and using encoder ac3
Invalid sample rate 0, using input rate 48000
[01:50:53] 1 job(s) to process
[01:50:53] starting job
[01:50:53] job configuration:
[01:50:53]  * source
[01:50:53]    + D:\Music\kylie\KylieX2008__HD-1080P_.m2ts
[01:50:53]    + title 1, chapter(s) 1 to 1
[01:50:53]  * destination
[01:50:53]    + D:\Temp\XTour.mp4
[01:50:53]    + container: MPEG-4 (.mp4 and .m4v)
[01:50:53]      + 64-bit formatting
[01:50:53]      + chapter markers
[01:50:53]  * video track
[01:50:53]    + decoder: h264
[01:50:53]      + bitrate 200 kbps
[01:50:53]    + frame rate: 29.970 fps -> constant 24.000 fps
[01:50:53]    + loose anamorphic
[01:50:53]      + storage dimensions: 1920 * 1080 -> 1280 * 720, crop 0/0/6/6
[01:50:53]      + pixel aspect ratio: 159 / 160
[01:50:53]      + display dimensions: 1272 * 720
[01:50:53]    + encoder: x264
[01:50:53]      + options: level=30:cabac=0:ref=3:mixed-refs=1:bframes=6:weightb=1:direct=auto:no-fast-pskip=1:me=umh:subq=7:analyse=all
[01:50:53]      + bitrate: 5000 kbps, pass: 0
[01:50:53]  * audio track 0
[01:50:53]    + decoder: Unknown (AC3) (2.0 ch) (track 1, id 80bd)
[01:50:53]      + bitrate: 64 kbps, samplerate: 48000 Hz
[01:50:53]    + mixdown: Stereo
[01:50:53]    + encoder: faac
[01:50:53]      + bitrate: 160 kbps, samplerate: 48000 Hz
[01:50:53]  * audio track 1
[01:50:53]    + decoder: Unknown (AC3) (2.0 ch) (track 1, id 80bd)
[01:50:53]      + bitrate: 64 kbps, samplerate: 48000 Hz
[01:50:53]    + AC3 passthrough
[01:50:53] dvd: not a dvd - trying as a stream/file instead
[01:50:53] reader: first SCR 377877005
[01:50:54] encx264: keyint-min: 25, keyint-max: 241
[01:50:54] encx264: encoding with stored aspect 159/160
x264 [info]: using SAR=159/160
x264 [warning]: frame MB size (80x45) > level limit (1620)
x264 [warning]: DPB size (3 frames, 4147200 bytes) > level limit (2 frames, 3110400 bytes)
x264 [warning]: MB rate (86400) > level limit (40500)
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
x264 [info]: profile Main, level 3.0
[05:24:08] next_packet: eof while re-establishing sync @ 25036604736
[05:24:08] hb_ts_stream_decode - eof
[05:24:08] stream: 191489 good frames, 0 errors (0%)
[05:24:08] reader: done. 1 scr changes
[h264 @ 0x1d2e270]error while decoding MB 88 16, bytestream (-36)
[h264 @ 0x1d2e270]concealing 6201 DC, 6201 AC, 6201 MV errors
[b][05:24:08] sync: got 153345 frames, 186803 expected
[05:24:08] sync: 38145 frames dropped, 2 duplicated[/b][05:24:08] work: average encoding speed for job is 11.985925 fps
[05:24:11] h264-decoder done: 191489 frames, 0 decoder errors, 0 drops
[05:24:11] render: lost time: 0 (0 frames)
[05:24:11] render: gained time: 0 (0 frames) (0 not accounted for)
x264 [info]: slice I:2486  Avg QP:22.00  size: 84506  PSNR Mean Y:41.27 U:45.61 V:46.81 Avg:42.30 Global:40.55
x264 [info]: slice P:116794 Avg QP:24.11  size: 29872  PSNR Mean Y:39.68 U:43.68 V:45.06 Avg:40.64 Global:38.41
x264 [info]: slice B:34065 Avg QP:28.32  size:  8820  PSNR Mean Y:38.18 U:43.10 V:44.05 Avg:39.21 Global:36.66
x264 [info]: consecutive B-frames: 56.8% 39.3%  1.7%  0.9%  0.5%  0.4%  0.4%
x264 [info]: mb I  I16..4: 31.5%  0.0% 68.5%
x264 [info]: mb P  I16..4:  5.9%  0.0%  8.7%  P16..4: 50.7% 15.2%  7.1%  0.2%  0.3%    skip:12.0%
x264 [info]: mb B  I16..4:  0.3%  0.0%  0.7%  B16..8: 37.9%  1.3%  1.6%  direct: 6.2%  skip:52.1%  L0:37.0% L1:54.2% BI: 8.7%
x264 [info]: final ratefactor: 24.09
x264 [info]: direct mvs  spatial:100.0%  temporal:0.0%
x264 [info]: ref P L0  70.0% 17.2% 12.8%
x264 [info]: ref B L0  86.7% 13.3%
x264 [info]: SSIM Mean Y:0.9452174
x264 [info]: PSNR Mean Y:39.370 U:43.582 V:44.863 Avg:40.353 Global:37.980 kb/s:5007.55
[05:24:11] libhb: work result = 0
Rip done!

 ############ End of Log ############## 


Can anyone please help me in finding a solution to that problem?


Thx,
Daniel.

You need the latest SVN version to do this successfully. 0.9.3 does't cut it for this.

Nate
DaMn26
Posts: 3
Joined: Mon May 04, 2009 8:06 am

Re: Problems with converting M2TS to MP4/M4V

Post by DaMn26 »

What's SVN?

Daniel.
User avatar
s55
HandBrake Team
Posts: 9809
Joined: Sun Dec 24, 2006 1:05 pm

Re: Problems with converting M2TS to MP4/M4V

Post by s55 »

SVN is a repository of source code.

It's not recommended for anyone without past experience compiling source code or working with Cygwin. It's also unsupported.

So really, you'll want to wait for 0.9.4 (there is no ETA currently)
DaMn26
Posts: 3
Joined: Mon May 04, 2009 8:06 am

Re: Problems with converting M2TS to MP4/M4V

Post by DaMn26 »

I really want to get this thing going and get the video converted... Can anyone try to help me with the SVN code?
Also, though not HandBrake related, is there another program (like iSkysoft video converter) that is able to convert the video successfully?

thx again,
Daniel.
svoboda77
Posts: 7
Joined: Thu May 28, 2009 10:09 am

Re: Problems with converting M2TS to MP4/M4V

Post by svoboda77 »

User avatar
s55
HandBrake Team
Posts: 9809
Joined: Sun Dec 24, 2006 1:05 pm

Re: Problems with converting M2TS to MP4/M4V

Post by s55 »

Can anyone try to help me with the SVN code?
If you have to ask, you shouldn't be trying it. SVN is currently not stable and broken in many places in the windows gui, so you'd simply replace one problem with another.
Wait till 0.9.4 is released (no eta)
AlienFanatic
Posts: 6
Joined: Thu May 21, 2009 5:05 pm

Re: Problems with converting M2TS to MP4/M4V

Post by AlienFanatic »

Have you already tried using tsMuxer to convert the .M2TS file to a straight .TS file? You lose nothing--at least not that I noticed--but I find that changing the container this way and simplifying the stream made my encodes work much better in 0.9.3. (I was, in fact, completely unable to transcode .M2TS files successfully without muxing it first.) If you tried it already and failed, carry on ;)
AlienFanatic
Posts: 6
Joined: Thu May 21, 2009 5:05 pm

Re: Problems with converting M2TS to MP4/M4V

Post by AlienFanatic »

Durnint, I hope this isn't a double post. I have been able to successfully transcode .M2TS files to .M4V and .MP4 (using your same build of Handbrake), but I had to first run tsMuxer to convert the file from .M2TS to .TS. It basically creates a new, older style container for you. Not being too much of a techie, I'm not sure what exactly one loses in the process--most likely audio channels--but for my purposes (hidef Video and AC3 audio, which are what you will end up with using AppleTV defaults) it works really nicely.
Manny74
Posts: 1
Joined: Fri Aug 07, 2009 7:17 pm

Re: Problems with converting M2TS to MP4/M4V

Post by Manny74 »

AlienFanatic wrote:Durnint, I hope this isn't a double post. I have been able to successfully transcode .M2TS files to .M4V and .MP4 (using your same build of Handbrake), but I had to first run tsMuxer to convert the file from .M2TS to .TS. It basically creates a new, older style container for you. Not being too much of a techie, I'm not sure what exactly one loses in the process--most likely audio channels--but for my purposes (hidef Video and AC3 audio, which are what you will end up with using AppleTV defaults) it works really nicely.


ive tried that but its not working, any suggestions? do I need other software? thnx
Post Reply