Announcement: Our new CyberLink Feedback Forum has arrived! Please transfer to our new forum to provide your feedback or to start a new discussion. The content on this CyberLink Community forum is now read only, but will continue to be available as a user resource. Thanks!
CyberLink Community Forum
where the experts meet
| Advanced Search >
How to produce a streamable H.264 MP4 file compatible with YouTube?
noeld [Avatar]
Newbie Joined: Jan 07, 2012 06:46 Messages: 30 Offline
[Post New]
@longedge,

When I publish WMV videos produced by PD14 on YouTube, I don't get the "Video / Audio notice" and there are no processing delay at all when the upload completes, the videos are immediately online and available (i.e. no recompression on the server side) but yet it's not that processing delay the actual issue for me.

I watch all the YouTube videos on my HD TV set and they are played in full HD.

When I produce MP4/H.264 files from my projects with PD14 and cast them from my PC to my TV set, the quality is just fine but after uploading the same MP4 to YouTube the video quality drops (i.e. the video looks more blurry) I'd say to the level of the WMV quality or possibly less in some cases. I won't say that the quality is awful no but not as good as what one can expect from H.264; and since some parts of my videos are recorded in less than optimal lighting conditions they seem more sensitive to compression artifacts.

Whether I cast a WMV file produced by PD14 from my PC or watch it from my YouTube channel, there are no difference in quality, I suppose the pictures are the same in this case. Since PD14 is able to produce WMV files from my projects that meet YouTube requirements, I'd have thought that it could do the same with MP4/H.264 since the MP4 format is more the standard nowadays.

For these reasons, my current online videos are all in the WMV format, I will live with it until I can find a solution to this MP4/H.264 issue.

Thanks for your suggestions and I appreciate your support. Best Regards,
-Noël
Longedge [Avatar]
Senior Contributor Joined: Apr 28, 2011 15:38 Messages: 1504 Offline
[Post New]
...............

This message was edited 1 time. Last update was at Nov 09. 2016 10:37

noeld [Avatar]
Newbie Joined: Jan 07, 2012 06:46 Messages: 30 Offline
[Post New]
Yes both are produced at 1920x1080. It's not that obvious on all the pictures but some are more sensitive than others; in my case, some details are less blurry with H.264 than with WMV. A smaller file size would also be of interest for me since the upload speed of my Internet connection is very slow, just a few KB/s.

For the current video, I will probably keep WMV but for the next one, I'd like to use H.264 but without recompression hence my initial question.

Thanks, Best Regards,
-Noël
noeld [Avatar]
Newbie Joined: Jan 07, 2012 06:46 Messages: 30 Offline
[Post New]
Hello all,

I ran some more tests regarding H.264/MP4 and YouTube.

I first uploaded a short MP4 file produced by PD14 from Produce > H.264/MP4 tab with default settings (details available in "Produce 25fps.mp4 MediaInfo.txt") to YouTube and let the server recompress the video.

I then downloaded the recompressed MP4 file using 4K Video Downloader at 1920x1080 (the "Download MP4" option from YouTube Video Manager provides a 1280x720 MP4 file only, so no interest here). The details of that file are available in "Produce 25fps recompressed by Youtube.mp4 MediaInfo.txt".

Finally, I tried to uploaded the file produced by YouTube back to YouTube and I was surprised to get the warning again and the file to be recompressed again so YouTube may have a problem checking its own requirements? The details of this recompressed file are available in "Produce 25fps recompressed by YouTube 2.mp4 MediaInfo.txt".

MediaInfo details are available in the attached MediaInfo.zip archive. Thanks,
 Filename
MediaInfo.zip
[Disk]
 Description
 Filesize
3 Kbytes
 Downloaded:
282 time(s)
Best Regards,
-Noël
[Post New]
Did you check the framerate of your monitor. Of ANY monitor for that matter?
It's 60FPS progressive (60Hz).
At play time a re-conversion of the 50FPS will be done 'quick and dirty' to serve that 60FPS needed.

You want the online video not to look bad? Get your source to record in 30 or 60FPS (24 only as an extreme measure, it still converts but with better results).

If not possible, perform the conversion in your video editor, it will be a higher quality conversion.

This message was edited 5 times. Last update was at Aug 22. 2016 07:35

noeld [Avatar]
Newbie Joined: Jan 07, 2012 06:46 Messages: 30 Offline
[Post New]
My monitor is 60Hz progressive indeed but I'm not sure if that really matters here: the recompressed 25fps CBR videos that I have downloaded from YouTube were still @25fps only VBR and a few other parameters (2 frames, etc.) had changed.

I uploaded the same sample video produced at 60fps but now YouTube only offer it at 1280x720 @60Hz not full HD.

I will possibly run a test with a video produced at 29.27fps (VBR) but (strangely?) this MP4 file is much bigger than the others @25, @50 or @60fps so it is not of interest to me.

Thanks, Best Regards,
-Noël
[Post New]
You realize that your monitor will NOT display the 25FPS directly? The video card will do a quick conversion to 60Hz.

Also, there is something wrong with your settings if the lower frame rate video is larger in size.
Longedge [Avatar]
Senior Contributor Joined: Apr 28, 2011 15:38 Messages: 1504 Offline
[Post New]
...................

This message was edited 3 times. Last update was at Nov 09. 2016 10:37

[Post New]
It cannot be just "in buffer" because it will stutter, due to the different frame rates. games are different because the creation of a new frame can be delayed to "wait" for the monitor sync, while the video is not that way, it was created already, it cannot be "paused" without stuttering.

This message was edited 1 time. Last update was at Aug 22. 2016 16:20

noeld [Avatar]
Newbie Joined: Jan 07, 2012 06:46 Messages: 30 Offline
[Post New]
I don't think that any conversion is needed for this purpose, the video renderer or any equivalent technology from the graphics card knows how long it has to present every frame based on the framerate and will also wait for the monitor v-sync to avoid any possible tearing. The framerate does not have to be the same as the refresh rate.

I will try to redo the 29.97fps file but at first sight properties are correct.

Back to my initial question, it seems like PD14 won't be able to produce a YouTube compatible file format to avoid the recompression after upload. Best Regards,
-Noël
[Post New]
Games create the video on spot, that's why V-Sync works. It creates the correct frame "later" in time.
You video frames are rigid coded, computer cannot go around that issue by using V-Sync. It will repeat (or drop) video frames to match the 60Hz.

Anyway, Youtube is weird. I also saw that the videos on youtube have actually the SR of 44.1kHz, no matter what they say on their "recommended" being 48kHz. That by itself requires some conversion.

The default video stream is encoded in the VP9 format with stereo Opus audio; if VP9/WebM is not supported in the browser/device or the browser's user agent reports Windows XP, then H.264/MPEG-4 AVC video with stereo AAC audio is used instead.

This message was edited 3 times. Last update was at Aug 23. 2016 10:36

noeld [Avatar]
Newbie Joined: Jan 07, 2012 06:46 Messages: 30 Offline
[Post New]
YouTube recommends to upload content in the same frame rate that it was recorded but PD14 won't let me produce 25fps VBR even though videos from my camcorder (MTS) are 25fps (or 50fps) VBR, and in my test project, I put a single MTS file on the timeline.

I produced a new 29.97fps VBR sample, this time the size is OK but there still is a recompression when I upload; some PD14 settings don't match YT requirements (e.g. ReFrame 4 frames).

I also noticed that difference about audio; when I download my sample videos in MP4 from YouTube it is converted to 44.1K and bitrate is only 126kpbs. Best Regards,
-Noël
[Post New]
I think they are actually storing the videos in VP9 on their servers. That's their own video format..

https://en.wikipedia.org/wiki/YouTube#Quality_and_formats
collie581 [Avatar]
Member Location: Aberdeen Scotland Joined: Oct 21, 2015 11:43 Messages: 92 Offline
[Post New]
Very interesting topic. It is one that has confused me ever since starting to post videos online. I confess to having no technical knowledge whatsoever. But I found the same loss of quality when posting the same file to both YouTube and Vimeo. They both suggest that settings could be changed to make it stream better but certainly don't make it easy to understand how to do this! And as for posting a video directly to Facebook.... The quality I get is so bad I never do it now. File definitely upload much quicker to Facebook which probably explains the poor quality.
noeld [Avatar]
Newbie Joined: Jan 07, 2012 06:46 Messages: 30 Offline
[Post New]
That would explain why I never get exactly the same format when I upload and download a YouTube-recompressed MP4 file.

On another hand, if a recompression to VP9 is always required, I don't get why the WMV format is available immediately after upload while a "YouTube" H.264/MP4 is not and needs recompression.

Anyway, with all these compression and recompression stages, I think I can forget about my hope to get the same video quality level for my videos on YouTube than from the original H.264 CBR produced by PD14 and locally casted to my TV set from my PC.
Best Regards,
-Noël
[Post New]
Speculation:

About WMV... that format is owned by MS and basically is royalty free, even for commercial usage.
MP4, H264, H265 are free only for home usage.

I wonder if Google does store the WMV directly (and maybe re-converts later), since they don't have to pay anything.
For MP4 I think it reconverts to their own VGP9 format on the fly, before it lands on their HDD's (no commercial storage, no royalties to pay) so that's why is slower.
[Post New]
And this is "stats for nerds" from a video on youtube. Note VP9 codec. 24Hz is easily converted to 60Hz by the video card (caled 3:2 pulldown): https://en.wikipedia.org/wiki/Three-two_pull_down



[Thumb - youtube.png]
 Filename
youtube.png
[Disk]
 Description
Youtube stats
 Filesize
63 Kbytes
 Downloaded:
462 time(s)

This message was edited 2 times. Last update was at Aug 24. 2016 14:00

PepsiMan
Senior Contributor Location: Clarksville, TN Joined: Dec 29, 2010 01:20 Messages: 1054 Offline
[Post New]
i've been totally ignoring the messages, i don't care.

uploaded a videos 1080 24p at 28Mb/sec, after YouTube got hold of it and BAM!

it was choppy and unviewable.

so, i've been submitting 1080 30p(29.97) at 44 Mb/sec AVC H.264 .MP4 container(wrapper).

now looks good to me.

same goes with 4K 30p at 112 Mb/sec AVC H.264 .MP4 container converted from HEVC H.265.

looks good to me.

did i get the message saying

' Video / Audio quality: Your videos will process faster if you encode into a streamable file format... ' ?

yes.

did i totally ignore it? yes!



if you want your uploaded 1080 25p to look good then increase the frame rate to 30p(29.97) and

bitrate to 26-28Mb/sec. or submit it in 4K.

yup! 4K!

downscaled 1080 FHD looks mighty fine also...

i believe that's what Panny GH4 owners are doing. record at 4K and downscaled to 1080 FHD to get extra details.



oh happy happy joy joy

PepsiMan

'garbage in garbage out' <- this is a true statement(phrase).



p.s.

and this too.

Quote:

...Anyway, with all these compression and recompression stages, I think I can forget

about my hope to get the same video quality level for my videos on YouTube than

from the original H.264 CBR produced by PD14 and locally casted to my TV set from my PC...

This message was edited 4 times. Last update was at Aug 24. 2016 19:28

'no bridge too far'

Yashica Electro 8 LD-6 Super 8mm
Asrock TaiChi X470, AMD R7 2700X, W7P 64, MSI GTX1060 6GB, Corsair 16GB/RAM
Dell XPS L702X i7-2860QM, W7P / W10P 64, Intel HD3000/nVidia GT 550M 1GB, Micron 16GB/RAM
Samsung Galaxy Note3/NX1
noeld [Avatar]
Newbie Joined: Jan 07, 2012 06:46 Messages: 30 Offline
[Post New]
@SoNic67 these "stats for nerds" are interesting, I did not think about them, thanks.

Using stats for nerds, I could see that both MP4/H.264 and WMV files are streamed as WebM/VP9 in Chrome and MP4/AVC1 in Edge or IE.

@PepsiMan I will try again. I already tried with a short sample at 29.97fps but bitrate 15.5Mbps (PD14 settings). I will see if it is worth the wait of the recompression after the upload or if I should rather stick with WMV.

Thanks, Best Regards,
-Noël
[Post New]
Well, with WMV you have to wait at the encoding stage probably, since Intel and nvidia don't do hardware accelerated encoding for that format. Some AMD cards will do that though...

This message was edited 1 time. Last update was at Aug 25. 2016 09:58

JL_JL [Avatar]
Senior Contributor Location: Arizona, USA Joined: Oct 01, 2006 20:01 Messages: 6091 Offline
[Post New]
Quote: I get the well-known message: "Video / Audio quality: Your videos will process faster if you encode into a streamable file format. For more information, visit our Help Center." (https://support.google.com/youtube/answer/1722171?hl=en)


For your original issue and topic, to my knowledge PD14 cannot do that.

In order to do that, what YouTube needs to know is the data structure of the video container, in particular what's called a moov atom. For most local encode tasks, this information is at the end of a file so the entire file needs to upload prior to YT doing it's encode conversion. Many tools have the ability to move this information to the front of the file so processing can start immediately.

If you are familiar with ffmeg, one could move the info to the start of the file prior to uploading with a command like this: ffmpeg -i myinput.mp4 -codec copy -map 0 -movflags +faststart myoutput.mp4

Again, not required, just allows YT to start renencoding file immediately vs wating for upload to complete.

Jeff
Powered by JForum 2.1.8 © JForum Team