mp4 to ATV conversion Audio Problem SVN2354

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.
Post Reply
nathug
Bright Spark User
Posts: 204
Joined: Fri Apr 11, 2008 10:21 pm

mp4 to ATV conversion Audio Problem SVN2354

Post by nathug »

Hey all,

I just received my new Sanyo VPC-CG10 video camera. It films 720p at 30fps into a .mp4 file. These are great to drag and drop into iMovie etc. If I convert the file a RAW file from the camera to run on an AppleTV via Quicktime Pro or via iMovie (direct send to iTunes) I get Audio fine. If I send the file straight into HB, I get no audio. What am I doing wrong, is the magic question? I'm using the AppleTV preset.

Here is the log file:

Code: Select all

HandBrake Activity Log for /Users/hughesimac/Desktop/SANY0011 test.m4v: 2009-05-01 16:37:11 -0400
Handbrake Version: svn2354 i386 (2009042501)

[16:37:11] macgui: scanning specifically for title: 1
[16:37:11] macgui: performNewQueueScan currentQueueEncodeIndex is: 5
[16:37:11] hb_scan: path=/Users/hughesimac/Desktop/SANY0011.MP4, title_index=1
[16:37:11] scan: trying to open with libdvdread
[16:37:11] dvd: not a dvd - trying as a stream/file instead
    Last message repeated 31 times
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/hughesimac/Desktop/SANY0011.MP4':
  Duration: 00:00:19.41, start: 0.000000, bitrate: 9476 kb/s
    Stream #0.0(eng): Video: h264, yuv420p, 1280x720, 29.97 tbr, 29.97 tbn, 59.94 tbc
    Stream #0.1(eng): Audio: aac, 48000 Hz, stereo, s16
[16:37:11] scan: decoding previews for title 1
[16:37:11] scan: 10 previews, 1280x720, 29.970 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[16:37:11] scan: title (0) job->width:1280, job->height:720
[16:37:11] libhb: scan thread found 1 valid title(s)
[16:37:11] macgui: currentScanCount received from fQueueEncodeLibhb
[16:37:11] macgui: ScanDone state received from fQueueEncodeLibhb
[16:37:11] macgui: processNewQueueEncode title list is: 1
[16:37:11] macgui: Preset: AppleTV
[16:37:11] macgui: processNewQueueEncode number of passes expected is: 1
[16:37:11] macgui: prepareJob exiting
[16:37:11] 1 job(s) to process
[16:37:11] starting job
[16:37:11] job configuration:
[16:37:11]  * source
[16:37:11]    + /Users/hughesimac/Desktop/SANY0011.MP4
[16:37:11]    + title 1, chapter(s) 1 to 1
[16:37:11]    + container: mov,mp4,m4a,3gp,3g2,mj2
[16:37:11]    + data rate: 9476 kbps
[16:37:11]  * destination
[16:37:11]    + /Users/hughesimac/Desktop/SANY0011 test.m4v
[16:37:11]    + container: MPEG-4 (.mp4 and .m4v)
[16:37:11]      + 64-bit formatting
[16:37:11]  * video track
[16:37:11]    + decoder: h264
[16:37:11]    + frame rate: same as source (around 29.970 fps)
[16:37:11]    + loose anamorphic
[16:37:11]      + storage dimensions: 1280 * 720 -> 960 * 544, crop 0/0/0/0
[16:37:11]      + pixel aspect ratio: 967 / 960
[16:37:11]      + display dimensions: 967 * 544
[16:37:11]    + encoder: x264
[16:37:11]      + 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
[16:37:11]      + quality: 21.00 (RF)
[16:37:11]  * audio track 0
[16:37:11]    + decoder: English (AAC) (track 1, id 1)
[16:37:11]    + mixdown: Stereo
[16:37:11]    + dynamic range compression: 1.000000
[16:37:11]    + encoder: faac
[16:37:11]      + bitrate: 160 kbps, samplerate: 48000 Hz
[16:37:11] dvd: not a dvd - trying as a stream/file instead
[16:37:11] reader: first SCR 0
[16:37:11] encx264: keyint-min: 30, keyint-max: 300
[16:37:11] encx264: encoding with stored aspect 967/960
[16:37:11] encx264: Encoding at constant RF 21.000000
x264 [info]: using SAR=967/960
x264 [warning]: frame MB size (60x34) > level limit (1620)
x264 [warning]: MB rate (61138) > level limit (40500)
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.1 Cache64
x264 [info]: profile Main, level 3.0
[aac @ 0x1a1d600]channel element 1.1 is not allocated
[16:37:11] sync: expecting 611 video frames
[16:37:33] reader: done. 1 scr changes
[16:37:50] sync: got 581 frames, 611 expected
[16:37:50] work: average encoding speed for job is 14.713826 fps
[16:37:51] mux: track 0, 581 frames, 6568336 bytes, 2715.22 kbps, fifo 512
[16:37:51] mux: track 1, 1 frames, 26 bytes, 0.01 kbps, fifo 8
[16:37:51] h264-decoder done: 582 frames, 0 decoder errors, 0 drops
[16:37:51] render: lost time: 0 (0 frames)
[16:37:51] render: gained time: 0 (0 frames) (0 not accounted for)
x264 [info]: slice I:2     Avg QP:22.08  size: 75977  PSNR Mean Y:41.64 U:46.36 V:46.30 Avg:42.72 Global:42.39
x264 [info]: slice P:294   Avg QP:25.58  size: 17507  PSNR Mean Y:38.45 U:43.47 V:43.24 Avg:39.55 Global:39.52
x264 [info]: slice B:285   Avg QP:28.54  size:  4452  PSNR Mean Y:37.92 U:43.23 V:42.96 Avg:39.06 Global:39.03
x264 [info]: consecutive B-frames:  1.7% 97.8%  0.5%  0.0%  0.0%  0.0%  0.0%
x264 [info]: mb I  I16..4:  2.8%  0.0% 97.2%
x264 [info]: mb P  I16..4:  0.4%  0.0%  3.6%  P16..4: 51.5% 28.5%  9.9%  0.8%  0.8%    skip: 4.6%
x264 [info]: mb B  I16..4:  0.1%  0.0%  0.6%  B16..8: 51.6%  2.0%  2.4%  direct: 5.2%  skip:38.3%  L0:25.3% L1:62.5% BI:12.2%
x264 [info]: direct mvs  spatial:99.3%  temporal:0.7%
x264 [info]: coded y,uvDC,uvAC intra:85.2% 83.8% 44.4% inter:23.5% 19.2% 1.1%
x264 [info]: ref P L0  87.5%  7.7%  4.7%
x264 [info]: ref B L0  88.2% 11.8%
x264 [info]: SSIM Mean Y:0.9773264
x264 [info]: PSNR Mean Y:38.201 U:43.365 V:43.116 Avg:39.325 Global:39.279 kb/s:2710.32
[16:37:51] aac-decoder done: 0 frames, 0 decoder errors, 0 drops
[16:37:51] libhb: work result = 0
My other question is, is there a good way of converting from 30fps, to 24fps to keep 720p with out it looking jumpy?

Cheers

Nate
Last edited by nathug on Sun May 03, 2009 12:55 am, edited 1 time in total.
van
Veteran User
Posts: 417
Joined: Wed Aug 29, 2007 6:35 am

Re: mp4 to ATV conversion Audio Problem SVN2534

Post by van »

nathug wrote:If I convert the file a RAW file from the camera to run on an AppleTV via Quicktime Pro or via iMovie (direct send to iTunes) I get Audio fine. If I send the file straight into HB, I get no audio. What am I doing wrong, is the magic question?
This line from your log says that the ffmpeg AAC audio decoder thinks there's a problem with the audio bitstream and is giving up:

Code: Select all

[aac @ 0x1a1d600]channel element 1.1 is not allocated
That's why you get no audio. This may be a problem with the bitstream that Quicktime/iMovie work around or it may be a bug in the ffmpeg aac decoder. I'd be a bit suspicious of the latter because the error seems to be saying that the first channel pair element had no explicit configuration but the standard gives implicit configuration rules so that explicit configuration of CPEs is never required. But this is code from another project, not HB. Superdump might know what's going on since he worked on AAC for the ffmpeg project.
nathug wrote:My other question is, is there a good way of converting from 30fps, to 24fps to keep 720p with out it looking jumpy?
Use the current head (svn2368 or later) and specify 24fps in the framerate pulldown on the video settings tab.
nathug
Bright Spark User
Posts: 204
Joined: Fri Apr 11, 2008 10:21 pm

Re: mp4 to ATV conversion Audio Problem SVN2354

Post by nathug »

Cool I PM'ed Superdump to see.

Thanks for the tip on the latest SVN, I'll give it a try.

Cheers

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

Re: mp4 to ATV conversion Audio Problem SVN2534

Post by nathug »

van wrote:
nathug wrote:My other question is, is there a good way of converting from 30fps, to 24fps to keep 720p with out it looking jumpy?
Use the current head (svn2368 or later) and specify 24fps in the framerate pulldown on the video settings tab.
I compiled the latest version as of 11 o'clock last night. I have tried 24fps and 23.XXX (sorry can't remember the exacact setting, at work now) and it doesn't look good, very jumpy. I'll try some other test later today, and post some logs.

I wish Apple and the camera companies would get their acts together, why have iMovie running HD stuff, yet the ATV can't handel anything over 24fps in HD. Yet the ATV can handel 24fps HD, but iMovie can't!!

Nate
superdump
Posts: 12
Joined: Wed Mar 21, 2007 5:24 pm

Re: mp4 to ATV conversion Audio Problem SVN2534

Post by superdump »

van wrote:
nathug wrote:If I convert the file a RAW file from the camera to run on an AppleTV via Quicktime Pro or via iMovie (direct send to iTunes) I get Audio fine. If I send the file straight into HB, I get no audio. What am I doing wrong, is the magic question?
This line from your log says that the ffmpeg AAC audio decoder thinks there's a problem with the audio bitstream and is giving up:

Code: Select all

[aac @ 0x1a1d600]channel element 1.1 is not allocated
That's why you get no audio. This may be a problem with the bitstream that Quicktime/iMovie work around or it may be a bug in the ffmpeg aac decoder. I'd be a bit suspicious of the latter because the error seems to be saying that the first channel pair element had no explicit configuration but the standard gives implicit configuration rules so that explicit configuration of CPEs is never required. But this is code from another project, not HB. Superdump might know what's going on since he worked on AAC for the ffmpeg project.
Can you try the file with current FFmpeg trunk? I'm pretty sure all these channel allocation issues should have been fixed though I don't remember the revision of the commit.
nathug
Bright Spark User
Posts: 204
Joined: Fri Apr 11, 2008 10:21 pm

Re: mp4 to ATV conversion Audio Problem SVN2354

Post by nathug »

Sorry, FFmpeg truck?

Do you mean I should select this in the encoding options?

If you could let me know, I'd be glad to try.

Nate
van
Veteran User
Posts: 417
Joined: Wed Aug 29, 2007 6:35 am

Re: mp4 to ATV conversion Audio Problem SVN2354

Post by van »

I downloaded the test clips from the Steve's Digicams' review of this camera. I compared the 24fps HB output with the native 30fps. It's jumpier but that's what down converting the frame rate looks like. Going from 30 to 24 means dropping 20% of the frames - 1 frame out of every 5. The current HB drops the minimum number of frames, exactly every 5th, but can't do anything to smooth out the motion of what remains. You'd be better off selecting the AppleTV preset so HB scales the video from 1280 to 960 but leaves the frame rate at 30fps. I don't think you'll notice the resolution reduction (I couldn't see it in a side-by-side comparison of the native & HB encode clips) and the motion will stay smooth. And you get a huge bit rate reduction - the video goes from 10Mb/s to 2.5Mb/s, a factor of 4 savings for the same quality.

I also build HB against the current ffmpeg head (r18733) to check if the AAC decoder had been fixed. Superdump was right - the audio now works perfectly.

If any other dev is interested, this patch is what I had to change to build HB against the current ffmpeg head (the FETCH url is obviously bogus - I just stuck the right tar in the downloads directory).
nathug
Bright Spark User
Posts: 204
Joined: Fri Apr 11, 2008 10:21 pm

Re: mp4 to ATV conversion Audio Problem SVN2354

Post by nathug »

van wrote:I downloaded the test clips from the Steve's Digicams' review of this camera. I compared the 24fps HB output with the native 30fps. It's jumpier but that's what down converting the frame rate looks like. Going from 30 to 24 means dropping 20% of the frames - 1 frame out of every 5. The current HB drops the minimum number of frames, exactly every 5th, but can't do anything to smooth out the motion of what remains. You'd be better off selecting the AppleTV preset so HB scales the video from 1280 to 960 but leaves the frame rate at 30fps. I don't think you'll notice the resolution reduction (I couldn't see it in a side-by-side comparison of the native & HB encode clips) and the motion will stay smooth. And you get a huge bit rate reduction - the video goes from 10Mb/s to 2.5Mb/s, a factor of 4 savings for the same quality.

I also build HB against the current ffmpeg head (r18733) to check if the AAC decoder had been fixed. Superdump was right - the audio now works perfectly.

If any other dev is interested, this patch is what I had to change to build HB against the current ffmpeg head (the FETCH url is obviously bogus - I just stuck the right tar in the downloads directory).
Cheers,

I had a thought, what about using the new Anomophic setting. Will the allow me to use 30fps? I'll give it a try today.

I'm playing with this right now on the Universal settings, and its amazing!!!

Nate
jbrjake
Veteran User
Posts: 4805
Joined: Wed Dec 13, 2006 1:38 am

Re: mp4 to ATV conversion Audio Problem SVN2354

Post by jbrjake »

van wrote:HB against the current ffmpeg head (the FETCH url is obviously bogus - I just stuck the right tar in the downloads directory).
ffmpeg-r18735.tar.gz is up on download.m0k.org now.
Post Reply