VidsOpt v0.2.4 - Fast MP4 Muxer/Converter

e.mote

Senior Member
Feb 16, 2011
2,165
892
0
@techpal

Make sure AVISynth is installed to "AVISynth 2.5" folder, and that you have the 0.1.1 updated script.

The "can't find audio stream" error is typically because either FFDshow wasn't installed (or the AC3/DTS/AAC support wasn't enabled), or AVISynth can't be accessed.

Try different videos and see if any work. Post their specs, by selecting the View Specs option from the menu to get a specs dump.
 

e.mote

Senior Member
Feb 16, 2011
2,165
892
0
@Kippui

Thanks for the updated speed report. When no video recoding is involved, the speed bottleneck is how fast it can read/write to the drive. Your first video took less time than the second since it was already read once (on your unsuccessful attempt) and is still cached.

Your avg is around 6 mins for a 1-hr video, which is about the same as what I've seen, about 10X. If video recoding is involved, depending on the resolution and the system CPU, it will drop to anywhere from 1X to 5X.
 

Kippui

Senior Member
Jan 1, 2011
595
37
0
uh i just sat down and tried to watch one of my videos

it lags after a few minutes which sucks

can the xoom play HighL5.1? I'm just going to try and force a re encode for my files
 

e.mote

Senior Member
Feb 16, 2011
2,165
892
0
If it's for TV shows, I'd suggest using a smaller res like 800 (or even 640). Use HD for major releases where the higher res has more of an impact. Read the FAQ for more details.
 

Kippui

Senior Member
Jan 1, 2011
595
37
0
If it's for TV shows, I'd suggest using a smaller res like 800 (or even 640). Use HD for major releases where the higher res has more of an impact. Read the FAQ for more details.
Ok I guess five minute jobs was to good to be true.

/sigh Tegra 2
 

e.mote

Senior Member
Feb 16, 2011
2,165
892
0
It depends on the content. Many of the "downloadable" content use excessive settings, at least with respect to mobile devices. Some should play OK w/o recoding.

For those that don't play smoothly, the simplest solution is set Recode=YES to recode the video. The Tegra 2 will play most 720p high profile video with a sane setting.

Video recoding can take a while. Read the TIPS section in the FAQ (2nd post in the thread) for more and arguably better options.

For testing, suggest using short clips like movie trailers and Youtube HD music videos. Once you know what works for you, batch drop all the videos at once and leave the PC running. Even at a slow 2X speed, that's 48 1-hr eps for one day, or about two seasons' worth.

If you're running 64-bit Windows, remember to grab the 64-bit x264.exe executable here (http://x264.nl). Get the 8bit-depth exe, not the 10bit one. You'll get 10-15% faster recoding speed.

[This is listed in the Notes section of the OP, but most will probably miss it.]
 
Last edited:

e.mote

Senior Member
Feb 16, 2011
2,165
892
0
Probable cause is AVISynth can't be accessed, since it's used to get the audio.

To find out if AVISynth is active, put the below line into a text file,

DirectShowSource("path\movie.mkv")


fill in quoted part with actual path & filename, and save it as TEST.AVS. Load this text file into a media player (not VLC). If it plays the movie, AVISynth is active. If it doesn't, it's not.

After that, it's up to you. Try it on another PC. Good luck.
 

chungylau

Senior Member
Feb 13, 2011
59
4
0
Thanks for a great script, it works well with most of my videos. The results look very good on the Transformer.

I keep running into a problem with rmvb files, though. Yes, I know, why use that format. Some of my rmvb files convert correctly, but the majority of them show errors from your script:

Cannot find audio stream!
Could not parse WAV file.

Here is the video specs dump on the file:
***
Video
ID : 1
Format : RealVideo 4
Codec ID : RV40
Codec ID/Info : Based on AVC (H.264), Real Player 9
Duration : 44mn 6s
Bit rate : 487 Kbps
Width : 512 pixels
Height : 384 pixels
Display aspect ratio : 4:3
Frame rate : 25.000 fps
Bits/(Pixel*Frame) : 0.099
Stream size : 154 MiB (91%)

Audio
ID : 0
Format : Cooker
Codec ID : cook
Codec ID/Info : Based on G.722.1, Real Player 6
Duration : 44mn 7s
Bit rate : 44.1 Kbps
Channel(s) : 2 channels
Sampling rate : 22.05 KHz
Bit depth : 16 bits
Stream size : 13.9 MiB (8%)
***

Any idea what is going on? Thanks. BTW, Handbrake will not take rmvb files as sources, so I cannot use that for conversion.
 

e.mote

Senior Member
Feb 16, 2011
2,165
892
0
Do you have the Real Alt codec pack installed? Can you play RMVB in either WMP or MPC-HC (not VLC)?

If some RMVBs convert and some don't, it could be a (de)muxing problem. Try muxing to MKV (FAQ Q#4) before feeding it to the script.

Handbrake should work for RMVB, since RM codecs are supported. If it doesn't recognize the RMVB container, mux it to MKV per above.
 

chungylau

Senior Member
Feb 13, 2011
59
4
0
Do you have the Real Alt codec pack installed? Can you play RMVB in either WMP or MPC-HC (not VLC)?

If some RMVBs convert and some don't, it could be a (de)muxing problem. Try muxing to MKV (FAQ Q#4) before feeding it to the script.

Handbrake should work for RMVB, since RM codecs are supported. If it doesn't recognize the RMVB container, mux it to MKV per above.
Yes, the real alternatives codecs are installed, and I can play those files in Media Player Classic perfectly. I tried feeding the rmvb file to the mkvmerge, but it will not accept the file, saying that it does not contain any tracks.
 

e.mote

Senior Member
Feb 16, 2011
2,165
892
0
Edit script. Search for this line

for %%b in (mkv avi mpg mpeg rm rmvb ogm) do if /i "%vExt%"==".%%b" (

and change to

for %%b in (mkv avi mpg mpeg ogm) do if /i "%vExt%"==".%%b" (


Search for this line

for %%b in (wmv flv) do if /i "%vExt%"==".%%b" call :.AVSAudRecode "%_in%" "%_aNorm%"

and change to

for %%b in (wmv flv rm rmvb) do if /i "%vExt%"==".%%b" call :.AVSAudRecode "%_in%" "%_aNorm%"

Let me know if it works.
 

chungylau

Senior Member
Feb 13, 2011
59
4
0
Edit script. Search for this line

for %%b in (mkv avi mpg mpeg rm rmvb ogm) do if /i "%vExt%"==".%%b" (

and change to

for %%b in (mkv avi mpg mpeg ogm) do if /i "%vExt%"==".%%b" (


Search for this line

for %%b in (wmv flv) do if /i "%vExt%"==".%%b" call :.AVSAudRecode "%_in%" "%_aNorm%"

and change to

for %%b in (wmv flv rm rmvb) do if /i "%vExt%"==".%%b" call :.AVSAudRecode "%_in%" "%_aNorm%"

Let me know if it works.
I did that. The script now completes the conversion, so that is good, thanks! However, the audio and the video are way out of sync, by more than 5 seconds, with the audio leading the video.

I will run some more rmvb conversions and see if this is a general problem.
 

e.mote

Senior Member
Feb 16, 2011
2,165
892
0
Let me know, a) if the AV desync is widespread among your RMVBs, b) if the desync is the same 5s or by differing amounts, and c) if the desync is by the same 5s duration at the end of the clip as at the beginning, i.e. if it's a linear desync or a progressive (gets worse) desync.

If it's only for isolated cases, you can manually adjust sync by dropping the newly-made MP4 into MKVMerge. Select audio track, select 'Format specific options' tab, and enter 'Delay' value. Ex: If audio runs 5s before video, value = 5000. Mux to MKV. Then feed MKV back into the script for a fast remux to MP4.
 

tsunami1609

Senior Member
Sep 5, 2009
156
12
0
Pittsburgh, PA
I don't know if it's just me, but 1080p converted videos seem to work better than 720p ones. I tested it out with Avatar, both with a baseline configuration and both with a video quality of 20, and the 720p version lags a ridiculous amount and the 1080p one doesn't lag at all. I only saw one hiccup in the entire movie.

Is there a reason for this, or is my Xoom just weird?
 

chungylau

Senior Member
Feb 13, 2011
59
4
0
Let me know, a) if the AV desync is widespread among your RMVBs, b) if the desync is the same 5s or by differing amounts, and c) if the desync is by the same 5s duration at the end of the clip as at the beginning, i.e. if it's a linear desync or a progressive (gets worse) desync.

If it's only for isolated cases, you can manually adjust sync by dropping the newly-made MP4 into MKVMerge. Select audio track, select 'Format specific options' tab, and enter 'Delay' value. Ex: If audio runs 5s before video, value = 5000. Mux to MKV. Then feed MKV back into the script for a fast remux to MP4.
Unfortunately it's a progressive desync: in the beginning of the file, the sync error is small, but at the end, it is big. This happens to two separate rmvb files that I converted.
 

e.mote

Senior Member
Feb 16, 2011
2,165
892
0
@tsunami1609

Try a hard reset before playing each version. This should minimize variations in system load.

@chungylau

PM me a sample clip.
 

e.mote

Senior Member
Feb 16, 2011
2,165
892
0
The cause of desync was that the RMVB clip is variable framerate (VFR), and as stated the script didn't handle VFR.

Until I can find a reliable tool to detect VFR, use this workaround for RMVB conversion.

. Include the two edits in my previous post.

. Search for this line

"%vHome%\x264" --quiet %_xParams% %_vFilter% -o "%stemp%\%rnd%vid.264" --fps %_vFPS% "%_in%"

and change to

"%vHome%\x264" --quiet %_xParams% %_vFilter% -o "%stemp%\%rnd%vid.264" --muxer mp4 "%_in%"

Save this edited version to a separate copy, and use it for RMVB only. Use the original version for non-RMVBs.

Let me know if it works.
 

chungylau

Senior Member
Feb 13, 2011
59
4
0
The cause of desync was that the RMVB clip is variable framerate (VFR), and as stated the script didn't handle VFR.

Until I can find a reliable tool to detect VFR, use this workaround for RMVB conversion.

. Include the two edits in my previous post.

. Search for this line

"%vHome%\x264" --quiet %_xParams% %_vFilter% -o "%stemp%\%rnd%vid.264" --fps %_vFPS% "%_in%"

and change to

"%vHome%\x264" --quiet %_xParams% %_vFilter% -o "%stemp%\%rnd%vid.264" --muxer mp4 "%_in%"

Save this edited version to a separate copy, and use it for RMVB only. Use the original version for non-RMVBs.

Let me know if it works.
I made the edits on the modified file, and the desync's are mostly gone. Thanks!

I converted another rmvb file. The original is 720 pixels wide, so I picked 800 in the script. The resulting file is 50% larger, and it does not play as smoothly as the original. I need to play with the other settings a bit more to see if there is any improvements to be made.