|
|
| malky |
| Posted: Jul 13 2013, 03:48 PM |
 |
|
Advanced Member
  
Group: Members
Posts: 290
Member No.: 22386
Joined: 6-November 07

|
Using the settings posted by stephanV, I cannot get any output. Using input files: avi with mp3 and mpeg with ac3
| QUOTE | LAME (MP3) - Homepage / Binary Audio input format: WAV Output filename: %(outputname).mp3 Example command argument: QUOTE -V6 - "%(tempaudiofile)" |
The log shows this:
| QUOTE | | Audio Enc:Unsupported data format: 0x0055 |
My actual settings here (the audio setting for input is 'wav'. Tried two versions of lame from the listed site, neither working.

|
 |
| malky |
| Posted: Jul 13 2013, 05:09 PM |
 |
|
Advanced Member
  
Group: Members
Posts: 290
Member No.: 22386
Joined: 6-November 07

|
Solved: I set the audio to uncompressed (from the Audio menu) then saved the file using the external codec as mp3. I was under the impression that virtualDub was sending the audio that way - ten hours I'll never get back. |
 |
| Altaf |
| Posted: Jul 13 2013, 05:44 PM |
 |
|
Advanced Member
  
Group: Members
Posts: 75
Member No.: 36396
Joined: 9-April 13

|
Очень прошу, кто может переведите пожалуйста, это для всех важно! Как правило, кодирую в Lame MP3. Давно хочу написать. При обработке постоянно в конце видео, аудио режется немного больше, звук кончается раньше. И если приходиться соединять разные куски, обязательно происходит рассинхрон. Можно убедиться если такие файлы загрузить в видео редакторы, в которых можно "увидеть" аудио амплитуду. Нельзя ли как то это устранить. Возможно как то задать, чтобы в конце файла, при последней резки место резки аудио отодвигалось вправо, чем место резки видео, на несколько миллисекунд (это можно бы определить опытным путем). Т.е. специально задать аудио чуть длиннее, чем видео, тогда звук и видео получились бы ровными. Возможно как вариант, задать это отдельно. Например, так же как задается смещение. Спасибо. |
 |
| DarrellS |
| Posted: Jul 16 2013, 05:53 AM |
 |
|
Advanced Member
  
Group: Members
Posts: 567
Member No.: 1061
Joined: 28-November 02

|
| QUOTE (malky @ Jul 13 2013, 08:48 AM) | Using input files: avi with mp3 and mpeg with ac3
|
If you're using input files with mp3 or ac3, you can passthrough the audio with ffmpeg as the audio encoder without re-encoding.
Here is a passthrough vdprof file. Copy text into notepad and save as passthrough.vdprof in C:\Tools and under External Encoders, choose Import and select the vdprof file and click Open.
| CODE | { "description": "VirtualDub external encoder profile collection", "externalEncoders": { "sets": { "AC3_Pass_M": { "videoEncoder": "264_M", "audioEncoder": "ac3pass", "multiplexer": "MKVmerge", "description": "mkv", "extension": "mkv", "processPartial": false, "useOutputAsTemp": false }, "MP3_Pass_M": { "videoEncoder": "264_M", "audioEncoder": "mp3pass", "multiplexer": "mmg-mp3-pass", "description": "mkv", "extension": "mkv", "processPartial": false, "useOutputAsTemp": false }, }, "profiles": { "264_M": { "name": "264_M", "program": "C:\Tools\x264.exe", "commandArguments": "--crf 18 --preset medium --tune film --demuxer raw --input-csp i420 --input-res %(width)x%(height) --fps %(fpsnum)/%(fpsden) -o \"%(tempvideofile)\" -", "outputFilename": "%(outputname).264", "type": 0, "inputFormat": 0, "checkReturnCode": true, "logStdout": true, "logStderr": true, "bypassCompression": false, "predeleteOutputFile": false }, "ac3pass": { "name": "ac3pass", "program": "C:\ffmpeg.exe", "commandArguments": "-i - -acodec copy \"%(tempaudiofile)\"", "outputFilename": "%(outputname).ac3", "type": 1, "inputFormat": 0, "checkReturnCode": true, "logStdout": true, "logStderr": true, "bypassCompression": false, "predeleteOutputFile": false }, "MKVmerge": { "name": "MKVmerge", "program": "C:\Program Files\MKVToolNix\mkvmerge.exe", "commandArguments": "-o \"%(outputname)\" --default-duration 0:%(fpsnum)/%(fpsden)fps \"%(tempvideofile)\" \"%(tempaudiofile)\"", "outputFilename": "%(outputname).audio", "type": 2, "inputFormat": 0, "checkReturnCode": true, "logStdout": true, "logStderr": true, "bypassCompression": false, "predeleteOutputFile": false }, "mp3pass": { "name": "mp3pass", "program": "C:\Tools\ffmpeg-20130624-git\ffmpeg.exe", "commandArguments": "-i - -acodec copy \"%(tempaudiofile)\"", "outputFilename": "%(outputname).mp3", "type": 1, "inputFormat": 0, "checkReturnCode": true, "logStdout": true, "logStderr": true, "bypassCompression": false, "predeleteOutputFile": false }, "mmg-mp3-pass": { "name": "mmg-mp3-pass", "program": "C:\Program Files\MKVToolNix\mkvmerge.exe", "commandArguments": "-q -o \"%(outputname)\" --default-duration 0:%(fpsnum)/%(fpsden)fps \"%(tempvideofile)\" \"%(tempaudiofile)\"", "outputFilename": "%(outputname).audio", "type": 2, "inputFormat": 0, "checkReturnCode": true, "logStdout": true, "logStderr": true, "bypassCompression": false, "predeleteOutputFile": true }, |
Replace with the directory of your x264.exe, ffmpeg.exe and mkvmerge.exe files and make sure audio is set to direct stream copy. Raw Audio Data - Bypass Compression False for passthrough.
To encode audio you use full processing mode with audio set to Wav and bypass compression True. |
 |
| malky |
| Posted: Jul 16 2013, 02:24 PM |
 |
|
Advanced Member
  
Group: Members
Posts: 290
Member No.: 22386
Joined: 6-November 07

|
Thank you for this script. At line 22 there seems to be a syntax error (two end brackets?)
Edit!!Forget that, it was my typing error when changing the location for the encoders.
|
 |
| raffriff42 |
| Posted: Jul 16 2013, 07:09 PM |
 |
|

Advanced Member
  
Group: Members
Posts: 384
Member No.: 35081
Joined: 25-June 12

|
DarrellS, another nice encoder set. But your word processor is mangling the strings, I think - why aren't backslashes (\) doubled (\\) in program paths? |
 |
| DarrellS |
| Posted: Jul 17 2013, 12:37 AM |
 |
|
Advanced Member
  
Group: Members
Posts: 567
Member No.: 1061
Joined: 28-November 02

|
Maybe a better question is why is it inserting backlashes in the command arguments. They are not in my original encoder sets. I first noticed it when I tried to use Budman's vdprof and none of the ffmpeg ones worked. I assumed because they all had backslashes in the command argument. None of my original sets or any on the guide page have those backlashes but all the ones in the vdprof file have backlashes.
This seems to be a bug with the export function in the external encoder unless it places the \\ on purpose in case there is a space in path since DOS or cmd.exe doesn't like spaces.
I'm using notepad++ to copy and paste because it keeps the formatting but it's the export function in Virtualdub that is placing the \ and \\. I went through and manually removed the backslashes in Budman's vdprof but when I exported it, they all came back.
Wait a minute, you asked why aren't they doubled (\\)? I assume because they are in quotes "path" which allows spaces (I believe). That's all I can figure. Most of my file paths are folders with out spaces on purpose except where I have to use program files. Another reason that C:\Tools is a better option than C:\My Unzipped Program Files\Virtualdub-1.10.3\External Encoder\Encoders\encoder.exe. Now that I know that ffmpeg is working right, I'll move it to C:\ to use it as my default ffmpeg for Windows and change my path in the encoder sets to C:\ffmpeg.exe. It makes everything a lot cleaner. Short and sweet.
EDIT: I don't know. I can't figure it out. I just cleaned everything up and moved everything into C:\ and C:\Tools and there is no method to it's madness. Some have C:\\encoder, some have "folder\\encoder", and some just have "encoder". Doesn't matter if I open them in notepad or notepad++. I don't see any with a single slash though so it must be the website software? |
 |
| raffriff42 |
| Posted: Jul 17 2013, 01:33 AM |
 |
|

Advanced Member
  
Group: Members
Posts: 384
Member No.: 35081
Joined: 25-June 12

|
All the strings seem to follow C escape rules, same as in Sylia (aka vdscript): | QUOTE | Strings must be double quoted, but may contain the following C escapes: \a, \b, \f, \n, \r, \t, \v, \xhh, \\, \" |
To sidestep this confusing issue, I think in the future we should advise people to import the .vdprof, then update each program location in the GUI... 1. Options menu, External encoders 2. Encoders tab 3. Click on each item in the list and browse to the proper program location. 4. Hit OK, repeat... |
 |
| raffriff42 |
| Posted: Jul 17 2013, 09:05 AM |
 |
|

Advanced Member
  
Group: Members
Posts: 384
Member No.: 35081
Joined: 25-June 12

|
> Solved: I set the audio to uncompressed (from the Audio menu) then saved the file using the external codec as mp3. Here's the problem (too late to help you, malky; sorry): Bypass compression needs to be enabled (edit external audio encoder, Audio tab).
Looking over recent (that is, successful) audio encoder settings (not including pass through types) from DarrellS and myself, Bypass compression is always on and Input format is always WAV. |
 |
| malky |
| Posted: Jul 17 2013, 09:37 AM |
 |
|
Advanced Member
  
Group: Members
Posts: 290
Member No.: 22386
Joined: 6-November 07

|
That's better - but note that the previous post from DarrellS, seems to imply changing the setting in the main VirtualDub Audio menu also - or am I reading more into it than is required.
| QUOTE | | To encode audio you use full processing mode with audio set to Wav and bypass compression True. | |
 |
| raffriff42 |
| Posted: Jul 17 2013, 10:53 AM |
 |
|

Advanced Member
  
Group: Members
Posts: 384
Member No.: 35081
Joined: 25-June 12

|
To encode audio you use full processing mode with audio set to Wav and bypass compression True. DarrellS is referring to external encoder setup. I don't *think* you ever need to turn off compression in the VirtualDub menus to use external encoders, as long as you enable "bypass compression." Note I'm reversing my previous opinion, posted elsewhere on the web. |
 |
|