Re-coding mp4/aac5.1 for iPod Touch produces weird result :(

HandBrake for Mac 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.
Locked
CDPlayer

Re-coding mp4/aac5.1 for iPod Touch produces weird result :(

Post by CDPlayer »

Hello,

Just tried to re-encode an existing mp4 file (x264 video, AAC 5.1) with the iPod Touch/iPhone preset. The resulting file is, mildly put, weird. Instead of original length of 1 hour 38 minutes it is three times as long. It has video in the first 1:38, then video track goes blank but audio carries on. The audio itself is strange - it appears as only some (which - I don't know) of the original 6 channels got reecoded, i.e. no dialogs are heard, but sound effects are. I did search for the terms I could come up with thinking of, but don't seem to be able to find it. Here is my encode log:

Code: Select all

HandBrake Activity Log for /Volumes/Big Disk/Users/alex/Desktop/WALL-E.mp4: 2009-12-12 15:49:32 +1100
Handbrake Version: 0.9.4 i386 (2009112300)

[15:49:32] macgui: Rip: Pending queue count is 0
[15:49:32] macgui: scanning specifically for title: 1
[15:49:32] macgui: performNewQueueScan currentQueueEncodeIndex is: 1
[15:49:32] hb_scan: path=/Volumes/Storage/Movies/English/Cartoons/WALL-E.mp4, title_index=1
[15:49:32] scan: trying to open with libdvdread
libdvdnav: Using dvdnav version 4.1.3
libdvdread: Using libdvdcss version 1.2.10 for DVD access
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
[15:49:32] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Volumes/Storage/Movies/English/Cartoons/WALL-E.mp4':
  Duration: 01:38:42.06, start: 0.000000, bitrate: 2193 kb/s
    Stream #0.0(und): Video: h264, yuv420p, 1280x544 [PAR 1:1 DAR 40:17], 23.98 tbr, 23.98 tbn, 47.95 tbc
    Stream #0.1(und): Audio: aac, 48000 Hz, 5.1, s16
[15:49:33] scan: decoding previews for title 1
[15:49:33] scan: 10 previews, 1280x544, 23.976 fps, autocrop = 0/0/0/0, aspect 2.35:1, PAR 1:1
[15:49:33] scan: title (0) job->width:1280, job->height:544
[15:49:33] libhb: scan thread found 1 valid title(s)
[15:49:33] macgui: ScanDone state received from fQueueEncodeLibhb
[15:49:33] macgui: Preset: iPhone & iPod Touch
[15:49:33] macgui: processNewQueueEncode number of passes expected is: 1
[15:49:33] macgui: prepareJob exiting
[15:49:33] 1 job(s) to process
[15:49:33] starting job
[15:49:33] job configuration:
[15:49:33]  * source
[15:49:33]    + /Volumes/Storage/Movies/English/Cartoons/WALL-E.mp4
[15:49:33]    + title 1, chapter(s) 1 to 1
[15:49:33]    + container: mov,mp4,m4a,3gp,3g2,mj2
[15:49:33]    + data rate: 2193 kbps
[15:49:33]  * destination
[15:49:33]    + /Volumes/Big Disk/Users/alex/Desktop/WALL-E.mp4
[15:49:33]    + container: MPEG-4 (.mp4 and .m4v)
[15:49:33]  * video track
[15:49:33]    + decoder: h264
[15:49:33]    + frame rate: same as source (around 23.976 fps)
[15:49:33]    + dimensions: 1280 * 544 -> 496 * 208, crop 0/0/0/0
[15:49:33]    + encoder: x264
[15:49:33]      + options: cabac=0:ref=2:me=umh:bframes=0:subq=6:8x8dct=0:trellis=0
[15:49:33]      + quality: 20.00 (RF)
[15:49:33]  * audio track 0
[15:49:33]    + decoder: Unknown (AAC) (track 1, id 1)
[15:49:33]    + mixdown: Stereo
[15:49:33]    + encoder: ca_aac
[15:49:33]      + bitrate: 128 kbps, samplerate: 48000 Hz
libdvdnav: Using dvdnav version 4.1.3
libdvdread: Using libdvdcss version 1.2.10 for DVD access
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
[15:49:33] dvd: not a dvd - trying as a stream/file instead
[15:49:33] encx264: keyint-min: 24, keyint-max: 240
[15:49:33] encx264: Encoding at constant RF 20.000000
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
x264 [info]: profile Baseline, level 2.1
[15:49:33] sync: expecting 142011 video frames
[15:49:33] reader: first SCR 7507 id 0 DTS 0
[15:49:33] sync: first pts is 7507
[16:10:05] reader: done. 1 scr changes
[16:10:06] sync: got 141983 frames, 142011 expected
[16:10:06] work: average encoding speed for job is 115.114517 fps
[16:10:10] mux: track 0, 141983 frames, 458148227 bytes, 206.30 kbps, fifo 64
[16:10:10] mux: track 1, 832788 frames, 299641395 bytes, 134.93 kbps, fifo 1048576
[16:10:10] h264-decoder done: 141984 frames, 0 decoder errors, 0 drops
[16:10:10] render: lost time: 0 (0 frames)
[16:10:10] render: gained time: 0 (0 frames) (0 not accounted for)
x264 [info]: frame I:1545  Avg QP:17.42  size: 16541  PSNR Mean Y:46.67 U:49.72 V:49.82 Avg:47.41 Global:46.36
x264 [info]: frame P:140438 Avg QP:21.75  size:  3081  PSNR Mean Y:43.00 U:47.11 V:47.21 Avg:43.87 Global:42.71
x264 [info]: mb I  I16..4: 17.9%  0.0% 82.1%
x264 [info]: mb P  I16..4:  1.7%  0.0%  2.7%  P16..4: 39.1% 18.3%  7.8%  0.0%  0.0%    skip:30.5%
x264 [info]: coded y,uvDC,uvAC intra: 60.9% 73.3% 47.4% inter: 23.7% 20.4% 5.5%
x264 [info]: i16 v,h,dc,p: 32% 28% 12% 27%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18% 26% 16%  6%  7%  7%  8%  6%  7%
x264 [info]: ref P L0: 76.0% 24.0%
x264 [info]: SSIM Mean Y:0.9866537
x264 [info]: PSNR Mean Y:43.039 U:47.143 V:47.236 Avg:43.912 Global:42.739 kb/s:619.00
[16:10:10] aac-decoder done: 0 frames, 0 decoder errors, 0 drops
[16:10:10] libhb: work result = 0
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: Re-coding mp4/aac5.1 for iPod Touch produces weird result :(

Post by BradleyS »

I've been trying to narrow this down a bit. The audio in your source is read by ffmpeg like this:

Code: Select all

Stream #0.1(und): Audio: aac, 48000 Hz, 5.1, s16
However, in my testing, what HandBrake produces when selecting 6-channel discrete AAC output from AC3 input is read back by ffmpeg like this:

Code: Select all

Stream #0.1(eng): Audio: aac, 48000 Hz, 6 channels, s16, 422 kb/s
So as you can see, I am unable to reproduce the exact conditions under which the error occurs. I take it that your source was not originally encoded with HandBrake. What was it encoded with?
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: Re-coding mp4/aac5.1 for iPod Touch produces weird result :(

Post by BradleyS »

I should mention, the language being "und" or "eng" is probably not the issue. Rather, I'm calling attention to the lack of a bitrate listed in the former example, as well as "5.1" being used rather than "6 channels".
CDPlayer

Re: Re-coding mp4/aac5.1 for iPod Touch produces weird result :(

Post by CDPlayer »

Bradley,

Thanks for follow-up.

I understand about the difference.

As mentioned before on IRC, I will cut off a couple megabytes of the beginning of the original file and upload it somewhere for you. I believe that the original file was not made with HandBrake. I am not sure how it was made, but it is said to be compatible with Xbox360/PS3, and plays in Quicktime X just fine.

Stay tuned.
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: Re-coding mp4/aac5.1 for iPod Touch produces weird result :(

Post by BradleyS »

Since my last I have been able to reproduce the issue along with another HB contributor. We're working on the issue.
CDPlayer

Re: Re-coding mp4/aac5.1 for iPod Touch produces weird result :(

Post by CDPlayer »

Got it, no problem. Please let me know if I can help and I gladly will.
Deleted User 11865

Re: Re-coding mp4/aac5.1 for iPod Touch produces weird result :(

Post by Deleted User 11865 »

Forum rule 3: Avoid discussing topics of dubious legality (DRM, warez, cracks, illegally obtained copyrighted content, or rental discs)

If you had obtained the source legally, you'd know how it was made. Locking.
Locked