Printable Version of Topic
Click here to view this topic in its original format
Unofficial VirtualDub Support Forums > General Discussion > Impossible Transcode 5.1


Posted by: Celes Jun 17 2014, 07:10 PM
Hi every body.

I'm trying to adjust audio track in a film.
I use the filter Time stretch.

The original track is AAC 5.1 = 6 channels, 48000 Hz, 384 kbps.

1 - VirtuaDub does NOT support AAC format, first big weakness. And a lot of people seem to rip discs with that.

So I use Freemake Audio Converter to convert it in AC3 5.1.

And when I want to reencode into AC3 5.1, IT BUGS !!!

"Error initializing audio stream compression:
No installed audio codec could compress the source audio to the desired format."

But when I encode into Stereo (2 channels) and reencode into 5.1, it works !
But it f***s the quality !

Even with PCM (no compression), MY AUDIO IS CONVERTED IN 2 CHANNELS !!!
Even when I set to conserv the channels in the menu Audio > Conversion...
(Check with Audacity)

2 - How can I transcode 5.1 => 5.1 without f***ing down my quality ?

After making tests, IT IS OBVIOUS : VIRTUALDUB DOES NOT SUPPORT MORE THAN 2 CHANNELS.

So what is the interest of AC3 and other format ?

Posted by: raffriff42 Jun 17 2014, 10:31 PM
You are correct that VirtualDub cannot handle this task. Swearing does not help.

Solution: create your sound track in an external application & mux back into final video with ffmpeg on the command line.
CODE
ffmpeg.exe -i "video.mp4" -i "audio.ac3" -c copy -map 0:0 -map 1:0 "video2.mp4"



Posted by: -vdub- Jun 17 2014, 10:38 PM
QUOTE (Celes @ Jun 17 2014, 07:10 PM)
After making tests, IT IS OBVIOUS : VIRTUALDUB DOES NOT SUPPORT MORE THAN 2 CHANNELS.



Virtualdub does support 5.1 try using with with either one of these decoders instead..


FFmpeg Input Driver
http://sourceforge.net/projects/virtualdubffmpeginputplugin/files/

Or

Fcchandlers Quicktime Plugin
http://sourceforge.net/projects/fcchandler/files/

Posted by: Celes Jun 18 2014, 01:06 PM
QUOTE (raffriff42 @ Jun 17 2014, 10:31 PM)
You are correct that VirtualDub cannot handle this task. Swearing does not help.

Solution: create your sound track in an external application & mux back into final video with ffmpeg on the command line.
CODE
ffmpeg.exe -i "video.mp4" -i "audio.ac3" -c copy -map 0:0 -map 1:0 "video2.mp4"

Sorry, I was hangry because I spend my entire day on this problem, and I lost lot of time because of that, before understanding the problem.

Posted by: Celes Jun 18 2014, 01:11 PM
QUOTE (raffriff42 @ Jun 17 2014, 10:31 PM)
You are correct that VirtualDub cannot handle this task. Swearing does not help.

Solution: create your sound track in an external application & mux back into final video with ffmpeg on the command line.
CODE
ffmpeg.exe -i "video.mp4" -i "audio.ac3" -c copy -map 0:0 -map 1:0 "video2.mp4"

Your solution won't be enough, because I need to transcode using filters.

Blu-ray use 25 FPS for better quality, I want to include an audio track encoded in 29,3 FPS, so I need
AC3 5.1 => VirtualDub filter "Time Stretch" => AC3 5.1
(= transcoding)

Actually, Virtualdub make that :
AC3 5.1 => VirtualDub filter "Time Stretch" => AC3 2.0 => AC3 5.1
The audio tracks are melted, and the new 5.1 has only 2 tracks and the 4 others are empties, it downgrades the quality.

Posted by: Celes Jun 18 2014, 01:12 PM
QUOTE (-vdub- @ Jun 17 2014, 10:38 PM)
QUOTE (Celes @ Jun 17 2014, 07:10 PM)
After making tests, IT IS OBVIOUS : VIRTUALDUB DOES NOT SUPPORT MORE THAN 2 CHANNELS.



Virtualdub does support 5.1 try using with with either one of these decoders instead..


FFmpeg Input Driver
http://sourceforge.net/projects/virtualdubffmpeginputplugin/files/

Or

Fcchandlers Quicktime Plugin
http://sourceforge.net/projects/fcchandler/files/

Thank you.

I ever tried Quicktime Plugin (and I hated it ^^), I'll try ffmpeg, it could work.

I will post the result here.

Posted by: Celes Jun 21 2014, 04:43 PM
Nothing changed.

I copied files in folder "Plugin32", but the plugin doesn't appear in my windows's plugin (only directshow plugin), it's normal I guess.

I open my video file (direct stream copy), Audio from another file > AC3 5.1 (320 kbps) + Full processing mode,
I use the AC3-ACM codec (same : ac3 5.1 320 kbps) to transcode and it doesn't want.

But if I select AC3 stereo 320 kbps, there's no problem.

What did I do wrong ?

FFMPEG is used automatically or I have to select it ? Where ?
Must I install FFMPEG.exe somewhere and register it as external decoder and encoder ?

Please help...

Posted by: raffriff42 Jun 21 2014, 08:40 PM
I agree, for "audio from another file," I have tried the DirectShow and the AC3 plugin and neither seems to support more than 2 channels. You can open a multichannel WAV file and encode it as AC-3 multichannel with the https://sourceforge.net/projects/fcchandler/files/


QUOTE (raffriff42 @ Jun 17 2014, 10:31 PM)
Your solution won't be enough, because I need to transcode using filters.
What I was proposing was: do your audio processing with an external program (I like Audacity), save as audio-only, then mux (combine, using stream copy) the audio and video to a new file. This works as long as your audio has the same duration as the original and you select a compatible audio format (if the formats are not compatible, ffmpeg will refuse).

I recently wrote a little (free, open source) GUI wrapper for this, called http://sourceforge.net/projects/muxem/, so you won't have to type command lines or write batch files.

Posted by: Celes Jun 21 2014, 09:35 PM
Maybe I have another idea.

Maybe the problem is on the plugin, and not on FFmpeg...

Seems that the sound can be uncompressed, the problem is in the encoder.
And the error message is about the compressor.

Maybe I could go in
Virtualdub > Options > External Encoders > Add
And set an entry on an external "FFmpeg.exe" with the good command line.

Could it work ?

But I don't understand the parameters of FFmpeg, it is complicated.

How must I name input stream and output stream in the command line?
I need AC3 5.1 320 kbps, and I need to make it louder with 15 dB.

I see things like that...
-acodec ac3
-ac[:stream_specifier] 6

What must I write?

Posted by: raffriff42 Jun 21 2014, 11:11 PM
Can you post a http://forums.virtualdub.org/index.php?act=ST&f=4&t=22246&hl=&#entry95729 for the audio file you are having trouble with? It's possible the number of channels, sample rate or bit rate is not supported by the AC3 plugin*

I can encode multichannel AC3 successfully as long as I convert my audio file to WAV before attempting to open in VirtualDub.

*EDIT these settings are definitely compatible:
Channels: 2, 4, 5.1 or 6
Sample rate: 44100 or 48000
Bit depth: 16 bits

Posted by: Celes Jun 22 2014, 02:50 PM
It's the japanese soundtrack of Ghost in the Shell 2.0 (encoded in 23,967 5.1) I want it in 25 FPS 5.1.

I could try to convert in wav file with freemake audio converter, and reencode it in AC3 5.1 but I let it down.
I donwmixed in stereo.
I have other things to do.

Thank you for your answers.

Powered by Invision Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)