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.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 7th January 2019, 21:51   #21  |  Link
Sharc
Registered User
 
Join Date: May 2006
Posts: 3,471
Quote:
Originally Posted by benwaggoner View Post
VC-1 has always had a MP4 mapping. The whole DASH/Adaptive Streaming ecosystem was launched with VC-1 in fragmented MPEG-4 containers. The Smooth Streaming .ismv files were just fragmented MP4 files (either VC-1 or H.264) with a different extension because a lot of parsers back then couldn't handle fMP4.

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.
Thanks for clarification.
Sharc is offline   Reply With Quote
Old 7th January 2019, 22:19   #22  |  Link
lvqcl
Registered User
 
Join Date: Aug 2015
Posts: 120
Quote:
Originally Posted by benwaggoner View Post
That's mkv, not MP4. Entirely different container. MPEG-4 has codec mappings for almost anything you could think of.
AFAICS he tries to remux .mkv with vc1 into mp4 container.

I tried to do the same. ffmpeg 4.1 from Zeranoe failed (current build also failed), but ver. 3.4.2 works.
lvqcl is offline   Reply With Quote
Old 7th January 2019, 22:46   #23  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 2,894
Quote:
Originally Posted by lvqcl View Post
AFAICS he tries to remux .mkv with vc1 into mp4 container.

I tried to do the same. ffmpeg 4.1 from Zeranoe failed (current build also failed), but ver. 3.4.2 works.
Not entirely surprising that products would be deprecating that feature. It's not like a lot of VC-1 content has been published in the last five years.

VC-1 was a quite good codec when software decoding on single-core 32-bit x86 processors without advance SSE stuff was an important feature requirement. It was quite competitive with H.264 Baseline Profile. But H.264 High Profile was almost a superset of VC-1. And once the H.264 patent pool got down to a reasonable price/structure to allow building with Windows, there wasn't a lot of point in further enhancing VC-1 for Microsoft.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 8th January 2019, 08:08   #24  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,512
Quote:
Originally Posted by benwaggoner View Post
VC-1 was a quite good codec when software decoding on single-core 32-bit x86 processors without advance SSE stuff was an important feature requirement. It was quite competitive with H.264 Baseline Profile. But H.264 High Profile was almost a superset of VC-1. And once the H.264 patent pool got down to a reasonable price/structure to allow building with Windows, there wasn't a lot of point in further enhancing VC-1 for Microsoft.
QFT! VC-1 was some great stuff for sure. Microsoft was ahead of the game for awhile here
Blue_MiSfit is offline   Reply With Quote
Old 8th January 2019, 08:34   #25  |  Link
Sharc
Registered User
 
Join Date: May 2006
Posts: 3,471
Quote:
Originally Posted by lvqcl View Post
AFAICS he tries to remux .mkv with vc1 into mp4 container.

I tried to do the same. ffmpeg 4.1 from Zeranoe failed (current build also failed), but ver. 3.4.2 works.
Strange. I have made a few test with VC-1 in mkv (interlaced and progressive video), wrapping these (copy) into MP4 using Zeranoes latest (nightly 20190107) 32-bit build for Windows. Seems to work without problems …..

Last edited by Sharc; 8th January 2019 at 08:41.
Sharc is offline   Reply With Quote
Old 8th January 2019, 11:26   #26  |  Link
lvqcl
Registered User
 
Join Date: Aug 2015
Posts: 120
Well, maybe the only file with VC-1 that I have is slightly corrupted, or something like this... I downloaded a VC-1 sample from Kodi wiki page and indeed, it can be remuxed to mp4.
lvqcl is offline   Reply With Quote
Old 8th January 2019, 11:54   #27  |  Link
FLX90
Registered User
 
Join Date: Nov 2018
Posts: 33
Quote:
Originally Posted by Sharc View Post
Strange. I have made a few test with VC-1 in mkv (interlaced and progressive video), wrapping these (copy) into MP4 using Zeranoes latest (nightly 20190107) 32-bit build for Windows. Seems to work without problems …..
So it works with 64-bit but doesn't with 32-bit.
That's really strange.


I need those rips for an Apple environment.
VC-1 won't natively work with Apple. So I need to re-encode.

I have some final questions:

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

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
- How does these commands alter my source. I mean, would there be less alteration when I do something like this (and would that bring me closer to the source? Do I need to worry about BluRay compliance, when the source is a BluRay?):

Code:
x264-r2935-545de2f.exe --bitrate 16998 --preset veryslow -o out.mkv OLD_BOY.Title0.mkv

- Why does x264 show the following during encoding:

Code:
lavf [info]: 1920x1080p 1:1 @ 24000/1001 fps (vfr)
--> vfr

Is it that problem:

Quote:
Originally Posted by sneaker_ger View Post
That's probably just some jitter because mkv container cannot accurately store constant 24/1.001 fps.
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.
And would it be better to use --fps 24000/1001 (implies --force-cfr?)?
FLX90 is offline   Reply With Quote
Old 8th January 2019, 14:00   #28  |  Link
Sharc
Registered User
 
Join Date: May 2006
Posts: 3,471
Why don't you try yourself an tell us whether you see a difference? Cut out a snippet of say 1 minute duration from your source and try your settings and Apple playback scenarios.
Why are you so much worried about quality when you won't see a difference at these high bitrates of about 17Mbps as you suggest?

Your first example (2-pass encode) is blu-ray compliant and time consuming. Blu-ray compliance does not by itself mean that it is the best possible quality. It puts some constrains on certain parameters to ensure that the video stream complies with the blu-ray standard. I don't know whether your Apple devices require blu-ray compliant video streams or not.

Your second example is a 1-pass ABR encode. The stream will not be blu-ray compliant. The quality will be excellent as well though. Just try.

What are you going to do with the audio and subtitles b.t.w.?

Finally, why dont you simply throw your .mkv sources to HANDBRAKE and let it do the job? It has even a number of Apple presets for MP4.
Sharc is offline   Reply With Quote
Old 8th January 2019, 15:00   #29  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,372
Quote:
Originally Posted by Blue_MiSfit View Post
QFT! VC-1 was some great stuff for sure. Microsoft was ahead of the game for awhile here
It was a PITA, though, that Sony (= PS3) wouldn't support VC1 (at least not on anything not on an official blu-ray disc). Nobody needs these codec wars. Good thing it's all in the past.
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Old 9th January 2019, 03:14   #30  |  Link
FLX90
Registered User
 
Join Date: Nov 2018
Posts: 33
According to this I changed my command:

Quote:
NB: If your source file is not natively the correct framerate you will have to add the following settings (example for 23.976):

--fps 24000/1001 --force-cfr
I think I have found the perfect command for me:
Code:
x264-r2935-545de2f.exe --fps 24000/1001 --force-cfr --bitrate 17971 --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 tempx.264 LADY_VENGEANCE.Title0.mkv
x264-r2935-545de2f.exe --fps 24000/1001 --force-cfr --bitrate 17971 --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 temp.264 LADY_VENGEANCE.Title0.mkv

OT:
Another question. Don't want to open a new thread.

This is how my final muxing command looks like:
Code:
ffmpeg^
 -r 24000/1001 -i video -i SYMPATHYFORMRVENGEANCE.Title5.mkv -fix_sub_duration -i SYMPATHYFORMRVENGEANCE.Title5_german_forced.srt -i SYMPATHYFORMRVENGEANCE.Title5_german.srt^
 -map 0:0 -map 1:1 -map 1:2 -map 2:0 -map 3:0^
 -metadata:s:v:0 handler="AVC"^
 -metadata:s:a:0 language=deu -metadata:s:a:0 handler="DTS-HD Master Audio"^
 -metadata:s:a:1 language=kor -metadata:s:a:1 handler="DTS-HD Master Audio"^
 -metadata:s:s:0 language=ger -metadata:s:s:0 handler="Deutsch (forced)"^
 -metadata:s:s:1 language=ger -metadata:s:s:1 handler="Deutsch"^
 -movflags disable_chpl^
 -c:s mov_text -c:v copy -c:a alac -sample_fmt:a s16p^
 SYMPATHYFORMRVENGEANCE.m4v
I tried to force ffmpeg to read the correct cfr of the input with -r (-i video with raw 264 only for testing, because when I take the video stream from the mkv I get no error but vfr is still taken). But:
Code:
[ipod @ 0000000002fc1100] pts has no value
    Last message repeated 104 times
[ipod @ 0000000002fc1100] pts has no value time=00:02:38.19 bitrate= 715.9kbits/s speed= 307x
    Last message repeated 107 times
[ipod @ 0000000002fc1100] pts has no value time=00:02:38.19 bitrate=1312.4kbits/s speed= 154x
    Last message repeated 71 times
[...]
Does someone know a workaround?

Last edited by FLX90; 9th January 2019 at 03:16.
FLX90 is offline   Reply With Quote
Old 9th January 2019, 07:53   #31  |  Link
FLX90
Registered User
 
Join Date: Nov 2018
Posts: 33
The h264 cfr stream is finally encoded and I tried to mux it in the container with ffmpeg.
I get the same pts has no value message. But the stream is actually cfr, so what timestamps?
I don't understand this.
What is the muxer telling me.
Could someone explain me please.
(When I use mkv as output format for x264 there is no problem.)
FLX90 is offline   Reply With Quote
Old 9th January 2019, 09:30   #32  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 9,759
Raw h264 doesn't have any timestamps. You should use a container format with timestamps as your source to avoid such problems.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel is offline   Reply With Quote
Old 9th January 2019, 16:08   #33  |  Link
SeeMoreDigital
Life looks better in UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 11,436
Hi FLX90,

I don't know if this question has already been asked/answered but... What playback devices are you using to play your encodes?
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Old 9th January 2019, 16:37   #34  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 2,894
Quote:
Originally Posted by Blue_MiSfit View Post
QFT! VC-1 was some great stuff for sure. Microsoft was ahead of the game for awhile here
Yeah, peak MIPS-per-pixel for decode were a lot lower than the H.264 worst case. And there were some great encoder implementations with advanced adaptive deadzone and other features. And hey, 720p24 SW and DXVA playback in the early 2000's!

But Moore's law turns as always, and as computers got fast enough and HW decoders were deployed to handle multiple ref frames, b-frame weighted prediction, and the more complex in-loop deblocking of H.264, and CABAC, the SW decode advantages stopped mattering. And the explosion of torrented video piracy, and all those quality obsessed video pirates wailing away on a huge variety of real-world content in x264 made x264 increasingly hard to beat for lots of real-world VBR content. Psychovisual tuning is more important than any particular bitstream feature! And x264's popularity lead to a lot of investment in performance, with single-slice parallelism and advanced vectorization, which eliminated any encoder speed penalty.

I think a xVC1 would have been quite competitive (using CRF and psy-rd etcetera but outputting to VC-1)

We saw some movie studios using VC-1 for Blu-ray titles for years after Microsoft stopped developing the technology, because the tools for that use case were better than what was available for H.264 (x264 didn't really offer operator-friendly hand-tuned high bitrate encoding). Some of that was probably because of the xdither dithering tool, however, which wasn't codec-specific

A decade ago the codec people at Microsoft thought that VC-1 could have remained competitive with H.264 if:
  1. A stronger H.264-style in-loop deblocking filter was available
  2. The (in-standard!) optional postprocessing filtering was used
  3. Encoder development investments were continued

I'd probably add CABAC to the list as well, although VC-1's entropy encoding was IIRC better than CAVLC in practice.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 10th January 2019, 09:32   #35  |  Link
SeeMoreDigital
Life looks better in UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 11,436
Nice informative post Ben.

Did Microsoft ever officially announce that development for VC-1 (or more of their AV formats) had ceased or did it just quietly fizzle out?
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Old 10th January 2019, 17:53   #36  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 2,894
Quote:
Originally Posted by SeeMoreDigital View Post
Nice informative post Ben.

Did Microsoft ever officially announce that development for VC-1 (or more of their AV formats) had ceased or did it just quietly fizzle out?
I donít recall any official announcement. There were still minor improvements they went into Windows 7 and the last version of Expression Encoder, which were not long before I left the company. Bug and security fixes at least would have been done as needed through now.

The Pro SDK and Expression Encoder versions were better than the Windows versions, so anyone doing professional VC-1 would probably have been using those.

The Smooth Streaming variable bitrate, GOP duration, and frame size implementation was remarkably competitive for long after it had been abandoned, especially where software decode was important. It had been surpassed now, but it held its own against H.264 CBR fixed GOP in Flash back in 2012.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 11th January 2019, 10:42   #37  |  Link
SeeMoreDigital
Life looks better in UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 11,436
Towards the end of last year I dug out some of my old 'HD DVD' discs, most of which were encoded using VC-1 and Dolby Digital Plus audio.

Anyway, long story short, all the discs I tried playing using my LG GGC-H20L (Hybrid ROM) drive and Toshiba HD DVD player have sadly developed faults.
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Old 11th January 2019, 19:29   #38  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 2,894
Quote:
Originally Posted by SeeMoreDigital View Post
Towards the end of last year I dug out some of my old 'HD DVD' discs, most of which were encoded using VC-1 and Dolby Digital Plus audio.

Anyway, long story short, all the discs I tried playing using my LG GGC-H20L (Hybrid ROM) drive and Toshiba HD DVD player have sadly developed faults.
Too bad. I have a few dozen of those somewhere in the depths of my basement.

Even today's SoCs still include support for VC-1 decoding; I bet WMV is supported in all kinds of things that have come out long after WMV stopped being a mainstream format. Anything that plays Blu-ray obviously has VC-1 support.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 17th January 2019, 10:31   #39  |  Link
FLX90
Registered User
 
Join Date: Nov 2018
Posts: 33
Quote:
Originally Posted by SeeMoreDigital View Post
Hi FLX90,

I don't know if this question has already been asked/answered but... What playback devices are you using to play your encodes?
I'll use Apple TV 4K.

BTW, does someone know if Apple still doing some crap like that: http://amiexp.blogspot.com/2011/11/a...with-2496.html
Watching movie from iTunes on ATV via homeshare:
Source (ALAC 24/48) --> iTunes samples down to 16/44.1 --> Apple TV samples up to 16/48

Last edited by FLX90; 17th January 2019 at 10:35.
FLX90 is offline   Reply With Quote
Old 17th January 2019, 15:12   #40  |  Link
SeeMoreDigital
Life looks better in UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 11,436
Quote:
Originally Posted by FLX90 View Post
I'll use Apple TV 4K.

BTW, does someone know if Apple still doing some crap like that: http://amiexp.blogspot.com/2011/11/a...with-2496.html
Watching movie from iTunes on ATV via homeshare:
Source (ALAC 24/48) --> iTunes samples down to 16/44.1 --> Apple TV samples up to 16/48
Oh yes I remember you now from this topic.

Just buy yourself a decent 'smart TV' and use it to play your media files instead of the 'crippled' Apple TV 4K player!
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:47.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.