Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
15th June 2006, 01:14 | #21 | Link |
Two bit encoder
Join Date: May 2005
Location: England, UK
Posts: 157
|
Hmm, what would be ideal then as suggested by a friend of mine (Coderjoe), would be direct nhml output from DeDup.
Or maybe a high accuracy (neutral) timecode format that isn't specific to MKV or MP4 but can be converted to either format without any inaccuracies. |
15th June 2006, 11:16 | #22 | Link | ||
Registered User
Join Date: Nov 2001
Posts: 9,770
|
Quote:
so dedup on its own cant really create this i think Quote:
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau) I know, that I know nothing (Socrates) MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide) Ogg Theora | Ogg Vorbis use WM9 today and get Micro$oft controlling the A/V market tomorrow for free |
||
15th June 2006, 12:04 | #23 | Link | |
Teetrinker
Join Date: Jan 2002
Posts: 258
|
Quote:
*.media elementary stream without header of the raw stream?
__________________
Play GO ( http://en.wikipedia.org/wiki/Go_(board_game)) |
|
21st July 2006, 22:26 | #24 | Link |
Two bit encoder
Join Date: May 2005
Location: England, UK
Posts: 157
|
Is there any reason why this might fail with ASP?
I have been getting a division by zero error. This is the first time I've tried with ASP (I've tried with one encode of the source and got the error, deleted all my files and started again). I have muxed a few files containing H.264 and they are fine, but it seems it doesn't like ASP, unless anyone else does not got an error, then it's a problem on my part somewhere. Here's the relevant info. Batch for encoding/VFR/muxing Code:
xvid_encraw.exe -i Video1.avs -type 2 -w 720 -h 576 -o "pass1.m4v" -max_bframes 2 -bquant_ratio 150 -bquant_offset 100 -bitrate 631 -pass1 "xvidstats.log" -full1pass -max_key_interval 480 -quality 6 -vhqmode 4 -bvhq -qtype 0 -nopacked -imin 2 -imax 31 -bmin 2 -bmax 31 -pmin 2 -pmax 31 -progress 25 xvid_encraw.exe -i Video1.avs -type 2 -w 720 -h 576 -o "pass2.m4v" -max_bframes 2 -bquant_ratio 150 -bquant_offset 100 -bitrate 631 -pass2 "xvidstats.log" -max_key_interval 480 -kboost 10 -kthresh 1 -kreduction 20 -ostrength 0 -oimprove 5 -odegrade 5 -chigh 0 -clow 0 -quality 6 -vhqmode 4 -bvhq -qtype 0 -nopacked -imin 2 -imax 31 -bmin 2 -bmax 31 -pmin 2 -pmax 31 -progress 25 mp4box.exe -add pass2.m4v:par=64:45 in.mp4 tc2mp4.exe -i in.mp4 -t times.txt -o out.mp4 mp4box.exe -add hackaud.mp3:lang=jpn:name="MPEG-1 Layer 3 2.0 (Stereo)" -chap Chapter.chp -name 1="MPEG-4 Advanced Simple Profile @ Level 5 - 16/9" -lang 1=jpn out.mp4 pause Code:
C:\Documents and Settings\Michael\Desktop\enc>xvid_encraw.exe -i Video1.avs -typ e 2 -w 720 -h 576 -o "pass1.m4v" -max_bframes 2 -bquant_ratio 150 -bquant_offset 100 -bitrate 631 -pass1 "xvidstats.log" -full1pass -max_key_interval 480 -quali ty 6 -vhqmode 4 -bvhq -qtype 0 -nopacked -imin 2 -imax 31 -bmin 2 -bmax 31 -pmin 2 -pmax 31 -progress 25 xvid_encraw - raw mpeg4 bitstream encoder written by Christoph Lampert 2002-2003 Input colorspace is YV12 xvidcore build version: xvid-1.2.0-dev Bitstream version: 1.2.-127 Detected CPU flags: ASM MMX MMXEXT SSE SSE2 3DNOW 3DNOWEXT TSC Detected 1 cpus, using 1 threads. 21876 frames( 99%) encoded, 13.96 fps, Average Bitrate = 1323kbps Tot: enctime(ms) =1567377.00, length(bytes) = 151071363 Avg: enctime(ms) = 71.62, fps = 13.96, length(bytes) = 6902 I frames: 322 frames, size = 36095/11622701, quants = 2 / 2.00 / 2 P frames: 8083 frames, size = 13573/109712744, quants = 2 / 2.00 / 2 B frames: 13479 frames, size = 2206/29735918, quants = 4 / 4.00 / 4 C:\Documents and Settings\Michael\Desktop\enc>xvid_encraw.exe -i Video1.avs -typ e 2 -w 720 -h 576 -o "pass2.m4v" -max_bframes 2 -bquant_ratio 150 -bquant_offset 100 -bitrate 631 -pass2 "xvidstats.log" -max_key_interval 480 -kboost 10 -kthre sh 1 -kreduction 20 -ostrength 0 -oimprove 5 -odegrade 5 -chigh 0 -clow 0 -quali ty 6 -vhqmode 4 -bvhq -qtype 0 -nopacked -imin 2 -imax 31 -bmin 2 -bmax 31 -pmin 2 -pmax 31 -progress 25 xvid_encraw - raw mpeg4 bitstream encoder written by Christoph Lampert 2002-2003 Input colorspace is YV12 xvidcore build version: xvid-1.2.0-dev Bitstream version: 1.2.-127 Detected CPU flags: ASM MMX MMXEXT SSE SSE2 3DNOW 3DNOWEXT TSC Detected 1 cpus, using 1 threads. 21876 frames( 99%) encoded, 15.95 fps, Average Bitrate = 665kbps Tot: enctime(ms) =1372638.00, length(bytes) = 75895490 Avg: enctime(ms) = 62.72, fps = 15.94, length(bytes) = 3467 I frames: 322 frames, size = 24370/7847320, quants = 2 / 3.39 / 4 P frames: 8083 frames, size = 6458/52202983, quants = 3 / 4.23 / 5 B frames: 13479 frames, size = 1175/15845187, quants = 5 / 7.13 / 9 C:\Documents and Settings\Michael\Desktop\enc>mp4box.exe -add pass2.m4v:par=64:4 5 in.mp4 MPEG-4 Video import - 720 x 576 @ 25.0000 FPS Indicated Profile: Advanced Simple Profile @ Level 5 Has B-Frames (2 max consecutive B-VOPs) Import results: 21884 VOPs (322 Is - 8083 Ps - 13479 Bs) Converting to ISMA Audio-Video MP4 file... Saving to in.mp4: 0.500 secs Interleaving C:\Documents and Settings\Michael\Desktop\enc>tc2mp4.exe -i in.mp4 -t times.txt -o out.mp4 mp4box -nhml 1 in.mp4 [Timecode info] Timecode format(v2) Total frames(21884), Timescale(1000000) [NHML info] Timebase(0) Illegal division by zero at script/tc2mp4.pl line 94, <SRC_NHML> line 3. C:\Documents and Settings\Michael\Desktop\enc>mp4box.exe -add hackaud.mp3:lang=j pn:name="MPEG-1 Layer 3 2.0 (Stereo)" -chap Chapter.chp -name 1="MPEG-4 Advanced Simple Profile @ Level 5 - 16/9" -lang 1=jpn out.mp4 MP3 import - sample rate 48000 - MPEG-1 audio - 2 channels Saving to out.mp4: 0.500 secs Interleaving Last edited by Zero1; 22nd July 2006 at 14:52. |
24th July 2006, 20:51 | #25 | Link |
Registered User
Join Date: Nov 2001
Posts: 9,770
|
a description for the nhnt and nhml format:
http://gpac.sourceforge.net/doc_nhnt.php
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau) I know, that I know nothing (Socrates) MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide) Ogg Theora | Ogg Vorbis use WM9 today and get Micro$oft controlling the A/V market tomorrow for free |
3rd August 2006, 07:12 | #26 | Link |
Registered User
Join Date: Mar 2006
Location: Shanghai, China
Posts: 203
|
A tool that quite useful
I search for this for a long time but finally I find none. Great work. Edit: It can't work here. By the way, I think it's easier to converting timecodes v2 to v1 than converting timecodes v1 to v2 XD The total frame number seems to be not offered in timecodes v1. Last edited by leiming2006; 4th August 2006 at 06:13. |
13th November 2006, 00:20 | #29 | Link | |
Registered User
Join Date: Sep 2004
Location: Italy
Posts: 154
|
Quote:
In any case you can make the script work by modifying the lines 15,16 and 18. Replace "1" with your video track ID. |
|
26th November 2006, 15:56 | #31 | Link | |
Moderator
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
|
Quote:
Code:
$srcNHML = "${basename}_track201.nhml"; $tcNHML = "${basename}_track201_tc.nhml"; doCmd("mp4box -nhml 201 $srcMP4"); Code:
Track # 1 Info - TrackID 201 - TimeScale 24000 - Duration 00:01:38.348 Media Info: Language "Undetermined" - Type "vide" - Sub Type "mp4v" - 2358 samples MPEG-4 Config: Visual Stream - ObjectTypeIndication 0x20 MPEG-4 Visual Size 848 x 352 - Advanced Simple Profile @ Level 5 Pixel Aspect Ratio 1:1 - Indicated track size 848 x 352 Synchronized on stream 1 |
|
13th December 2006, 01:56 | #33 | Link |
Registered User
Join Date: Sep 2004
Location: Italy
Posts: 154
|
Sorry, don't know... try to double check your inputs and outputs. Anyway the only time I tried this script on a full length movie, it started to slow down after 40% of the process, and then slowed down to halt at around 50%. I had to force quit the process. I think it's a bug or a memory leak...
|
16th December 2006, 20:57 | #34 | Link | |
Moderator
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
|
Ok. I hope you find out the problem one day.
Quote:
|
|
16th January 2007, 22:21 | #35 | Link |
masktools2 (ab)user
Join Date: Oct 2006
Location: PAL-I :(
Posts: 235
|
I keep getting an error:
Code:
C:\Program Files\video creation\video tools\tc2mp4>tc2mp4 -i "y:\02_30fps.mp4" - t "y:\2.txt" -o "y:\02_vfr_correct.mp4" mp4box -nhml 1 "y:\02_30fps.mp4" [Timecode info] Timecode format(v1) Total frames(8650), LCM Timescale(120000) NTSC, Factors(120000/24000/30000) y:\02_30fps_track1.nhml[NHML info] Timebase(0) Illegal division by zero at script/tc2mp4.pl line 96, <SRC_NHML> line 3. Last edited by martino; 17th January 2007 at 22:58. Reason: updated |
12th March 2007, 17:55 | #37 | Link |
Registered User
Join Date: May 2006
Location: Yokohama, Japan
Posts: 6
|
Sorry for the long absence.
I posted an updated script to http://forum.doom9.org/showthread.php?t=112199 thank you. |
6th November 2009, 14:53 | #38 | Link |
Registered User
Join Date: Feb 2002
Posts: 303
|
Not sure if there is much interest in this anymore, but I've recently wanted to create a VFR MP4 with MKV V2 timecodes. I tried your script zmi, but as people here have noted, it seem inaccurate. So I created my own version which seems to be accurate. The outputed timecodes once I converted to VFR MP4 back to MKV were practically the same (minor rounding errors). I don't think it's ready to be posted yet as it isn't very modular code yet and I write crappy code , but I was wondering if anyone has samples they could provide for me so that I can test to see if I got it down correct.
I need both video and audio nhml since VRF in the video will introduce a big CTS offset that also needs to be applied to the audio in order to be synced. I also need to know the original CFR. Also, thanks a lot, zmi, for your script as that is what my version was based off of. Last edited by Aktan; 6th November 2009 at 16:13. |
15th August 2010, 02:45 | #40 | Link |
Registered User
Join Date: Feb 2002
Posts: 303
|
[shameless advertise]
you can try out my version of his script here: http://forum.doom9.org/showthread.php?t=150890 [/shameless advertise] |
|
|