[RESOLVED] Can I have an mp4v2 option back?

Archive of historical feature requests.
Please use the GitHub link above to report issues.
Forum rules
*******************************
Please be aware we are now using GitHub for issue tracking and feature requests.
- This section of the forum is now closed to new topics.

*******************************
Deleted User 13735

[RESOLVED] Can I have an mp4v2 option back?

Post by Deleted User 13735 »

I was using 5675 WinGUI for quite a while, but always had to use the "old" mp4 option because av_mp4 is incompatible with my NLE suite. Files won't open unless Baseline, preview thumbnails and luminance levels all messed up on the timeline, etc.

Now that I'm using 6094, I no longer have that option. The files play fine of course, they just won't open for editing. I would do anything to have the "old" mp4 option available in some way, since my workflow is changing over with the new DNxHD support in libav 10. Maybe just an option string or something?

Thanks for considering :wink:
Last edited by Deleted User 13735 on Mon Mar 17, 2014 4:34 pm, edited 1 time in total.
User avatar
JohnAStebbins
HandBrake Team
Posts: 5712
Joined: Sat Feb 09, 2008 7:21 pm

Re: Can I have an mp4v2 option back?

Post by JohnAStebbins »

mp4v2 isn't coming back. What we need to do is figure out what your NLE suite doesn't like about the libav muxer and fix it. Do you have any ideas about what could be causing the problem? Does the NLE suite have any debug output or a debug mode that could tell us anything?
Deleted User 13735

Re: Can I have an mp4v2 option back?

Post by Deleted User 13735 »

It's a 2010 software using qt32lib to decode mp4.
A new 64 bit computer and software upgrade would no doubt fix it.
I'm retired, so 'nuff said about that.
:?
User avatar
s55
HandBrake Team
Posts: 10350
Joined: Sun Dec 24, 2006 1:05 pm

Re: Can I have an mp4v2 option back?

Post by s55 »

Given mp4v2 licensing issues, it's not something we can really bring back. It's bad enough it took us so long to fix.

Hopefully fixing libav is easier
User avatar
JohnAStebbins
HandBrake Team
Posts: 5712
Joined: Sat Feb 09, 2008 7:21 pm

Re: Can I have an mp4v2 option back?

Post by JohnAStebbins »

Is there any information you can give us? The NLE suite produces no warning messages, has not log files?
Deleted User 13735

Re: Can I have an mp4v2 option back?

Post by Deleted User 13735 »

It's Vegas Pro 8. Not generating any debug output, because it thinks its fine for Baseline (its buggered), simply doesn't open the video stream for Main/High.
It's using the Quicktime 7.6.x libraries for mp4 decoding, which are the last compatible with Vegas 8. They don't generate any log output.
Sony wrote its own mp4 decoders in 2012, and I assume (?) its all better since then. My Vegas 12 buddies have reported no comparable issues.

So, I'll dig deeper, but I think the answer is to keep svn5675 on my system, for the times I need to open Handbrake files in Vegas. Having the same types of issues with mp4 options in AVIDemux, by they have left the old option for legacy.

Thanks for informative response; I had a feeling we were at a point of diverging workflows.
;?)
Last edited by Deleted User 13735 on Mon Mar 10, 2014 3:35 pm, edited 1 time in total.
Deleted User 11865

Re: Can I have an mp4v2 option back?

Post by Deleted User 11865 »

How about QuickTime on your system, does it have any issue(s) with the files?
Deleted User 13735

Re: Can I have an mp4v2 option back?

Post by Deleted User 13735 »

Quicktime 7.6, Handbrake svn6094, Vista 32

Normal (Main) opens and plays in QT (surprise). Levels (gamma?) are washed out compared to VLC.
High does not open. Error -2041: an invalid sample description was found
Deleted User 11865

Re: Can I have an mp4v2 option back?

Post by Deleted User 11865 »

musicvid wrote:Quicktime 7.6, Handbrake svn6094, Vista 32

Normal (Main) opens and plays in QT (surprise). Levels (gamma?) are washed out compared to VLC.
High does not open. Error -2041: an invalid sample description was found
OK, that's an issue. Can you please provide an encode log for that?
User avatar
JohnAStebbins
HandBrake Team
Posts: 5712
Joined: Sat Feb 09, 2008 7:21 pm

Re: Can I have an mp4v2 option back?

Post by JohnAStebbins »

/me wonders if it has anything to do with...

Code: Select all

(05:40:19 PM) Paranoialmaniac: 12:46:30>  (nevcairiel) all avcC needs is profile and level, those are readily available without deep parsing <--- in addition, chroma_format_idc, bit depth for some profiles. because of this, the current avcC generation codes is out of spec :P
Deleted User 11865

Re: Can I have an mp4v2 option back?

Post by Deleted User 11865 »

JohnAStebbins wrote:/me wonders if it has anything to do with...

Code: Select all

(05:40:19 PM) Paranoialmaniac: 12:46:30>  (nevcairiel) all avcC needs is profile and level, those are readily available without deep parsing <--- in addition, chroma_format_idc, bit depth for some profiles. because of this, the current avcC generation codes is out of spec :P
Old software expecting fields only found in a not-yet-final specification (ISO/IEC 14496-15, Third Edition)? Unlikely. Though maybe it's in the second edition, but that still wouldn't explain it as the provide the exact same avcC to libavformat that we provided to mp4v2.
Deleted User 13735

Re: Can I have an mp4v2 option back?

Post by Deleted User 13735 »

Here is for the one that caused the error in QT:

Code: Select all

HandBrake svn6094 (Nightly Build) - 32bit Version
OS: Microsoft Windows NT 6.0.6002 Service Pack 2
Ram: 2037 MB, Screen: 1280x800
Temp Dir: C:\Users\Mark\AppData\Local\Temp\
Install Dir: C:\Program Files\Handbrake6094
Data Dir: C:\Users\Mark\AppData\Roaming\HandBrake\HandBrake\0.0.0.6094

-------------------------------------------

CLI Query:  -i "C:\Users\Mark\Desktop\shirley444.mov" -t 1 --angle 1 -c 1 -o "C:\Users\Mark\Desktop\Shirley444-h.mp4"  -f mp4  --decomb -w 1846 --crop 0:0:0:74 --loose-anamorphic  --modulus 2 -e x264 -q 20 --vfr -a 1,1 -E av_aac,copy:ac3 -6 dpl2,none -R Auto,Auto -B 160,0 -D 0,0 --gain 0,0 --audio-fallback ac3 --markers="C:\Users\Mark\AppData\Local\Temp\Shirley444-h-1-chapters.csv" --h264-level="4.1"  --h264-profile=high  --verbose=1

[09:47:18] hb_init: starting libhb thread
HandBrake svn6095 (2014030301) - MinGW i686 - http://handbrake.fr
2 CPUs detected
Opening C:\Users\Mark\Desktop\shirley444.mov...
[09:47:18] CPU: Intel(R) Pentium(R) Dual  CPU  T2390  @ 1.86GHz
[09:47:18]  - logical processor count: 2
[09:47:18] OpenCL: library not available
[09:47:18] Intel Quick Sync Video support: yes
[09:47:18]  - Intel Media SDK software: API 1.4 (minimum: 1.3)
[09:47:18]  - H.264 encoder: yes
[09:47:18]     - preferred implementation: software
[09:47:18]  - H.265 encoder: no
[09:47:18] hb_scan: path=C:\Users\Mark\Desktop\shirley444.mov, title_index=1
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening C:\Users\Mark\Desktop\shirley444.mov/BDMV/index.bdmv
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening C:\Users\Mark\Desktop\shirley444.mov/BDMV/BACKUP/index.bdmv
libbluray/bluray.c:2182: nav_get_title_list(C:\Users\Mark\Desktop\shirley444.mov) failed
[09:47:18] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 5.0.0
libdvdread: Encrypted DVD support unavailable.
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[09:47:18] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\Mark\Desktop\shirley444.mov':
  Metadata:
    major_brand     : qt  
    minor_version   : 537199360
    compatible_brands: qt  
    creation_time   : 2014-03-10 01:41:55
  Duration: 00:00:05.00, start: 0.000000, bitrate: 441501 kb/s
    Stream #0.0(eng): Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s (default)
    Metadata:
      creation_time   : 2014-03-10 01:41:55
    Stream #0.1(eng): Video: dnxhd, yuv444p10le, 1920x1080, 439961 kb/s, 30k tbn (default)
    Metadata:
      creation_time   : 2014-03-10 01:41:55
[09:47:18] dxva2:IDirect3D9_CreateDevice failed
[09:47:18] dxva2:Failed to create Direct3D device
[09:47:18] scan: decoding previews for title 1
[09:47:18] scan: audio 0x0: pcm_s16le, rate=48000Hz, bitrate=1536000 English (pcm_s16le) (2.0 ch)
Scanning title 1 of 1, preview 1, 10.00 %
Scanning title 1 of 1, preview 2, 20.00 %
Scanning title 1 of 1, preview 3, 30.00 %
Scanning title 1 of 1, preview 4, 40.00 %
Scanning title 1 of 1, preview 5, 50.00 %
Scanning title 1 of 1, preview 6, 60.00 %
Scanning title 1 of 1, preview 7, 70.00 %
Scanning title 1 of 1, preview 8, 80.00 %
Scanning title 1 of 1, preview 9, 90.00 %
Scanning title 1 of 1, preview 9, 90.00 %
Scanning title 1 of 1, preview 9, 90.00 %
Scanning title 1 of 1, preview 10, 100.00 %[09:47:21] scan: 10 previews, 1920x1080, 29.970 fps, autocrop = 0/0/0/74, aspect 16:9, PAR 1:1
[09:47:21] libhb: scan thread found 1 valid title(s)
+ title 1:
  + stream: C:\Users\Mark\Desktop\shirley444.mov
  + duration: 00:00:05
  + size: 1920x1080, pixel aspect: 1/1, display aspect: 1.78, 29.970 fps
  + autocrop: 0/0/0/74
  + support opencl: no
  + support hwd: no
  + chapters:
    + 1: cells 0->0, 0 blocks, duration 00:00:05
  + audio tracks:
    + 1, English (pcm_s16le) (2.0 ch) (iso639-2: eng)
  + subtitle tracks:
Reading chapter markers from file C:\Users\Mark\AppData\Local\Temp\Shirley444-h-1-chapters.csv
AC3 Passthru requested and input codec is not compatible for track 2, using AC3 encoder
[09:47:21] 1 job(s) to process
[09:47:21] starting job
[09:47:21] yadif thread started for segment 0
[09:47:21] decomb filter thread started for segment 0
[09:47:21] work: sanitizing track 1 mixdown Dolby Pro Logic II to Stereo
[09:47:21] sync: expecting 150 video frames
[09:47:21] work: only 1 chapter, disabling chapter markers
[09:47:21] job configuration:
[09:47:21]  * source
[09:47:21]    + C:\Users\Mark\Desktop\shirley444.mov
[09:47:21]    + title 1, chapter(s) 1 to 1
[09:47:21]    + container: mov,mp4,m4a,3gp,3g2,mj2
[09:47:21]    + data rate: 441501 kbps
[09:47:21]  * destination
[09:47:21]    + C:\Users\Mark\Desktop\Shirley444-h.mp4
[09:47:21]    + container: MPEG-4 (libavformat)
[09:47:21]  * video track
[09:47:21]    + decoder: dnxhd
[09:47:21]      + bitrate 439961 kbps
[09:47:21]    + filters
[09:47:21]      + Decomb (default settings)
[09:47:21]      + Framerate Shaper (0:27000000:900900)
[09:47:21]        + frame rate: same as source (around 29.970 fps)
[09:47:21]      + Crop and Scale (1846:1080:0:0:0:74)
[09:47:21]        + source: 1920 * 1080, crop (0/0/0/74): 1846 * 1080, scale: 1846 * 1080
[09:47:21]    + loose anamorphic
[09:47:21]      + storage dimensions: 1846 * 1080, mod 2
[09:47:21]      + pixel aspect ratio: 1 / 1
[09:47:21]      + display dimensions: 1846 * 1080
[09:47:21]    + encoder: H.264 (libx264)
[09:47:21] decomb check thread started for segment 0
[09:47:21] mask filter thread started for segment 0
[09:47:21] mask erode thread started for segment 0
[09:47:21] mask dilate thread started for segment 0
[09:47:21]      + H.264 profile: high
[09:47:21]      + H.264 level: 4.1
[09:47:21] yadif thread started for segment 1
[09:47:21]      + quality: 20.00 (RF)
[09:47:21]  * audio track 1
[09:47:21] decomb filter thread started for segment 1
[09:47:21]    + decoder: English (pcm_s16le) (2.0 ch) (track 1, id 0x0)
[09:47:21]      + bitrate: 1536 kbps, samplerate: 48000 Hz
[09:47:21] decomb check thread started for segment 1
[09:47:21]    + mixdown: Stereo
[09:47:21] mask filter thread started for segment 1
[09:47:21]    + encoder: AAC (libavcodec)
[09:47:21]      + bitrate: 160 kbps, samplerate: 48000 Hz
[09:47:21] mask erode thread started for segment 1
[09:47:21]  * audio track 2
[09:47:21]    + decoder: English (pcm_s16le) (2.0 ch) (track 1, id 0x0)
[09:47:21] mask dilate thread started for segment 1
[09:47:21]      + bitrate: 1536 kbps, samplerate: 48000 Hz
[09:47:21]    + mixdown: Stereo
[09:47:21]    + encoder: AC3 (libavcodec)
[09:47:21]      + bitrate: 224 kbps, samplerate: 48000 Hz
[09:47:21] reader: first SCR 0 id 0x0 DTS 0
[09:47:21] encx264: min-keyint: 30, keyint: 300
[09:47:21] encx264: encoding at constant RF 20.000000
[09:47:21] encx264: unparsed options: level=4.1:vbv-bufsize=78125:vbv-maxrate=62500
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64 SlowShuffle
x264 [info]: profile High, level 4.1
[09:47:53] reader: done. 1 scr changes
[09:48:06] work: average encoding speed for job is 3.875754 fps
[09:48:06] sync: got 150 frames, 150 expected
[09:48:06] decomb: deinterlaced 0 | blended 0 | unfiltered 149 | total 149
[09:48:06] render: lost time: 0 (0 frames)
[09:48:06] render: gained time: 0 (0 frames) (0 not accounted for)
[09:48:06] dnxhd-decoder done: 150 frames, 0 decoder errors, 0 drops
x264 [info]: frame I:1     Avg QP:14.73  size:321577
x264 [info]: frame P:37    Avg QP:13.81  size:   485
x264 [info]: frame B:111   Avg QP:19.35  size:   120
x264 [info]: consecutive B-frames:  0.7%  0.0%  0.0% 99.3%
x264 [info]: mb I  I16..4: 14.3% 79.9%  5.8%
x264 [info]: mb P  I16..4:  0.1%  0.0%  0.0%  P16..4:  2.0%  0.0%  0.0%  0.0%  0.0%    skip:97.8%
x264 [info]: mb B  I16..4:  0.1%  0.0%  0.0%  B16..8:  0.5%  0.0%  0.0%  direct: 0.0%  skip:99.3%  L0:37.4% L1:62.6% BI: 0.0%
x264 [info]: 8x8 transform intra:69.3% inter:99.0%
x264 [info]: coded y,uvDC,uvAC intra: 72.1% 72.3% 71.6% inter: 0.1% 0.2% 0.0%
x264 [info]: i16 v,h,dc,p:  1% 97%  0%  1%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 32%  8% 20%  4%  5% 10%  3% 13%  5%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 43% 12%  7%  5%  5% 11%  3% 10%  5%
x264 [info]: i8c dc,h,v,p: 62%  8% 22%  9%
x264 [info]: Weighted P-Frames: Y:0.0% UV:0.0%
x264 [info]: ref P L0: 93.6%  0.1%  3.6%  2.7%
x264 [info]: ref B L0: 74.1% 25.4%  0.4%
x264 [info]: ref B L1: 89.0% 11.0%
x264 [info]: kb/s:567.78
[09:48:06] pcm_s16le-decoder done: 0 frames, 0 decoder errors, 0 drops
[09:48:06] pcm_s16le-decoder done: 0 frames, 0 decoder errors, 0 drops
[09:48:06] mux: track 0, 149 frames, 352807 bytes, 567.71 kbps, fifo 256
[09:48:06] mux: track 1, 233 frames, 1412 bytes, 2.27 kbps, fifo 256
[09:48:06] mux: track 2, 156 frames, 139776 bytes, 224.92 kbps, fifo 256
[09:48:07] libhb: work result = 0
Encode done!
HandBrake has exited.
Deleted User 11865

Re: Can I have an mp4v2 option back?

Post by Deleted User 11865 »

Oh, probably will work if you rename to .m4v…
Deleted User 13735

Re: Can I have an mp4v2 option back?

Post by Deleted User 13735 »

OK, it opens as .m4v
Odd that Main opens as .mp4
I'll keep digging at the Vegas 8 issue, and thanks to both of you for your interest.
User avatar
JohnAStebbins
HandBrake Team
Posts: 5712
Joined: Sat Feb 09, 2008 7:21 pm

Re: Can I have an mp4v2 option back?

Post by JohnAStebbins »

Doing a little code browsing, I see a couple things that mp4v2 writes that libavformat does not. There are probably more and I'll spend more time trying to track them down. But what I've found so far is libavformat is missing the sdtp atom which makes scrubbing work better according to mp4v2 comments. This atom contains sample dependency hints. It is also missing the colr atom in avcC which mp4v2 writes (see MP4AddColr in muxmp4.c).
Deleted User 13735

Re: Can I have an mp4v2 option back?

Post by Deleted User 13735 »

With mp4v2, about the only Main profile feature that didn't work in Vegas was weight-p.
I'll spend some time turning options on and off this weekend to see if that narrows it down.
User avatar
JohnAStebbins
HandBrake Team
Posts: 5712
Joined: Sat Feb 09, 2008 7:21 pm

Re: Can I have an mp4v2 option back?

Post by JohnAStebbins »

We're working on a theory. The thought is that the missing sdtp atom could cause a failure because according to spec, it is required when the "brand" "avc1" is set in the mp4 file (which avformat does). So the first (easiest) experiment to try is to disable the "avc1" brand. Could you test this HandBrakeCLI to see if it makes any difference? Either way, the next step will be to add the sdtp atom and see what that does. But that significantly more work.

http://www.stebbins.biz/binaries/HandBrakeCLI.exe
Deleted User 13735

Re: Can I have an mp4v2 option back?

Post by Deleted User 13735 »

Glad to do that. May be a day or two.
User avatar
JohnAStebbins
HandBrake Team
Posts: 5712
Joined: Sat Feb 09, 2008 7:21 pm

Re: Can I have an mp4v2 option back?

Post by JohnAStebbins »

Ok. While I'm waiting, I'll cook up a simplified sdtp. I should be able to create a functional one with just the key-frame flags in AVPackets. That should suffice to prove the point.
Deleted User 13735

Re: Can I have an mp4v2 option back?

Post by Deleted User 13735 »

Sorry to be an old fuddy-duddy.
My Windows is Vista 32, and the CLI gives an error.

[EDIT] Actually, I can probably install it on a work laptop, and bring the file to my editing machine. Stay tuned.
User avatar
JohnAStebbins
HandBrake Team
Posts: 5712
Joined: Sat Feb 09, 2008 7:21 pm

Re: Can I have an mp4v2 option back?

Post by JohnAStebbins »

If you require a 32 bit version, just ping me and I'll cook one up for you.
User avatar
JohnAStebbins
HandBrake Team
Posts: 5712
Joined: Sat Feb 09, 2008 7:21 pm

Re: Can I have an mp4v2 option back?

Post by JohnAStebbins »

Also, I have another test for you. Here is a version that implements the missing sdtb in the avformat muxer. It hasn't even been tested on osx and qt yet, so it may simply explode in your face. But if you could give it a test, I would appreciate it.

http://www.stebbins.biz/binaries/HandBrakeCLI-sdtb.exe
Deleted User 13735

Re: Can I have an mp4v2 option back?

Post by Deleted User 13735 »

OK, here is what I can determine so far.
The first CLI behaves no differently than the nightly GUI.
-- Baseline opens, but with expanded preview levels. Thumbnails take forever to load.
-- Main does not open.

Back to the GUI. With the old mp4 wrapper, my Vegas would support Main profile from HB, but not weight-p. So I was simply turning it off in the encodes.
-- With the new av_mp4, I have to disable b-frames completely in order to get the video stream to load.

To explain my preview levels issue, Vegas' preview / timeline is not wysiwyg at player levels. It maps 709->709, and RGB->RGB (unlike Premiere). So a proper Handbrake file should look flat (16-235) in the Vegas timeline (as is the case with mp4v2, ffmpeg, Mainconcept, mpeg-2, others), but av_mp4 is mapping 16-235 to full 0-255 RGB.

However, since the files play correctly in VLC et al (levels are not blown), I won't be surprised if this quirky flag can't be fixed. "If" I needed to encode a Handbrake source in Vegas, I "could" remap back to 709 luminance levels, but that would sacrifice even more bit depth. I am experimenting with importing near-lossless intermediates back from Handbrake (to take advantage of Lanczos and Decomb), so I can think of advantages to having it the old way wrt levels.

So I'll check the "sdtb" CLI before bedtime, but if you don't hear back from me tonight, it means no change from the previous. After reading another thread today, I now appreciate the unwanted baggage that mp4v2 carried with it, so I am thankful for you looking into this, whatever the outcome.
;?)
Deleted User 13735

Re: Can I have an mp4v2 option back?

Post by Deleted User 13735 »

Results with the "sdtb" CLI are the same as before.
Deleted User 11865

Re: Can I have an mp4v2 option back?

Post by Deleted User 11865 »

Since you say disabling B-frames makes it work, I would suspect a difference in how the muxers handle composition time stamps.

As for your preview issues, I bet that can be fixed by adding a Colr atom.
Post Reply