Please Help!

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.
FaiT
Posts: 47
Joined: Wed Mar 23, 2011 9:54 pm

Re: Please Help!

Post by FaiT »

Additionally (if you're on windows and have a 64-bit OS) I would recommend getting the 64-bit handbrake CLI, if you don't have it already. If you like the gui just drop the CLI.exe to the handbrake folder. On identical settings for the same movie I went from aprox. 75fps to aprox 110fps a massive improvement. Its experimental but the only thing I've noticed is that it doesn't support CC, I just use vobsub ripper and through it into handbrake as an srt to get around it though. :D .
phibertron
Bright Spark User
Posts: 211
Joined: Thu Oct 22, 2009 2:37 am

Re: Please Help!

Post by phibertron »

As you can tell, I hate not finding a solution :D

I learend a lot about mp4box and other tools when I used to use ffmpeg and mencoder

I learned a lot about vfr and cfr when I went to handbrake
At first glance I fell in love with vfr
I still love it, but...

It is when I needed to concatenate two mp4's from a 2 disc dvd movie
which was NOT funny, in any way, that I cursed it to holy hell

As you could imagine, sync was huge issue there
and still is for the most part, when trying to concatenate two vfr mp4's

This is further compounded, by the fact that there are certain devices
that just dont vfr, or dont like vfr with higher than specified fps aka PFS

And this is even further compounded when you do what you are doing
As the possibility of sync issues is high

X64 for the win! :mrgreen:

P.S.

You want to see insane fps encode rates try this
I use this profile when I need to check cropping or subtitle choices
with single chapter test
Or when I need to get a video for the phone really really quick

Code: Select all

ref=1:bframes=0:cabac=0:8x8dct=0:weightb=0:weightp=0:mbtree=0:no-dct-decimate=1:me=dia:subq=0:aq-mode=0:analyse=none:mixed-refs=0:trellis=0:rc-lookahead=0:scenecut=0:no-deblock=1:no-ssim=1:no-psnr=1
FaiT
Posts: 47
Joined: Wed Mar 23, 2011 9:54 pm

Re: Please Help!

Post by FaiT »

When I merge two movies together I use DVD Shrink and DVD2One

http://www.afterdawn.com/software/cd_dv ... shrink.cfm

http://www.dvd2one.com/

DVD Shrink lets me strip out whatever I want from the DVD, so I just chuck every thing except the main movie. Then I do the same for the second Disk. Then I Open them in DVD2One and add the second title to the first. Then Handbrake the result.

This is the guide I used http://www.maximumpc.com/article/featur ... e?page=0,5
FaiT
Posts: 47
Joined: Wed Mar 23, 2011 9:54 pm

Re: Please Help!

Post by FaiT »

I've decided to use CFV because I intend to stream my encode from a media server eventually and I've read that media server programs don't handle VFR very well.
phibertron
Bright Spark User
Posts: 211
Joined: Thu Oct 22, 2009 2:37 am

Re: Please Help!

Post by phibertron »

FaiT wrote: When I merge two movies together I use DVD Shrink and DVD2One
Great minds think alike :D
I do pretty much the same thing
FaiT wrote: I've decided to use CFV because I intend to stream my encode from a media server eventually and I've read that media server programs don't handle VFR very well.
I currently use TwonkyMedia Server running on Windows Home Server
If you ever look into that product let me know
As I have done extensive tweaking to it's navtree structure, and some other stuff
I have a bunch of threads I maintain over in there forums

It doesnt have all the iso support like ps3mediaserver
But all my moives are already in mp4 on purpose, so it dont matter
It saves on hd space
phibertron
Bright Spark User
Posts: 211
Joined: Thu Oct 22, 2009 2:37 am

Re: Please Help!

Post by phibertron »

FaiT wrote: When I merge two movies together I use DVD Shrink and DVD2One
Forgot to add, that If memory servers me well
the only scenario in which this tactic doesn work is with subtitles
have to go remember which movie I had this problem with that was 2 discs
but that was a long time ago
will have to reinvestigate if I ever decide to reencode it, whatever movie it was
FaiT
Posts: 47
Joined: Wed Mar 23, 2011 9:54 pm

Re: Please Help!

Post by FaiT »

Yep, I just add in the nero audio, use mp4muxer to drop the handbrake audio and its all good.

Curious though even with CFR selected in handbrake I get this in mediainfo

Frame rate mode : Variable
Frame rate : 23.976 fps
Minimum frame rate : 23.974 fps
Maximum frame rate : 23.981 fps

Not quite sure what it means?
phibertron
Bright Spark User
Posts: 211
Joined: Thu Oct 22, 2009 2:37 am

Re: Please Help!

Post by phibertron »

I actually asked the same question in this thread

viewtopic.php?f=6&t=20158

As I understand it, even though you see that, the timecodes in the h264 stream are CFR

I have not seen any adverse affects of CFR with that reading at present
FaiT
Posts: 47
Joined: Wed Mar 23, 2011 9:54 pm

Re: Please Help!

Post by FaiT »

Sorry to bother you but I can't seem to get the fix you posted to work. I keep getting "unrecognized option" and "no action specified" in mp4track.

mp4track output.m4v --track-id 4 --udtaname "Dolby Surround"

Perhaps i'm butchering spaces? maybe if you type [space] for spaces? I'll keep trying, and thanks again for the help :D .

EDIT: Nevermind, I got it. Thank You. gonna test it now.
phibertron
Bright Spark User
Posts: 211
Joined: Thu Oct 22, 2009 2:37 am

Re: Please Help!

Post by phibertron »

If you want to know a way to deal with the CFR showing up as VFR
Here is some food for thought

1.
-add "Handbrake Encoded.mp4"#1:lang=en
-add "Handbrake Encoded.mp4"#video:lang=en

When either of the above is done
What handbrake places in the mp4, not just the h264 stream
is literally copied over to the new mp4

Frame rate mode : Variable
Frame rate : 23.976 fps
Minimum frame rate : 23.974 fps
Maximum frame rate : 23.981 fps

2. mp4box -raw 1 "Handbrake Encoded.mp4"

When the above is done, it is extracting the h264 stream out of the mp4
And to add it to the new mp4, you would use the following

-add "Handbrake Encoded_track1.h264":lang=en:fps=23.976

Note:
you will need to use the true fps of the video, in this case 23.976
the above method does not carry over the fps mode
which is why we have to tell mp4box what it is
yes, the h264 stream knows, but the mp4 has to tell the demuxer what it is

If you do option 2.
When you look at the mp4 in mediainfo it will

Frame rate mode : Constant
Frame rate : 23.976 fps

Note:
If the video was not cfr encoded, then sync issues will ensue

Try out option 2, and test the sync to see what you think
Last edited by phibertron on Sat Mar 26, 2011 1:42 am, edited 1 time in total.
phibertron
Bright Spark User
Posts: 211
Joined: Thu Oct 22, 2009 2:37 am

Re: Please Help!

Post by phibertron »

FWIW

Your gonna love this tool :mrgreen:

http://forum.doom9.org/showthread.php?t=152419

If say I created an CFR mp4 with handbrake
and lets say the it showed the usual mediainfo for fps

Frame rate mode : Variable
Frame rate : 23.976 fps
Minimum frame rate : 23.974 fps
Maximum frame rate : 23.981 fps

If I use this special version of ffmpeg that is only a muxer

ffmpeg -i handbrake.mp4 -vcodec copy -acodec copy -vbsf h264_changesps=cfr output.mp4

it will now show this in mediainfo for fps

Frame rate mode : Constant
Frame rate : 23.976 fps

I havent put this thing through all of the testing yet
but it does appear to work well, its just a special remuxer

Warning
It doesnt change VFR into CFR, and adds and a Original frame rate: 90 000.000 fps

Origninal

Frame rate mode : Variable
Frame rate : 23.976 fps
Minimum frame rate : 12.288 fps
Maximum frame rate : 29.970 fps

Modified

Frame rate mode : Variable
Frame rate : 23.976 fps
Original frame rate : 90 000.000 fps
Minimum frame rate : 12.288 fps
Maximum frame rate : 29.970 fps

So if you see the above, it is a quick indicator that the original was vfr and not cfr
FaiT
Posts: 47
Joined: Wed Mar 23, 2011 9:54 pm

Re: Please Help!

Post by FaiT »

You are literally finding stuff faster than I have time to test :wink: but thats ok I'm excited at these possibilities. Just got done using megui to do my video, no sync problems :D . Gonna do a full test with video at my custom settings - chapters - closed captions - multiple audio streams - mp4track to provide names in itunes - itunes to tag - and mp4creator to optimize (unless you know how to do it in mp4box?) Gonna test that tool from doom9, and I need to sleep at some point (only have 4 hours in 2 days :shock: . Must.......Keep.............Going......... :twisted:
phibertron
Bright Spark User
Posts: 211
Joined: Thu Oct 22, 2009 2:37 am

Re: Please Help!

Post by phibertron »

I like to have a lot of tools in the toolbox
Which is why have like 100 kinds of screwdrivers
The right tool for the right job LOL

this will do it, but not sure if it will do it during the -add part or not
I assume that -hint is the same thing as optimize

mp4box -hint "Movie Name.mp4"

This is how to add some itunes tagging with mp4box

mp4box.exe -itags cover="cover.jpg":name="Movie Name" "Movie Name.mp4"

Code: Select all

mp4box.exe -tag-list

Supported iTunes tag modifiers:
        album_artist    usage: album_artist=album artist
        album   usage: album=name
        tracknum        usage: track=x/N
        track   usage: track=name
        artist  usage: artist=name
        comment usage: comment=any comment
        compilation     usage: compilation=yes,no
        composer        usage: composer=name
        created usage: created=year
        disk    usage: disk=x/N
        tool    usage: tool=name
        genre   usage: genre=name
        name    usage: name=name
        tempo   usage: tempo=integer
        writer  usage: writer=name
        group   usage: group=name
        cover   usage: cover=file.jpg,file.png
        encoder usage: encoder=name
        gapless usage: gapless=yes,no
Take a break, sleep deprivation only leads to fat fingers and dented foreheads :D
FaiT
Posts: 47
Joined: Wed Mar 23, 2011 9:54 pm

Re: Please Help!

Post by FaiT »

Sooooon I tried that ffmpeg, it did what you said, audio sync was about the same but it seemed to do something wonky with the file - after it had been touched by ffmpeg it wouldn't add to mp4box. Gonna try doing my video in megui. Signing off for tonight - again I am eternally grateful for your help - I feel like the perfect file is just within my grasp (in no small part due to your generous advice) Once I get this workflow down I may not pull it out often - but I intend to encode me some Lord of the Rings Extended Version :D .
phibertron
Bright Spark User
Posts: 211
Joined: Thu Oct 22, 2009 2:37 am

Re: Please Help!

Post by phibertron »

Peace out

Thats what we need, the LOTR tool
one tool to rule them all!
hanbrake is very close to that :D
phibertron
Bright Spark User
Posts: 211
Joined: Thu Oct 22, 2009 2:37 am

Re: Please Help!

Post by phibertron »

Since your going down the path of all this muxing
and also in the persuit of trying to minimize the amount of tools to have use
and also to minimize how long all of this takes

Sure, there are other tools out there, metax, drax, mp4chaps, mp4creator to also do this for itunes chapters
But I figured I would also show you a way to add itunes style chapters with mp4box

Use the following text as a template, to create your chapters list
and make changes to it, as I have noted below

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<!-- GPAC 3GPP Text Stream -->
<TextStream version="1.1">
<TextStreamHeader width="720" height="480" layer="0" translation_x="0" translation_y="0">
<TextSampleDescription horizontalJustification="center" verticalJustification="bottom" backColor="0 0 0 0" verticalText="no" fillTextRegion="no" continuousKaraoke="no" scroll="None">
<FontTable>
<FontTableEntry fontName="Arial" fontID="1"/>
</FontTable>
<TextBox top="0" left="0" bottom="480" right="720"/>
<Style styles="Normal" fontID="1" fontSize="32" color="ff ff ff ff"/>
</TextSampleDescription>
</TextStreamHeader>
<TextSample sampleTime="00:00:00.000">Intro</TextSample>
<TextSample sampleTime="00:01:00.000">Middle</TextSample>
<TextSample sampleTime="00:02:00.000">End</TextSample>
</TextStream>
Things to change are marked in red

note: note sure if we need to change the width/height and/or bottom/right params

<TextStreamHeader width="720" height="480"
<TextBox top="0" left="0" bottom="480" right="720"/>

note: these should be obvious

<TextSample sampleTime="00:00:00.000">Intro</TextSample>
<TextSample sampleTime="00:01:00.000">Middle</TextSample>
<TextSample sampleTime="00:02:00.000">End</TextSample>

Save the file as something.ttxt (utf-8)
and then import it like the following

mp4box -add input.m4v -add chapters.ttxt:chap output.m4v

If I inspect an m4v created by handbrake, I see this for the chapters track

Track # 3 Info - TrackID 3 - TimeScale 90000 - Duration 00:12:04.807
Track is disabled
Media Info: Language "Undetermined" - Type "text:text" - 3 samples
3GPP/MPEG-4 Timed Text - Size 0 x 0 - Translation X=0 Y=0 - Layer 0

If I do this for the one created by mp4box, I see this

Track # 3 Info - TrackID 3 - TimeScale 1000 - Duration 00:03:00.000
Track is disabled
Media Info: Language "Undetermined" - Type "text:tx3g" - 3 samples
3GPP/MPEG-4 Timed Text - Size 720 x 480 - Translation X=0 Y=0 - Layer 0

and the view from mediainfo is like this

Text
ID : 3
Format : Apple text
Codec ID : text
Duration : 12mn 4s
Bit rate mode : Constant
Bit rate : 1 bps
Stream size : 69.0 Bytes (0%)
Encoded date : UTC 2011-03-26 15:58:34
Tagged date : UTC 2011-03-26 15:59:26

Text
ID : 3
Format : Timed text
Codec ID : tx3g
Duration : 3mn 0s
Bit rate mode : Variable
Bit rate : 1 bps
Stream size : 20.0 Bytes (0%)
Title : Imported with GPAC 0.4.6-DEV ( internal rev. 8 )
Encoded date : UTC 2011-03-26 15:25:53
Tagged date : UTC 2011-03-26 15:25:53

and both methods work as expected
.
FaiT
Posts: 47
Joined: Wed Mar 23, 2011 9:54 pm

Re: Please Help!

Post by FaiT »

Thanks for the info. For chapters outside of handbrake I usually just use DVD Decrypter in IFO mode and tell it to make a chapter file which I can mux with megui or mp4muxer. But I have hit a roadblock. I am trying to get the CC in my video. Extracting it failed using Subrip and CC Extractor. I have an mp4 made with handbrake but I can't seem to extract the subtitle track. I went online to subscene and downloaded an .srt of the english subs. when I imported it into megui video converter it hardcoded them which I didn't know was possible. I have tried muxing the subtitle's different ways and It hasn't worked.
phibertron
Bright Spark User
Posts: 211
Joined: Thu Oct 22, 2009 2:37 am

Re: Please Help!

Post by phibertron »

Ouch, most of the time things are ok, but every now and then...

so when you say cc, you saying you want the closed captioning
which to me is different than subtitles

I dont bother with srt's, I just burn them, as I'm the audience
FaiT
Posts: 47
Joined: Wed Mar 23, 2011 9:54 pm

Re: Please Help!

Post by FaiT »

I figured it out. I wanted to put CC in them cause I'm not always the only audience. When I have friends or family over I want to be able to switch them on or off as neccesary. In handbrake it was so simple there was no reason not to. But now that I'm not using handbrake for video I tried something else. What I did was generate 10x10 resolution handbrake movie (try it with your option string if you wanna see high fps!) then at first I added both the subtitles and chapters from handbrake to my movie. This caused errors in itunes most notably a horizontal white bar that ran the length of the top 1/5 of the movie. I thought it was the subs. Tried a bunch of other things then posted. Then I went back and added the video, audio and just the CC from handbrake and my DVD Decrypter chapter file and it worked. It still plays wierd in itunes (no white bar though) high motion scenes block horribly, But my ipod touch plays them perfectly and I'm about to try it on my PS3. I think it might be ref-frame related as the maximum allowed on my ipod is 13, itunes has been cool at 10 but maybe I just hadn't done enough testing to see it wierd out like that. Anywho a little more testing and I'll have the perfect .mp4 file. For me it turned out to be 880MB for an 1hour 44minute movie with two audio tracks, CC, chapters, and CQ=18 Video. Yay! I'm gonna edit my first post after I have this down in my head so that random forum wanderer's can find this info in an organized way.

Than you so much phibertron, I obviously could not have done this without you. At best, with days more of research I mighta come close but best case scenario it would have been imperfect and I probably just would have given up. Now it is perfect, there's Nothing better I could do to it. More importantly I learned alot, I'd never used a command line program before and now (thanks to you) I've learned a little about a couple of them. I guess I really can't express my gratitude that you would take time to help me, a complete stranger, so yeah. After I've done a couple movies I'm going to try to set up a mediaserver on a network wired into my PS3 thats also wireless to my laptop. I'll look at Twonky and PS3mediaserver to start.

Edit: Nevermind, I didn't realize Twonky was physical. I'll still look at it but I probably won't get one anytime soon.
phibertron
Bright Spark User
Posts: 211
Joined: Thu Oct 22, 2009 2:37 am

Re: Please Help!

Post by phibertron »

TwonkyMedia Server comes pre-installed on a bunch of nas devices
But it is also a seperate software package for mac,windows, and linux
phibertron
Bright Spark User
Posts: 211
Joined: Thu Oct 22, 2009 2:37 am

Re: Please Help!

Post by phibertron »

Your Welcome man

I learned a lot about a great many things from getting help in this and many other forums and elsewhere
Knowledge/Experience is meant to be shared, not horded, but opinions are a dime a dozen LOL
phibertron
Bright Spark User
Posts: 211
Joined: Thu Oct 22, 2009 2:37 am

Re: Please Help!

Post by phibertron »

This whole thread started because of nero aac sounding better then faac
As you work on nailing down your workflow, I have to ask this question

What is it you hear different between the two?

I went looking for some aac encode shootout comparison articles
most of what I found is a little old, not up to date

I also find it interesting, that the current version of neroaac
has not been updated in a while, Not sure about faac

But from my reading, in itunes for example
its built in aac encoder has gone through changes, some good some bad
wich is probably just as true for any other encoder audio or video
such is the nature of progress and regression, right

Another thing I was meaning to ask,
I assume your creating audio track 1 as aac and audio track 2 as ac3 (native or encoded)

If you are watching a movie, I would presume that you would want to 5.1 track
obviously the audio track is dependant on the playback device
so in one sense isnt the aac track more of a fallback

My point is, is all the extra stuff we went through to get to this point worth it?

I too used to go nutz, well kind still do, about every little fine detail
but yeah, we gotta have standards/levels that things must meet
For me handbrake, has taken a huge workload and made it so much easier

I guess in the end, its probably the same with crf, one person's 18 is another's 20
or one person's aac 128 is another's 160

But yeah, I'd love to know what you hear different between the two

and NO, let's not go bit or pixel counting! LOL
FaiT
Posts: 47
Joined: Wed Mar 23, 2011 9:54 pm

Re: Please Help!

Post by FaiT »

Good Question, the answer is not about quality at all but rather efficiency. I COULD use faac but a Dolby Surround (Pro Logic II) track is 192kbs. faac hasn't been in development for a long time so to be safe I would set the bitrate to 224kbs. I've gone forum digging and found comparisons that show nero and apple putting faac to shame from many years ago let alone now. I'm pretty quality nuts with audio/visual but I like to encode my files slightly better than I can tell because I may end up watching it with someone else and I'd rather they go "wow this looks/sounds good" rather than "you're a noob." For the movie I was doing X-Men, one audio stream would have been around 186MB with faac, even worse some movies have many useful streams. Lord of the Rings extended has 4 Commentaries (I prefer my files to be DVD replacements so I want to keep anything useful, like commentaries) Bearing in mind that one LotR movie is double the length of the movie I did, audio becomes a huge chunk of the movie. SO. Nero. Nero can use a much more efficient form of AAC called AAC-HE. It uses Spectral Band Replication to provide high music fidelity at bitrates around 64kbs. But movies aren't music. the visual element distracts the mind allowing even lower bitrates to squeak by. Add to this the addition of ABR encoding which two-passes the audio to provide near-maximum efficiency. In the end I chose 80kbs a comfortable bitrate I've chosen from experience in audio encoding. I chose it for two reasons: one, as I've said I like to overkill things a little to account for others that may see it and two, as I grow more experienced with audio/video my sensitivity to quality may rise and I want to make sure it still looks/sounds good. 80kbs puts the audio at about 1/3 the size it was thus providing comfortable file sizes.

I don't use AC-3. I used to but realized that I rarely used it. I'm mostly on my computer or I'm out with my Ipod I don't usually watch on my surround sound (and I live in an apartment and don't wanna [Censored] 'erm "distract" off the neighbors) So after factoring that in and doing audio comparisons I was gonna use Stereo but I looked up Pro-Logic II and tested it and at least from what I hear it sounds like the original 5.1. *Note I've read that the .1 or subwoofer channel is disabled in most third-party implementations of Pro-Logic II including handbrake. I did my movie audio through megui with Nero this time and all I can say is that when Magneto lifts up those cop cars you can FEEL IT. So part of this exercise was to increase the theater experience (Better Pro-Logic II implementation) but more so it was to create a small file that works on all my devices (computer, Ipod, PS3) that has audio/video quality equal to a DVD and any relevant features I can pack in (like director's commentary). The Mac version of Handbrake uses Coreaudio and its on par with Nero - If it supports AAC-HE and I had a Mac I would use it in a heartbeat. Unfortunately I have a couple PC's and a Linux'top so I guess I'll be using megui. :)

P.S. Speaking of quality nuts... I said I use CRF=18... Welllllll did some comparisons with the PS3's DVD upscaling and when my face was two feet from the 42" screen I could DEFINITELY tell a difference :shock: so I'm gonna try CRF=17 and its already so close that I'll be happy with that EVEN if I can tell the difference at 5 inches away.
Last edited by FaiT on Mon Mar 28, 2011 1:23 am, edited 1 time in total.
Deleted User 13735

Re: Please Help!

Post by Deleted User 13735 »

Those links are identical, I would be interested in the 1st and 3rd topics if you would be willing to repost the links :D Thanks!
Wow, I must have been asleep at the switch.
Here they are again, also corrected in the original post:

If you're interested in our research, my Handbrake thread is here:
http://www.sonycreativesoftware.com/for ... eID=745821
Nick's parallel MeGui thread is here:
http://www.sonycreativesoftware.com/for ... eID=755224
And Jerry's draft page with links to all articles and tests, including my Handbrake settings is here:
http://www.jazzythedog.com/testing/dnxhd/HD-Guide.aspx
(My Handbrake to the Web tutorial will be on Youtube within a week).
Last edited by Deleted User 13735 on Sun Mar 27, 2011 5:30 pm, edited 1 time in total.
FaiT
Posts: 47
Joined: Wed Mar 23, 2011 9:54 pm

Re: Please Help!

Post by FaiT »

Thanks a bunch! I'm gonna do some readin...

EDIT: Correct me if I'm wrong... but aren't the first and second still identical in every way?

EDIT2: I see what you did there... :D
Last edited by FaiT on Sun Mar 27, 2011 5:34 pm, edited 4 times in total.
Post Reply