FAQ  •  Register  •  Login

[SOLVED] Latest version of Handbrake doesn't work with Sony

<<

mac3blade

Serviio newbie

Posts: 11

Joined: Tue Feb 07, 2012 8:22 pm

Post Sun Feb 12, 2012 9:03 pm

[SOLVED] Latest version of Handbrake doesn't work with Sony

EDIT --
I've changed the title of this thread to more accurately describe my problem. I've determined that I can encode things just fine with Handbrake 0.9.4, but if I use the same settings with Handbrake 0.9.5, I get audio with no video.

The crux of the matter may lie with whatever "tbc" is:

To make comparisons easier (if this line actually does contain the offending information):

Does not play:
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 624x352 [SAR 1:1 DAR 39:22], 431 kb/s, 23.97 fps, 23.98 tbr, 90k tbn, 180k tbc

Does play:
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 624x352 [SAR 1:1 DAR 39:22], 806 kb/s, 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc

/EDIT --


I have a certain set of Handbrake settings that I've used for a while, but it turns out they only intermittently work with my 2011 Sony Bravia. I have a bunch of .m4v files that I've encoded with the same specs:

Format: MP4
Video Codec: H.264
Framerate: Same as source
Average bitrate: 1200 kbps
2-pass encoding with Turbo first pass

I have over 300 files and most of them work flawlessly, but there are a few that give perfect audio with no video (just a black screen).

The fact that they are encoded with the exact same specs has me puzzled. The same files are served up perfectly to my iPhone, so Serviio can apparently do it for at least some devices.

I've tried both the Sony 2011 and the Sony 2010 renderer settings, but neither works.

Any ideas on how to make sure all my encodes work well with the Sony TV? I'm very new to this so troubleshooting all this is a little foreign.

Thanks
Kjell
Last edited by mac3blade on Sun Feb 26, 2012 5:10 am, edited 2 times in total.
<<

moltra

DLNA master

Posts: 1871

Joined: Thu Mar 24, 2011 11:00 pm

Location: Ohio USA

Post Sun Feb 12, 2012 9:11 pm

Re: Looking for Handbrake specs that will always work

Can you supply ffmpeg -i and mediainfo for a file that plays good and a file that does not. see signature on how.
Mark
Beta Tester Group
http://www.serviidb.com Online media resource repository

Netgear EVA2000 | Samsung BD-D5300 | XBOX 360 | Windows 7 | Mint Debian 12 | Raxz Maxx
HowTo: Provide supported formats of a device HowTo: Record a new ticket on Bitbucket
HowTo: Provide details of a video file that doesn't play HowTo: Turn on detailed logging
<<

mac3blade

Serviio newbie

Posts: 11

Joined: Tue Feb 07, 2012 8:22 pm

Post Mon Feb 13, 2012 6:32 am

Re: Looking for Handbrake specs that will always work

Thanks, Moltra.

Here's one that does *not* play:


  Code:
Family-Room-iMac:MacOS XXX$ ./ffmpeg -i /Volumes/usbdisk1/Movies/XXX1.m4v
ffmpeg version 0.9, Copyright (c) 2000-2011 the FFmpeg developers
  built on Dec 14 2011 01:44:37 with gcc 4.0.1 (Apple Inc. build 5493)
  configuration: --enable-static --disable-shared --bindir=/tmp/ffmpeg --disable-ffplay --disable-ffserver --enable-libmp3lame --enable-librtmp --enable-pthreads --disable-mmx --extra-ldflags=-L/tmp/static/lib --extra-cflags=-I/tmp/static/include --extra-libs=-lpolarssl
  libavutil    51. 32. 0 / 51. 32. 0
  libavcodec   53. 42. 0 / 53. 42. 0
  libavformat  53. 24. 0 / 53. 24. 0
  libavdevice  53.  4. 0 / 53.  4. 0
  libavfilter   2. 53. 0 /  2. 53. 0
  libswscale    2.  1. 0 /  2.  1. 0

Seems stream 0 codec frame rate differs from container frame rate: 180000.00 (180000/1) -> 23.98 (24000/1001)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Volumes/usbdisk1/Movies/XXX1.m4v':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42isomavc1
    creation_time   : 2012-02-10 19:02:23
    encoder         : HandBrake 0.9.5 2011010300
  Duration: 00:19:34.03, start: 0.000000, bitrate: 600 kb/s
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 624x352 [SAR 1:1 DAR 39:22], 431 kb/s, 23.97 fps, 23.98 tbr, 90k tbn, 180k tbc
    Metadata:
      creation_time   : 2012-02-10 19:02:23
      handler_name    :
    Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, s16, 164 kb/s
    Metadata:
      creation_time   : 2012-02-10 19:02:23
      handler_name    :
At least one output file must be specified
Family-Room-iMac:MacOS XXX$



Whereas this file, encoded with the same parameters except for a different bitrate (and an older version of Handbrake -- could that be the issue?), *does* play:


  Code:
Family-Room-iMac:MacOS XXX$ ./ffmpeg -i /Volumes/usbdisk1/Movies/XXX2.m4v
ffmpeg version 0.9, Copyright (c) 2000-2011 the FFmpeg developers
  built on Dec 14 2011 01:44:37 with gcc 4.0.1 (Apple Inc. build 5493)
  configuration: --enable-static --disable-shared --bindir=/tmp/ffmpeg --disable-ffplay --disable-ffserver --enable-libmp3lame --enable-librtmp --enable-pthreads --disable-mmx --extra-ldflags=-L/tmp/static/lib --extra-cflags=-I/tmp/static/include --extra-libs=-lpolarssl
  libavutil    51. 32. 0 / 51. 32. 0
  libavcodec   53. 42. 0 / 53. 42. 0
  libavformat  53. 24. 0 / 53. 24. 0
  libavdevice  53.  4. 0 / 53.  4. 0
  libavfilter   2. 53. 0 /  2. 53. 0
  libswscale    2.  1. 0 /  2.  1. 0

Seems stream 0 codec frame rate differs from container frame rate: 47.95 (17999678/375375) -> 59.94 (60000/1001)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Volumes/usbdisk1/Movies/XXX2.m4v':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42isomavc1
    creation_time   : 2010-05-25 17:05:52
    encoder         : HandBrake 0.9.4 2009112300
  Duration: 02:41:42.03, start: 0.000000, bitrate: 2137 kb/s
    Chapter #0.0: start -0.100200, end 378.111067
    Metadata:
      title           : Chapter  1
    Chapter #0.1: start 378.111067, end 473.673200
    Metadata:
      title           : Chapter  2
    Chapter #0.2: start 473.673200, end 724.924200
    Metadata:
      title           : Chapter  3
    Chapter #0.3: start 724.924200, end 840.539700
    Metadata:
      title           : Chapter  4
    Chapter #0.4: start 840.539700, end 1200.599400
    Metadata:
      title           : Chapter  5
    Chapter #0.5: start 1200.599400, end 1440.305533
    Metadata:
      title           : Chapter  6
    Chapter #0.6: start 1440.305533, end 1613.311700
    Metadata:
      title           : Chapter  7
    Chapter #0.7: start 1613.311700, end 1901.933367
    Metadata:
      title           : Chapter  8
    Chapter #0.8: start 1901.933367, end 2013.544867
    Metadata:
      title           : Chapter  9
    Chapter #0.9: start 2013.544867, end 2143.875067
    Metadata:
      title           : Chapter 10
    Chapter #0.10: start 2143.875067, end 2611.976033
    Metadata:
      title           : Chapter 11
    Chapter #0.11: start 2611.976033, end 2963.660700
    Metadata:
      title           : Chapter 12
    Chapter #0.12: start 2963.660700, end 3270.000067
    Metadata:
      title           : Chapter 13
    Chapter #0.13: start 3270.000067, end 3596.125867
    Metadata:
      title           : Chapter 14
    Chapter #0.14: start 3596.125867, end 3910.273033
    Metadata:
      title           : Chapter 15
    Chapter #0.15: start 3910.273033, end 4296.492200
    Metadata:
      title           : Chapter 16
    Chapter #0.16: start 4296.492200, end 4511.039856
    Metadata:
      title           : Chapter 17
    Chapter #0.17: start 4511.039856, end 4829.164100
    Metadata:
      title           : Chapter 18
    Chapter #0.18: start 4829.164100, end 5081.916600
    Metadata:
      title           : Chapter 19
    Chapter #0.19: start 5081.916600, end 5764.798800
    Metadata:
      title           : Chapter 20
    Chapter #0.20: start 5764.798800, end 5875.876433
    Metadata:
      title           : Chapter 21
    Chapter #0.21: start 5875.876433, end 6273.106600
    Metadata:
      title           : Chapter 22
    Chapter #0.22: start 6273.106600, end 6495.495433
    Metadata:
      title           : Chapter 23
    Chapter #0.23: start 6495.495433, end 6835.034633
    Metadata:
      title           : Chapter 24
    Chapter #0.24: start 6835.034633, end 6932.598767
    Metadata:
      title           : Chapter 25
    Chapter #0.25: start 6932.598767, end 7118.818133
    Metadata:
      title           : Chapter 26
    Chapter #0.26: start 7118.818133, end 7325.658100
    Metadata:
      title           : Chapter 27
    Chapter #0.27: start 7325.658100, end 7533.866100
    Metadata:
      title           : Chapter 28
    Chapter #0.28: start 7533.866100, end 7801.833800
    Metadata:
      title           : Chapter 29
    Chapter #0.29: start 7801.833800, end 8167.332267
    Metadata:
      title           : Chapter 30
    Chapter #0.30: start 8167.332267, end 8390.888933
    Metadata:
      title           : Chapter 31
    Chapter #0.31: start 8390.888933, end 8750.414767
    Metadata:
      title           : Chapter 32
    Chapter #0.32: start 8750.414767, end 9074.071433
    Metadata:
      title           : Chapter 33
    Chapter #0.33: start 9074.071433, end 9304.635100
    Metadata:
      title           : Chapter 34
    Chapter #0.34: start 9304.635100, end 9701.998722
    Metadata:
      title           : Chapter 35
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 720x480 [SAR 32:27 DAR 16:9], 1999 kb/s, 23.98 fps, 59.94 tbr, 90k tbn, 47.95 tbc
    Metadata:
      creation_time   : 2010-05-25 17:05:52
      handler_name    :
    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, s16, 132 kb/s
    Metadata:
      creation_time   : 2010-05-25 17:05:52
      handler_name    :
    Stream #0:2(und): Subtitle: mov_text (text / 0x74786574)
    Metadata:
      creation_time   : 2010-05-25 17:05:52
      handler_name    :
At least one output file must be specified
Family-Room-iMac:MacOS XXX$



They both seem to give an error with the framerate, yet the second one plays just fine. I was initially wondering if the bitrate was too high in the file that doesn't play, but as you can see, it's far less than the file that plays without a hiccup. The audio comes through normally, but with a black screen -- this is the same for all the files that won't play.

And just for good measure, here's another file (also encoded with the same defaults) that does *not* play:

  Code:
Family-Room-iMac:MacOS kjellhult$ ./ffmpeg -i /Volumes/usbdisk1/Movies/XXX3.m4v
ffmpeg version 0.9, Copyright (c) 2000-2011 the FFmpeg developers
  built on Dec 14 2011 01:44:37 with gcc 4.0.1 (Apple Inc. build 5493)
  configuration: --enable-static --disable-shared --bindir=/tmp/ffmpeg --disable-ffplay --disable-ffserver --enable-libmp3lame --enable-librtmp --enable-pthreads --disable-mmx --extra-ldflags=-L/tmp/static/lib --extra-cflags=-I/tmp/static/include --extra-libs=-lpolarssl
  libavutil    51. 32. 0 / 51. 32. 0
  libavcodec   53. 42. 0 / 53. 42. 0
  libavformat  53. 24. 0 / 53. 24. 0
  libavdevice  53.  4. 0 / 53.  4. 0
  libavfilter   2. 53. 0 /  2. 53. 0
  libswscale    2.  1. 0 /  2.  1. 0

Seems stream 0 codec frame rate differs from container frame rate: 180000.00 (180000/1) -> 59.94 (60000/1001)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Volumes/usbdisk1/Movies/XXX3.m4v':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42isomavc1
    creation_time   : 2012-02-10 22:44:38
    encoder         : HandBrake 0.9.5 2011010300
  Duration: 01:51:33.67, start: 0.000000, bitrate: 1370 kb/s
    Chapter #0.0: start -0.083411, end 518.184333
    Metadata:
      title           : Chapter  1
    Chapter #0.1: start 518.184333, end 1071.437033
    Metadata:
      title           : Chapter  2
    Chapter #0.2: start 1071.437033, end 1418.083333
    Metadata:
      title           : Chapter  3
    Chapter #0.3: start 1418.083333, end 1882.046833
    Metadata:
      title           : Chapter  4
    Chapter #0.4: start 1882.046833, end 2430.094333
    Metadata:
      title           : Chapter  5
    Chapter #0.5: start 2430.094333, end 2795.159033
    Metadata:
      title           : Chapter  6
    Chapter #0.6: start 2795.159033, end 3128.125000
    Metadata:
      title           : Chapter  7
    Chapter #0.7: start 3128.125000, end 3435.432000
    Metadata:
      title           : Chapter  8
    Chapter #0.8: start 3435.432000, end 3958.487867
    Metadata:
      title           : Chapter  9
    Chapter #0.9: start 3958.487867, end 4358.387367
    Metadata:
      title           : Chapter 10
    Chapter #0.10: start 4358.387367, end 4618.146867
    Metadata:
      title           : Chapter 11
    Chapter #0.11: start 4618.146867, end 5006.167833
    Metadata:
      title           : Chapter 12
    Chapter #0.12: start 5006.167833, end 5091.619867
    Metadata:
      title           : Chapter 13
    Chapter #0.13: start 5091.619867, end 5521.015500
    Metadata:
      title           : Chapter 14
    Chapter #0.14: start 5521.015500, end 5814.642167
    Metadata:
      title           : Chapter 15
    Chapter #0.15: start 5814.642167, end 6693.678633
    Metadata:
      title           : Chapter 16
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 720x368 [SAR 32:27 DAR 160:69], 1199 kb/s, 23.98 fps, 59.94 tbr, 90k tbn, 180k tbc
    Metadata:
      creation_time   : 2012-02-10 22:44:38
      handler_name    :
    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, s16, 164 kb/s
    Metadata:
      creation_time   : 2012-02-10 22:44:38
      handler_name    :
    Stream #0:2(und): Subtitle: mov_text (text / 0x74786574)
    Metadata:
      creation_time   : 2012-02-10 22:44:38
      handler_name    :
At least one output file must be specified
Family-Room-iMac:MacOS XXX$


When everyone else out there is encoding your files, what format do you choose for best picture quality and compatibility balanced with file size. I've always been happy with .M4V but can try something new if I'll get better results with Serviio.

I see that both files that don't play were encoded by a newer version of Handbrake, and both have a "180k tbc" -- whatever that is. But 180k sounds bigger than the 47.95 on the file that plays okay. Don't know what to make of all this...

Thank you very much for the assistance. I appreciate your time immensely.


Kjell
<<

mac3blade

Serviio newbie

Posts: 11

Joined: Tue Feb 07, 2012 8:22 pm

Post Mon Feb 13, 2012 7:05 am

Re: Looking for Handbrake specs that will always work

Moltra,

I took one of the files that was not playing (XXX1) and re-encoded it with Handbrake 0.9.4 (rather than the 0.9.5 that I had been using) -- and it now plays, even though I used the exact same presets that I had used in 0.9.5. The old version of Handbrake does not give an .M4V option, but I've noticed that some of my .M4Vs play fine.

Here's the ffmpeg info (I see that the mysterious tbc is down from 180k to a more reasonable 47.97 -- whatever that means):



  Code:
Family-Room-iMac:MacOS XXX$ ./ffmpeg -i /Volumes/usbdisk1/Movies/XXX1.oldhandbrake.mp4
ffmpeg version 0.9, Copyright (c) 2000-2011 the FFmpeg developers
  built on Dec 14 2011 01:44:37 with gcc 4.0.1 (Apple Inc. build 5493)
  configuration: --enable-static --disable-shared --bindir=/tmp/ffmpeg --disable-ffplay --disable-ffserver --enable-libmp3lame --enable-librtmp --enable-pthreads --disable-mmx --extra-ldflags=-L/tmp/static/lib --extra-cflags=-I/tmp/static/include --extra-libs=-lpolarssl
  libavutil    51. 32. 0 / 51. 32. 0
  libavcodec   53. 42. 0 / 53. 42. 0
  libavformat  53. 24. 0 / 53. 24. 0
  libavdevice  53.  4. 0 / 53.  4. 0
  libavfilter   2. 53. 0 /  2. 53. 0
  libswscale    2.  1. 0 /  2.  1. 0

Seems stream 0 codec frame rate differs from container frame rate: 47.95 (53999992/1126103) -> 23.98 (24000/1001)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Volumes/usbdisk1/Movies/XXX1.oldhandbrake.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42isomavc1
    creation_time   : 2012-02-13 06:40:55
    encoder         : HandBrake 0.9.4 2009112300
  Duration: 00:20:36.84, start: 0.000000, bitrate: 975 kb/s
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 624x352 [SAR 1:1 DAR 39:22], 806 kb/s, 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc
    Metadata:
      creation_time   : 2012-02-13 06:40:55
      handler_name    :
    Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, s16, 164 kb/s
    Metadata:
      creation_time   : 2012-02-13 06:40:55
      handler_name    :
At least one output file must be specified
Family-Room-iMac:MacOS XXX$



Aside from the .M4V vs .MP4 file formats, what do you think is the difference that the new version of Handbrake is injecting into the encode that doesn't sit right with Serviio?

To make comparisons easier (if this line actually does contain the offending information):

Does not play:
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 624x352 [SAR 1:1 DAR 39:22], 431 kb/s, 23.97 fps, 23.98 tbr, 90k tbn, 180k tbc

Does play:
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 624x352 [SAR 1:1 DAR 39:22], 806 kb/s, 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc

Thanks
Kjell
<<

mac3blade

Serviio newbie

Posts: 11

Joined: Tue Feb 07, 2012 8:22 pm

Post Sun Feb 26, 2012 5:09 am

Re: Latest version of Handbrake doesn't work with Sony

So here's what I've discovered:

The new version of Handbrake (0.9.5) uses a variable framerate with some encodes. Sony does not appear to be able to handle these.

The latest nightly builds include a handy checkbox that allows the user to force a constant framerate -- if this is checked, Handbrake will work fine with Sony.

Here's a Handbrake developer's reply to my question on the Handbrake forum:

The problem is with your player. In 0.9.5, HandBrake started producing correct variable framerate h.264. Prior to 0.9.5, HandBrake produced variable framerate timestamps, but did not set the correct flags in the encoded video. The tbc value you are looking at is the codec time base. With variable framerate h.264, the codec time base is *not* the same thing as the framerate. 180k is the right value.

So to make your player happy, you are going to have to select constant framerate. In recent nightly builds, there is a checkbox for this. In 0.9.5, picking a specific framerate instead of "Same as source" will force constant framerate.


So that solves that.

Kjell
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Sun Feb 26, 2012 9:32 am

Re: [SOLVED] Latest version of Handbrake doesn't work with S

Good job, I will add this tips on FAQ.
Thanks.
Illico
Sony 2010 KDL-46EX501 | BDP-S373 | SMP-N100 | Windows 8-i7 | Network DD HD-CE1.5TLU2 | Livebox2-UHD86 | ServiiDroid | ServiiGo | BubbleUPnP
Serviio beta tester - Moderator

Return to Sony

Who is online

Users browsing this forum: Google [Bot] and 29 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.