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 specify output sample rate
Tack [Avatar]
Newbie Joined: Jun 10, 2013 01:27 Messages: 7 Offline
[Post New]
Hi forum!

The audio tracks in my project are all 44.1KHz. I would like to render the project with a 44.1KHz audio stream, but PowerDirector instead always seems to upsample to 48KHz. I can't for the life of me see where this is defined.

How can I control the sample rate of the rendered audio?

Thanks!

This message was edited 1 time. Last update was at Oct 18. 2014 15:54

[Post New]
Quote: Hi forum!

The audio tracks in my project are all 44.1KHz. I would like to render the project with a 44.1KHz audio stream, but PowerDirector instead always seems to upsample to 48KHz. I can't for the life of me see where this is defined.

How can I control the sample rate of the rendered audio?

Thanks!



I understand that the audio follows the pattern that you choose to video in Producer.

You can save just the audio in WAV or WMA profile with rate 44.1

[Thumb - audio 44.1.jpg]
 Filename
audio 44.1.jpg
[Disk]
 Description
 Filesize
56 Kbytes
 Downloaded:
163 time(s)

This message was edited 1 time. Last update was at Oct 18. 2014 16:42

AMD-FX 8350 / 8GB DDR3
SSD SUV400S37240G / 2-HD WD 1TB
AMD Radeon R9 270 / AOC M2470SWD
Windows 7-64 / PD16 Ultimate
Tack [Avatar]
Newbie Joined: Jun 10, 2013 01:27 Messages: 7 Offline
[Post New]
Quote: I understand that the audio follows the pattern that you choose to video in Producer.
You can save just the audio in WAV or WMA profile with rate 44.1


I do want to output a video though (1080p MKV). I just want the audio track to be LPCM at the original samplerate of the project audio clips, which are all 44.1KHz.

Your suggestion did make me realize that the sample rate is probably derived from the audio bitrate. If I try to output a Wave or WMA file, I do have various options for bitrate, including 1411Kbps in which the description says it's 44.1KHz. But for the AVC/MKV custom profile the only available bitrate when I choose LPCM is 1536.

... maybe if I manually hack the profiles file, I might be able to define my own bitrate or sample rate. (Edit: nope, changing the bitrate from 1536000 to 1411000 in Profile.ini generates an error when rendering, and viewing the profile shows the bitrate as 0.) Surely there is a correct way to do this though?

Thanks

This message was edited 2 times. Last update was at Oct 18. 2014 16:50

[Post New]
No, the video standards don't accept it:
http://en.wikipedia.org/wiki/Blu-ray_Disc#Audio
http://en.wikipedia.org/wiki/DVD-Video#Audio_data

This message was edited 1 time. Last update was at Oct 18. 2014 16:56

Tack [Avatar]
Newbie Joined: Jun 10, 2013 01:27 Messages: 7 Offline
[Post New]
Quote: No, the standard doesn't accept it:
http://en.wikipedia.org/wiki/Blu-ray_Disc#Audio

But I'm not encoding for Blu-ray. I'm rendering an H264 MKV file. MKV isn't part of the standard either, so why should I be so arbitrarily constrained?

The root of my problem is that upsampling from 44.1KHz to 48KHz actually produces audible artifacting (I can only assume PowerDirector's resampling algorithms aren't that great), and, more problematically, Youtube's resampling is horrifyingly bad, and when it resamples again back to 44.1KHz, the audio track is basically unusable (IMHO).

Granted, it's Youtube. But I just thought a very easy way to improve the audio quality would be to preserve the original 44.1KHz all the way through and do away with all the unnecessary upsampling and downsampling.

FWIW, other video editors allow me to specify the samplerate of the project.
[Post New]
I am afraid every web player will re-sample. Heck, Windows itself will adjust 44.1 to 48 or 96 unless you set 44.1 explicitly in "Playback Devices".

I would use some audio rate converter before insertion. My favorite is foobar2000, using WASAPI component to bypass Windows mixer, and with SOX based resampler (it can output on file), but that's just me.

This message was edited 1 time. Last update was at Oct 18. 2014 20:06

Tack [Avatar]
Newbie Joined: Jun 10, 2013 01:27 Messages: 7 Offline
[Post New]
Quote: I am afraid every web player will re-sample. Heck, Windows itself will adjust 44.1 to 48 or 96 unless you set 44.1 explicitly in "Playback Devices".


But I think the real problem here is Youtube's transcoding, in which it will, if necessary, resample any audio tracks to 44.1KHz. So what I'd like PowerDirector to do is let me render my project with a 44.1KHz audio track.


Quote: I would use some audio rate converter before insertion.


Before insertion into my project, you mean? My audio tracks are already 44.1KHz. Sure, I could convert them to 48KHz before adding to PowerDirector, in which case PD doesn't need to do any upsampling, but that doesn't avoid the core problem, which is that Youtube will still downsample it back down to 44.1KHz.

Thanks all for your replies so far.

This message was edited 2 times. Last update was at Oct 18. 2014 20:23

[Post New]
Youtube is not resampling to 44.1. Your browser will send the sound to windows mixer and there will be resampled by DirectSound to whatever you have specified. See below the setting.
Youtube settings here.

Your PC settings:



[Thumb - sound.png]
 Filename
sound.png
[Disk]
 Description
 Filesize
41 Kbytes
 Downloaded:
886 time(s)

This message was edited 9 times. Last update was at Oct 18. 2014 21:55

Tack [Avatar]
Newbie Joined: Jun 10, 2013 01:27 Messages: 7 Offline
[Post New]
Quote: You tube is not resampling to 44.1. Your browser will send the sound to windows mixer and there will be resampled by directsound to whatever you have specified. See below the setting.


Yeah, I appreciate that after whatever Youtube does, there can be all manner of resampling done downstream of it.

But Youtube is resampling to 44.1KHz. I've confirmed this by uploading the MKV with a LPCM 48KHz track and then downloading the transcoded MP4 file directly from Youtube (I used a tool called youtube-dl but there are all kinds of them), and verified that the MP4 file Youtube serves up had 44.1KHz audio. Ditto for 48KHz AC3.

Anyway, we've veered off the beaten path. There are other use-cases why one would want to control the sample rate of the rendered project. I guess the answer is that this can't be done with Power Director, so I should look at other software for this particular project. (I ended up using Kdenlive on Linux, which Just Worked in all the ways I needed for this simple video [a screencast].)

Cheers!
milos1 [Avatar]
Newbie Location: Slovakia Joined: Sep 06, 2011 15:49 Messages: 14 Offline
[Post New]
Hi,
I solved the same problem, as I wanted avoid resampling of audio by You tube ( it really resamples - I uploaded video from PD with 48 kHz and when I after publishing downloaded it from You tube, it had 44,1 kHz. I am talking about SD resolution, I do not know, how it is with HD videos) There are many parameters you can set in PD profiles - in Win7 the folder is here:
C:/users/name/appdata/roaming/cyberlink/powerdirector/1x.0/profile.ini
You can edit it in f.e. Notepad+ and you can set parameters not availible directly in PD (f.e. I created mp4 profile 854x480 for wide 16:9 video for You tube, my version PD11 allows only 640x480, which is 4:3 format) I wanted 44,1 kHz, so by metod trying and mistake I found out that when you set value:
<Audio SamplesPerSec>1
it produces 48kHz audio, if you set
<Audio SamplesPerSec>2
you video will have audio with 44,1 kHz.
This is not a theory, I produced videos with both 44,1 and 48 kHz.
I would be very nice to know description of each parameter, perhaps it´s possible to set many other things you can not do directly in PD. So here is f. e. my profile for mp4 You tube video in wide format 16:9 with 44,1 kHz:

<Class>MPEG-4 AVC
<Name>TV7 wide 30fps 44,1k
<Description>
854x480 800kb video 30Hz 192kb audio 44,1kHz
<Output FileName>
<DescID>11924
<NameID>18875
<Group>2
<File Format Class>11
<Video Format Class>8
<Audio Format Class>10
<Stream Flag>3
<Field Order>0
<Attribute>40083
<Video BitRate>800000
<Min BitRate>400000
<Max BitRate>1300000
<Video Quality>0
<Video Width>854
<Video Height>480
<Frame Rate>30.000000
<Profile Level>65380
<Pattern>IBPBPBPBPBPBPBPBPBPBPBPBPBPBP
<Pre Processing>0
<Resize>1
<Flip Video>0
<Speed Quality Indicator>6
<Interlacing>0
<Encoder Mode>0
<App Type>2
<Dynamic GOP>0
<Deblock>1
<EntryMode>1
<Encoder Type>32
<Audio Layer>2
<Audio Mode>2
<Audio BitRate>192000
<Audio Channels>2
<Audio SamplesPerSec>2
<Audio BitsPerSample>1
<Misc>0
<SamplesPerFrame>0
&&

This message was edited 3 times. Last update was at Oct 19. 2014 16:30

[Post New]
I tried too to download a youtube video and the sound was indeed at 44.1.
That's so stupid, since they recommend to upload videos at 48 or 96 (see my previous link).
99% of the Windows computers will have output set at 48kHz by default, so DirectSound will resample that 44.1 youtube anyway.
Tack [Avatar]
Newbie Joined: Jun 10, 2013 01:27 Messages: 7 Offline
[Post New]
Quote: I found out that when you set value:
<Audio SamplesPerSec>1
it produces 48kHz audio, if you set
<Audio SamplesPerSec>2
you video will have audio with 44,1 kHz.


Thanks milos, great first post.

I actually tried this exact thing yesterday, but it didn't work for me. I did however just now verify that it does work with the AAC encoder, but not with the LPCM encoder which is what I was trying to do.

In other words, I have to choose between MKV with 48KHz PCM or MP4 with 44.1KHz AAC.

Given how bad Youtube's downsampling evidently is, the latter would probably be better. But in cases where I want the best audio quality on Youtube, I have to conclude that Power Director isn't really suitable.

The best compromise I can think of is to produce MKV with 48KHz PCM, and then outside PD, using another tool, remux the MKV with PD's audio stream downsampled to 44.1KHz using a high quality resampler. I expect that the actual quality lost by the pointless upsample-then-downsample procedure in this workflow would be dwarfed by Youtube's conversion from PCM to AAC anyway.

In my case I was very happy with Kdenlive on Linux (which is where I spend most of my time anyway). It had no trouble at all with the source clips and actually did what I told it to do with respect to the output format. But if I wanted to do something more complicated that benefited from PD's capabilities, I'd probably live with the above compromise.

(As an aside, I couldn't believe that after downloading trial versions of about 5 different products, including Adobe Premiere Elements, every single one of them failed to import at least one of the clips I was working with for one reason or another. On Windows, only PowerDirector actually imported the source clips flawlessly!)

It's really quite frustrating how little control they give you for rendering output, and what bizarre constraints are imposed with the options they do give you. I have a ticket in with Support for this question. They replied quickly but it was clear they didn't understand my question. Maybe we'll see this improved in a future release.

Thanks everyone for your interest and help!
milos1 [Avatar]
Newbie Location: Slovakia Joined: Sep 06, 2011 15:49 Messages: 14 Offline
[Post New]
response to SoNic67 :
You are right, for a long time I had been uploading videos at recomended 48kHz untill I finally checked it (just like you have done now) and found out that they are at 44,1 khz and I was really angry at it. Therefore I have my sound card set at 44,1 now.

This message was edited 1 time. Last update was at Oct 19. 2014 17:42

milos1 [Avatar]
Newbie Location: Slovakia Joined: Sep 06, 2011 15:49 Messages: 14 Offline
[Post New]
Hi Tack,
"The best compromise I can think of is to produce MKV with 48KHz PCM, and then outside PD, using another tool, remux the MKV with PD's audio stream downsampled to 44.1KHz using a high quality resampler."

Wouldn´t be a better way producing firstly MKV video, then rendering in PD only audio as waveform 1411 kb (= PCM 44,1 kHz) and then putting them together instead of taking audio from rendered video and then resampling from 48kHz? You will get what you want but with a bit more labour then getting it directly from PD.

This message was edited 2 times. Last update was at Oct 21. 2014 15:44

Tack [Avatar]
Newbie Joined: Jun 10, 2013 01:27 Messages: 7 Offline
[Post New]
Quote: Wouldn´t be a better way producing firstly MKV video, then rendering in PD only audio as waveform 1411 kHz (= PCM) and then putting them together instead of taking audio from rendered video and then resampling from 48kHz? You will get what you want but with a bit more labour then getting it directly from PD.

Yes, true, that's a better approach. Thanks.
BrianKoz [Avatar]
Newbie Joined: Jul 17, 2017 19:03 Messages: 3 Offline
[Post New]
Quote
Quote:
FWIW, other video editors allow me to specify the samplerate of the project.


Hello, can you tell me what other video editors allow you to do this? (on Windows 7)

Also trying to get the best possible audio for one still frame image with audio projects.



Thanks!
Powered by JForum 2.1.8 © JForum Team