jackun / openencodevfw

No longer a VFW (video for windows) frontend for AMD VCE H264 encoder
58 stars 12 forks source link

Sony Vegas and openencodevfw #7

Open suppy1 opened 10 years ago

suppy1 commented 10 years ago

Hey guys.. Got a question hope you can help?

I've captured game footage with openencodevfw but when I try to open in Sony Vegas 12 it won't work? Sony Vegas refuses to open it. Anyway to make this work in sony vegas without losing quality?

jackun commented 10 years ago

You can try re-muxing it into a MP4 because with AVIs, Vegas seems to need a separately installed VFW H264 decoder too (x264vfw).

With newer ffmpeg (if MP4 compatible streams, might need extra param -map 0):

ffmpeg -i video.avi -c copy video.mp4 # copies every stream
ffmpeg -i video.avi -c:v copy -c:a copy video.mp4

Re-encode audio to MP3 (or AAC, experimental):

ffmpeg -i video.avi -c copy -c:a libmp3lame -b:a 192k video.mp4
ffmpeg -i video.avi -c copy -c:a ac3 -b:a 192k video.mp4
ffmpeg -i video.avi -c copy -c:a aac -strict -2 -b:a 192k video.mp4

Separate bitrates for separate audio streams: ffmpeg -i video.avi -c copy -c:a libmp3lame -b:a:0 192k -b:a:1 64k video.mp4

Older:

ffmpeg -i video.avi -vcodec copy -acodec copy video.mp4

E: assuming your audio is MP3/AAC/AC3

http://www.videohelp.com/tools/My-MP4Box-GUI http://ffmpeg.zeranoe.com/builds/win32/static/ https://trac.ffmpeg.org/wiki/How%20to%20use%20-map%20option

suppy1 commented 10 years ago

I was able to re-mux with My-MP4Box-GUI. Thanks for help ;)

EriksGit commented 10 years ago

I created a tool for this that lets you right click the file you want to remux and select "Remux to MP4". Here's the download: https://drive.google.com/file/d/0B1ExDVPjgmxzenhzSHJXMXQ0N0U/edit?usp=sharing

For those who just want the working command line if you have multiple audio tracks, like myself, use: ffmpeg -i input.avi -c:v copy -map 0 output.mp4

The reason you have to remove the "-c:a copy" argument is because Dxtory records audio using the PCM codec by default, and you can't use PCM in an MP4 container. So FFmpeg defaults to encode the audio in AAC format instead. The "-map 0" argument is required to remux if you have more than one audio track.

Also, be sure not to record in 5.1 or 7.1 surround, that completely breaks remuxing for me. 2.0 stereo works perfectly fine, though. EDIT I believe this happened because I used 2 different audio codecs; PCM for 2.0 stereo tracks and IEEE Float for surround tracks, and I didn't know what argument in FFmpeg to use.

suppy1 commented 10 years ago

EriksGit Thank you so much. Your little tool is going to save me from many headaches. Up to now I've been separately extracting the audio stream and in doing so had lots of sync audio problems.. Hats of to you for sharing sir :)

EriksGit commented 10 years ago

@EriksGit Any chance of source code or something? Great application but a good feature to add would be to remux the files to the same folder the original AVI file was. :)

The source code is in the install.bat, if you open it with notepad you should see all the code. Since this was written in batch, I'm slightly limited to what I can do. I don't know if the feature you suggested can be implemented, what do you think?

jackun commented 10 years ago

Who asked this seems to have deleted the comment. But if anyone else wonders, just remove move command from %ProgramFiles%\ffmpeg\bin\autoremux.bat (then mkdir is also unneeded).

Fma965 commented 10 years ago

Sorry, i was the one who posted originally but didn't realise it was a BAT file so deleted my comment to avoid looking stupid haha :) Thanks for the tip.

acidburn974 commented 9 years ago

Imgur

Here is my configuration using Dxtory, I record on 720p60fps with 2 audio channels in MP3-ACM. I have K-Lite Codec Pack installed on my PC. I hope this comment will help people. It works for me on Sony Vegas Pro 13.

IBIubbleTea commented 9 years ago

@EriksGit @jackun Just wondering but where do I put this line of code for me to hear both audio streams without having it extract it? Sorry, I'm a noobie at this.

ffmpeg -i input.avi -c:v copy -map 0 output.mp4

jackun commented 9 years ago

@IBIubbleTea You mean where to put in @EriksGit 's Auto Remuxer? It should be already doing remuxing like that.

IBIubbleTea commented 9 years ago

@jackun I just recorded a test video and this is the out come.

Original video, Can only hear in game but not mic. Converted video, Can only hear my mic and not in game

Now I'm confused. Of course if I add it to Sony Vegas, I can hear both..

jackun commented 9 years ago

That might be your media player issue. It might think they are different language audio tracks etc so only plays one at a time.

IBIubbleTea commented 9 years ago

@jackun I'm using Windows Media Player for those tests. I just tried using VLC for the original and converted one and I can only hear in game for both, This is weird.

jackun commented 9 years ago

In VLC switch audio from menu Audio > Audio Track. I've never needed this so you'll have to google if VLC can play multiple audio tracks simultaneously though some suggest WMP should play all tracks.

E: Guess not.

IBIubbleTea commented 9 years ago

Thanks for your help. I guess I will have to live with it. Until it's fixed or something.Like I used Largarith in the past and I have no problem with it, I can hear both audio tracks in windows media player..

jackun commented 9 years ago

If it worked then, it should work now too though. Maybe you have installed a custom AVI splitter so with that even WMP doesn't play audio tracks simultaneously.

IBIubbleTea commented 9 years ago

I mean Lagarith works and still does just not VCE

jackun commented 9 years ago

Yep, if you hear both audio tracks with lagarith, you should hear with VCE encoded h264 video too. You can try using MPC-HC and in Play > Filter menu (or right click) it shows what splitter/decoder filters it is using (and what WMP should be using too) and see what it does differently there. MPC-HC has some built-in decoders/splitters too though so it might be using them instead. You can disable them in options though for feature parity with WMP.

IBIubbleTea commented 9 years ago

I don't know anymore. I can't seem to figure it out. I'll just leave it and if I want to edit something, I'll just open it up in Sony Vegas