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. |
6th January 2019, 16:45 | #1 | Link | |
Registered User
Join Date: Nov 2018
Posts: 34
|
VC-1 to BluRay compatible AVC
Hello everybody,
I have a large BluRay collection and I want to digitalize it and put the movies into a mp4-container. With AVC and HEVC videostreams I'm fine, unfortunately some streams are in VC-1 format and don't fit into the container. I want the best quality and also a BluRay compatible output. I read the sticky and this and created my command: Code:
x264-r2935-545de2f.exe --bitrate 16998 --preset veryslow --tune film --bluray-compat --vbv-maxrate 40000 --vbv-bufsize 30000 --level 4.1 --keyint 24 --open-gop --slices 4 --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --sar 1:1 --pass 1 -o out.mkv OLD_BOY.Title0.mkv Code:
x264-r2935-545de2f.exe --bitrate 16998 --preset veryslow --tune film --bluray-compat --vbv-maxrate 40000 --vbv-bufsize 30000 --level 4.1 --keyint 24 --open-gop --slices 4 --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --sar 1:1 --pass 2 -o out2.mkv OLD_BOY.Title0.mkv Quote:
Or is there a workaround? I get the bitrate for --bitrate from this: Code:
ffprobe.exe OLD_BOY.Title0.mkv ffprobe version 4.1 Copyright (c) 2007-2018 the FFmpeg developers built with gcc 8.2.1 (GCC) 20181017 configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth libavutil 56. 22.100 / 56. 22.100 libavcodec 58. 35.100 / 58. 35.100 libavformat 58. 20.100 / 58. 20.100 libavdevice 58. 5.100 / 58. 5.100 libavfilter 7. 40.101 / 7. 40.101 libswscale 5. 3.100 / 5. 3.100 libswresample 3. 3.100 / 3. 3.100 libpostproc 55. 3.100 / 55. 3.100 Input #0, matroska,webm, from 'OLD_BOY.Title0.mkv': Metadata: title : OLD_BOY.Title0 encoder : libebml v1.3.4 + libmatroska v1.4.5 creation_time : 2019-01-04T14:04:03.000000Z Duration: 01:59:52.51, start: 0.000000, bitrate: 20980 kb/s Chapter #0:0: start 0.000000, end 359.067000 Metadata: title : (01)00:00:00:000 Chapter #0:1: start 359.067000, end 518.142000 Metadata: title : (02)00:05:59:067 Chapter #0:2: start 518.142000, end 736.277000 Metadata: title : (03)00:08:38:142 Chapter #0:3: start 736.277000, end 997.121000 Metadata: title : (04)00:12:16:277 Chapter #0:4: start 997.121000, end 1324.031000 Metadata: title : (05)00:16:37:121 Chapter #0:5: start 1324.031000, end 1720.927000 Metadata: title : (06)00:22:04:031 Chapter #0:6: start 1720.927000, end 2037.535000 Metadata: title : (07)00:28:40:927 Chapter #0:7: start 2037.535000, end 2323.112000 Metadata: title : (08)00:33:57:535 Chapter #0:8: start 2323.112000, end 2557.137000 Metadata: title : (09)00:38:43:112 Chapter #0:9: start 2557.137000, end 2856.687000 Metadata: title : (10)00:42:37:137 Chapter #0:10: start 2856.687000, end 3165.620000 Metadata: title : (11)00:47:36:687 Chapter #0:11: start 3165.620000, end 3430.593000 Metadata: title : (12)00:52:45:620 Chapter #0:12: start 3430.593000, end 3659.864000 Metadata: title : (13)00:57:10:593 Chapter #0:13: start 3659.864000, end 4015.219000 Metadata: title : (14)01:00:59:864 Chapter #0:14: start 4015.219000, end 4356.769000 Metadata: title : (15)01:06:55:219 Chapter #0:15: start 4356.769000, end 4766.887000 Metadata: title : (16)01:12:36:769 Chapter #0:16: start 4766.887000, end 5062.766000 Metadata: title : (17)01:19:26:887 Chapter #0:17: start 5062.766000, end 5350.428000 Metadata: title : (18)01:24:22:766 Chapter #0:18: start 5350.428000, end 5728.556000 Metadata: title : (19)01:29:10:428 Chapter #0:19: start 5728.556000, end 6000.494000 Metadata: title : (20)01:35:28:556 Chapter #0:20: start 6000.494000, end 6426.503000 Metadata: title : (21)01:40:00:494 Chapter #0:21: start 6426.503000, end 6688.431000 Metadata: title : (22)01:47:06:503 Chapter #0:22: start 6688.431000, end 7053.379000 Metadata: title : (23)01:51:28:431 Chapter #0:23: start 7053.379000, end 7192.512000 Metadata: title : (24)01:57:33:379 Stream #0:0: Video: vc1 (Advanced) (WVC1 / 0x31435657), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default) Metadata: BPS : 16998307 BPS-eng : 16998307 DURATION : 01:59:51.476000000 DURATION-eng : 01:59:51.476000000 NUMBER_OF_FRAMES: 172423 NUMBER_OF_FRAMES-eng: 172423 NUMBER_OF_BYTES : 15280364741 NUMBER_OF_BYTES-eng: 15280364741 _STATISTICS_WRITING_APP: DVDFab 11.0.1.0 _STATISTICS_WRITING_APP-eng: DVDFab 11.0.1.0 _STATISTICS_WRITING_DATE_UTC: 2019-01-04 14:04:03 _STATISTICS_WRITING_DATE_UTC-eng: 2019-01-04 14:04:03 _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream #0:1(deu): Audio: dts (DTS-HD MA), 48000 Hz, 5.1(side), s16p (default) Metadata: BPS : 1964511 BPS-eng : 1964511 DURATION : 01:59:52.512000000 DURATION-eng : 01:59:52.512000000 NUMBER_OF_FRAMES: 674298 NUMBER_OF_FRAMES-eng: 674298 NUMBER_OF_BYTES : 1766221136 NUMBER_OF_BYTES-eng: 1766221136 _STATISTICS_WRITING_APP: DVDFab 11.0.1.0 _STATISTICS_WRITING_APP-eng: DVDFab 11.0.1.0 _STATISTICS_WRITING_DATE_UTC: 2019-01-04 14:04:03 _STATISTICS_WRITING_DATE_UTC-eng: 2019-01-04 14:04:03 _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream #0:2(kor): Audio: dts (DTS-HD MA), 48000 Hz, 5.1(side), s16p Metadata: BPS : 2014735 BPS-eng : 2014735 DURATION : 01:59:52.512000000 DURATION-eng : 01:59:52.512000000 NUMBER_OF_FRAMES: 674298 NUMBER_OF_FRAMES-eng: 674298 NUMBER_OF_BYTES : 1811376192 NUMBER_OF_BYTES-eng: 1811376192 _STATISTICS_WRITING_APP: DVDFab 11.0.1.0 _STATISTICS_WRITING_APP-eng: DVDFab 11.0.1.0 _STATISTICS_WRITING_DATE_UTC: 2019-01-04 14:04:03 _STATISTICS_WRITING_DATE_UTC-eng: 2019-01-04 14:04:03 _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES MediaInfo from the VC-1 example: Code:
General Unique ID : 208572162048080453250143263780006303268 (0x9CE9A22F8C9B346D9895DBE317D0D55B) Complete name : C:\Movies\Test\OLD_BOY.Title0.mkv Format : Matroska Format version : Version 2 File size : 17.6 GiB Duration : 1 h 59 min Overall bit rate mode : Variable Overall bit rate : 21.0 Mb/s Movie name : OLD_BOY.Title0 Encoded date : UTC 2019-01-04 14:04:03 Writing application : DVDFab 11.0.1.0 Writing library : libebml v1.3.4 + libmatroska v1.4.5 Video ID : 1 Format : VC-1 Format profile : Advanced@L3 Codec ID : V_MS/VFW/FOURCC / WVC1 Codec ID/Hint : Microsoft Duration : 1 h 59 min Bit rate : 17.0 Mb/s Width : 1 920 pixels Height : 1 080 pixels Display aspect ratio : 16:9 Frame rate mode : Constant Frame rate : 23.976 (24000/1001) FPS Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Compression mode : Lossy Bits/(Pixel*Frame) : 0.342 Stream size : 14.2 GiB (81%) Default : Yes Forced : No Audio #1 ID : 2 Format : DTS XLL Format/Info : Digital Theater Systems Commercial name : DTS-HD Master Audio Codec ID : A_DTS Duration : 1 h 59 min Bit rate mode : Variable Bit rate : 1 965 kb/s Channel(s) : 6 channels Channel layout : C L R Ls Rs LFE Sampling rate : 48.0 kHz Frame rate : 93.750 FPS (512 SPF) Bit depth : 16 bits Compression mode : Lossless Stream size : 1.64 GiB (9%) Language : German Default : Yes Forced : No Audio #2 ID : 3 Format : DTS XLL Format/Info : Digital Theater Systems Commercial name : DTS-HD Master Audio Codec ID : A_DTS Duration : 1 h 59 min Bit rate mode : Variable Bit rate : 2 015 kb/s Channel(s) : 6 channels Channel layout : C L R Ls Rs LFE Sampling rate : 48.0 kHz Frame rate : 93.750 FPS (512 SPF) Bit depth : 16 bits Compression mode : Lossless Stream size : 1.69 GiB (10%) Language : Korean Default : No Forced : No Menu 00:00:00.000 : en:(01)00:00:00:000 00:05:59.067 : en:(02)00:05:59:067 00:08:38.142 : en:(03)00:08:38:142 00:12:16.277 : en:(04)00:12:16:277 00:16:37.121 : en:(05)00:16:37:121 00:22:04.031 : en:(06)00:22:04:031 00:28:40.927 : en:(07)00:28:40:927 00:33:57.535 : en:(08)00:33:57:535 00:38:43.112 : en:(09)00:38:43:112 00:42:37.137 : en:(10)00:42:37:137 00:47:36.687 : en:(11)00:47:36:687 00:52:45.620 : en:(12)00:52:45:620 00:57:10.593 : en:(13)00:57:10:593 01:00:59.864 : en:(14)01:00:59:864 01:06:55.219 : en:(15)01:06:55:219 01:12:36.769 : en:(16)01:12:36:769 01:19:26.887 : en:(17)01:19:26:887 01:24:22.766 : en:(18)01:24:22:766 01:29:10.428 : en:(19)01:29:10:428 01:35:28.556 : en:(20)01:35:28:556 01:40:00.494 : en:(21)01:40:00:494 01:47:06.503 : en:(22)01:47:06:503 01:51:28.431 : en:(23)01:51:28:431 01:57:33.379 : en:(24)01:57:33:379 Best regards, Felix |
|
6th January 2019, 17:15 | #2 | Link |
Registered User
Join Date: Dec 2002
Posts: 5,565
|
Blu-Rays are always CFR so adding --fps 24000/1001 to ensure constant 24/1.001 fps should be fine.
Otherwise the settings look ok. But since neither mkv nor mp4 are part of the Blu-Ray specification successful playback on Blu-Ray players isn't guaranteed. That's only for "true" Blu-Rays with their m2ts structure, on pressed discs with encryption which you cannot produce as a home user. (I personally don't bother when creating mkv beyond maybe the level 4.1 or slices requirements imposed by some hardware H.264 decoders). |
6th January 2019, 17:42 | #3 | Link |
Registered User
Join Date: May 2006
Posts: 3,997
|
@FLX90:
I am not quite sure what you want to achieve, however: - VC-1 video is blu-ray compliant. Why convert? - .mp4 (your desired container) is NOT blu-ray compliant (as requested by you). What do you actualy mean by "blu-ray compliant"? - if you want to put the VC-1 video into an .mkv container your could remux it with mkvtoolnix - or remux it with tsMuxer to .m2ts …. Maybe I misunderstand your needs? Edit: If you want to convert your VC-1 in .mkv to AVC h264 and put it into an .mp4 container you may want to try handbrake. Last edited by Sharc; 6th January 2019 at 18:02. |
6th January 2019, 19:58 | #4 | Link | |
Registered User
Join Date: Nov 2018
Posts: 34
|
Thank you for your answers.
Quote:
Code:
ffmpeg -i OLD_BOY.Title0.mkv -vf vfrdet -f null - [Parsed_vfrdet_0 @ 0000000003174400] VFR:0.583336 (100580/71842) min: 41 max: 42) Just for comprehension. --bitrate 16997 would be worse quality than the original VC-1. --bitrate 16999 wouldn't be better quality than the original VC-1 and would just waste space? Thanks. |
|
6th January 2019, 20:20 | #5 | Link | |
Registered User
Join Date: May 2006
Posts: 3,997
|
Quote:
So re-encoding with the same bitrate as the "original" source does not mean that the quality remains the same (untouched). If you want to preserve the quality of your VC-1 source you may just copy the videostream and mux it into a new container, like mkv or mp4 or m2ts. Last edited by Sharc; 6th January 2019 at 20:23. |
|
6th January 2019, 20:22 | #6 | Link | ||
Registered User
Join Date: Dec 2002
Posts: 5,565
|
Quote:
1000ms/(24/1.001)= 41.70833333333333333.....ms Mkv will store it so the frame durations switch between 41ms and 42ms so that on average it is 41.7083....ms. Technically it is vfr, but for practical purposes it is cfr (as was the original source). If you are unsure just leave the fps settings alone. Quote:
At ~17 Mbps a human will usually not notice any difference to the original Blu-Ray, though, so that's ok. That's your goal, right? |
||
6th January 2019, 20:48 | #7 | Link | |||
Registered User
Join Date: Nov 2018
Posts: 34
|
Quote:
Quote:
I tried --crf 0 and the filesize would be many terabytes. So that's unusable. Quote:
But as I take it the one exlcudes the other. Would more passes bring me closer to the original without dramatically increasing the filesize? Code:
-p, --pass <integer> Enable multipass ratecontrol - 1: First pass, creates stats file - 2: Last pass, does not overwrite stats file - 3: Nth pass, overwrites stats file |
|||
6th January 2019, 22:33 | #8 | Link |
Registered User
Join Date: May 2005
Posts: 1,462
|
I'm still kinda unclear what container exactly won't take a VC1 stream, anno 2019; .mt2s certainly will.
Way back when -- before my Zbox -- my old PS3 wouldn't play VC1, so I needed to re-encode those streams. It's hard to imagine there's still a need for that these days.
__________________
Gorgeous, delicious, deculture! |
6th January 2019, 23:17 | #9 | Link | |
Registered User
Join Date: May 2006
Posts: 3,997
|
Quote:
2 passes are typically used to hit a target size precisely e.g. in order to fill a disc. More than 2 passes is considered a waste of encoding time with little to no benefit for x264. If the file size isn't critical one would normally prefer a 1 pass crf encode, e.g. --crf 16 or --crf 17 for very good quality. But as has been already said even when you encode with 1-pass ABR at around 17 Mbps it will be difficult to spot differences against your VC-1 source. Nothing to worry about. Last edited by Sharc; 6th January 2019 at 23:24. |
|
7th January 2019, 00:01 | #10 | Link | |
Registered User
Join Date: May 2006
Posts: 3,997
|
Quote:
|
|
7th January 2019, 03:20 | #11 | Link | |
Registered User
Join Date: May 2005
Posts: 1,462
|
Quote:
But why .mp4 then? Does it even support DTS-MA? Or TrueHD? Seems like an odd container to mux one's blu-rays to, but I suppose the OP has reasons.
__________________
Gorgeous, delicious, deculture! |
|
7th January 2019, 09:59 | #12 | Link |
Registered Developer
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,348
|
MP4 supports DTS in all variants (at least in theory, how many players play that is another question), but not TrueHD.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders |
7th January 2019, 11:13 | #13 | Link |
Registered User
Join Date: May 2006
Posts: 3,997
|
@FLX90
As a quick test for what gets packed into an .mp4 container and whether your playback device will play it you may want to try: Code:
ffmpeg.exe -i "yoursource.mkv" -c:a copy -c:v copy "output.mp4" |
7th January 2019, 15:34 | #15 | Link | |
Registered User
Join Date: Nov 2018
Posts: 34
|
I tried the re-encode yesterday and it took 20 hours for the 2 passes on my i7 5th gen.
I'm glad that only a few BluRays of my collection are in VC-1. Quote:
That works, I'm really surprised (also Wikipeadia don't list VC-1 as a proper stream). I only tried it with m4v, because that is the container I'm working with at the end. Thought that m4v is a mp4 container ... However. VC-1 in M4V don't work. |
|
7th January 2019, 17:03 | #16 | Link | ||
Registered User
Join Date: May 2006
Posts: 3,997
|
Quote:
Quote:
|
||
7th January 2019, 20:29 | #17 | Link | |
Moderator
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,771
|
Quote:
Maybe a given muxer can't handle VC-1 input, and there are certainly some players that won't play it back, but it is definitely a standard. |
|
7th January 2019, 21:46 | #18 | Link |
Registered User
Join Date: May 2005
Posts: 1,462
|
Still, out of sheer curiosity, why .mp4? (Is it because of ffmpeg?) I personally mux everything to an .m2ts container: that's always guaranteed to play on every blu-ray compatible device, and can contain all types of HD audio.
__________________
Gorgeous, delicious, deculture! |
7th January 2019, 22:24 | #19 | Link | ||
Registered User
Join Date: Nov 2018
Posts: 34
|
Quote:
But: Oldboy (2003) - VC-1: Code:
ffmpeg -i OLD_BOY.Title0.mkv -map 0:0 -c copy temp.m4v [ipod @ 000000000067adc0] Could not find tag for codec vc1 in stream #0, codec not currently supported in container Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument Sympathy for Mr. Vengeance - AVC: Code:
ffmpeg -i SYMPATHYFORMRVENGEANCE.Title5 -map 0:0 -c copy temp.m4v |
||
7th January 2019, 22:38 | #20 | Link | |
Moderator
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,771
|
Quote:
|
|
|
|