AMVbe 1.2 Now in Beta

This forum is for questions and discussion of all the aspects of handling your footage. If you have questions about capturing/ripping footage, AviSynth, or compression/encoding/converting, look here.

Re: AMVbe 1.0 Beta2 - Batch Converter for amvs (Need testers)

Postby Bakadeshi » Mon Dec 07, 2009 2:07 pm

Corran wrote:Also, Is the PS3 console profile suppose to work in this build? I've added files to the queue but when I tell it to start nothing seems to happen. When I add the queued encodes to the batch job queue and have that start, all of the files instantly get the status "done".


oh right I didn't finish the ps3 section yet, so its currently disabled :oops: it'll take me a bit to release the next version because i'm redoing the code for the entire section that handles profiles and such to make it easier to edit and cutdown on unnessisary duplicate coding. i'm making it more modular so that i can change something once to effect all the profiles, rather than me having to change everything in each profile sperately, how I had it set up previously.
User avatar
Bakadeshi
Abuses Spellcheck
 
Joined: 29 Sep 2003
Location: Atlanta, GA

Re: AMVbe 1.0 Beta2 - Batch Converter for amvs (Need testers)

Postby Vanity » Sat Dec 19, 2009 4:53 pm

my brain hurts reading all this :|....i'll grab this sounds useful! :up:
User avatar
Vanity
 
Joined: 28 Dec 2007
Location: Everywhere, yet no where
Status: XIII

Re: AMVbe 1.1.alpha5 - Batch Converter for amvs

Postby Bakadeshi » Fri Jan 08, 2010 1:16 am

Updated first post with new version.

This is mainly what I need testing for:

Iphone/Android profile, if any of the advance settings break the encode for the phone, and if the quality/speed slider works aswell.
Any Motorola Droid/ Google Nexus owners who want to help me create a higher quality profile to take full advantage of the phone's hardware, let me know aswell.

DVD loading also needs testing and any suggestions on the interface you want to give.

Keep in mind Job Batch processing doesn't yet work right with the new code. If you need batch processing stick with the old beta for now. (its included in the package, and should work with the new mencoder fine, except for the PSP profile. to get psp working no8x8dct needs to be added to the command line for the newer versions of mencoder.)
User avatar
Bakadeshi
Abuses Spellcheck
 
Joined: 29 Sep 2003
Location: Atlanta, GA

Re: AMVbe 1.1.alpha5 - Batch Encoder for anime and amvs

Postby Corran » Fri Jan 08, 2010 12:49 pm

I set the type to Portable Devices -> Smart Phones, dragged Shattered Dreams into the input files area and hit Run Job. My computer dropped out of Aero mode, went back to Aero mode, and generated the following exception:

Code: Select all
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ComponentModel.Win32Exception: The system cannot find the file specified
   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
   at AuN_FLV_Converter.globals.GetFrameSize(ProcessStartInfo p)
   at AuN_FLV_Converter.globals.GetAspect(String file)
   at AuN_FLV_Converter.globals.RunJobTask(String file, Int32 type, Int32 profile, Int32 Total, Int32 i, Int32 RunType, String MediaType)
   at AuN_FLV_Converter.Form1.Button1_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
----------------------------------------
AMVbe
    Assembly Version: 1.1.0.0
    Win32 Version: 1.1.0.0
    CodeBase: file:///F:/Desktop/AMVbe_1.1.Alpha5/AMVbe.exe
----------------------------------------
Microsoft.VisualBasic
    Assembly Version: 8.0.0.0
    Win32 Version: 8.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Runtime.Remoting
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.



Further testing shows this happens regardless of the video file and profiles I choose.


I noticed that the program is somehow still using the configurations I setup in the previous beta, could this be related? The exception mentions that a file isn't found but I'm not sure what file it refers to.
User avatar
Corran
 
Joined: 14 Oct 2002

Re: AMVbe 1.1.alpha5 - Batch Encoder for anime and amvs

Postby Bakadeshi » Fri Jan 08, 2010 10:05 pm

I just came in here to post about that ;p

Its because I left an old subroutine in there that accessed ffmpeg.exe after i removed it from the package. I've reuploaded the package with the fixed exe file in it, and also added better error handling code to the runprocess subroutine so it will output the error to the log file if any files are missing in the future.

Just redownload the same link in the first post and all should be well.

The only thing I was still using ffmpeg for was to get the frame size and aspect ratios from files, but I found a much better/cleaner way to get that info using "Mplayer -identify -frames 0"


About the Aero thing, It seems like mplayer is causing that. Not sure why yet, but I'll try and find out if theres some way around that, but my dev machine is not windows7, so testing is a little harder for me. Its just a minor annoyance though, it doesn't effect the program functionally.

Update: Upon further research it appears it is the directx output driver for mplayer that causes aero to shutoff while mplayer is running. Try this version if you can and let me know if it still kicks you out of aero when encoding: http://www.shinrasoft.com/amvbe/amvbe.exe I added -vo null to the mplayer -identify command which hopefully should fix that by causing it to not use an output driver at all to get the information about the file.
User avatar
Bakadeshi
Abuses Spellcheck
 
Joined: 29 Sep 2003
Location: Atlanta, GA

Re: AMVbe 1.1.alpha5 - Batch Encoder for anime and amvs

Postby Corran » Sat Jan 09, 2010 12:11 am

That fixes it, though it happens again right after the x264 encoding finishes. Are you extracting the audio with mplayer? You may need to update that section as well.

I tried encoding a video for my phone but when I play it back the screen stays black while the audio plays. The file plays back fine in Windows.
User avatar
Corran
 
Joined: 14 Oct 2002

Re: AMVbe 1.1.alpha5 - Batch Encoder for anime and amvs

Postby Bakadeshi » Sat Jan 09, 2010 2:33 pm

Ok I added 2 compatibility mode profiles in there, marked CM1 and CM2 with certain advanced features disabled, see if any of these play on your android.

http://www.shinrasoft.com/amvbe/amvbe.exe (it should be marked "Alpha 5.3")
User avatar
Bakadeshi
Abuses Spellcheck
 
Joined: 29 Sep 2003
Location: Atlanta, GA

Re: AMVbe 1.1.alpha5 - Batch Encoder for anime and amvs

Postby Corran » Sat Jan 09, 2010 6:42 pm

Hmm... both compatibility modes produce an image on the android, but neither in a good way.

CM1 renders on my phone at about 1 frame every 2-4 seconds with corruption noticeable on some frames.

CM2 renders at a good frame rate but there is a massive amount of corruption in playback. A large number of small squares appear randomly throughout playback and it sometimes appears as though a keyframe wasn't rendered at certain points.

The files from both modes play back fine on a computer.


These are the settings I've used for my phone in the past with no issues.
Code: Select all
subme=6:analyse=p8x8,b8x8,i4x4,p4x4:no-ssim:no-cabac:pass=1:threads=auto
User avatar
Corran
 
Joined: 14 Oct 2002

Re: AMVbe 1.1.alpha5 - Batch Encoder for anime and amvs

Postby Bakadeshi » Sun Jan 10, 2010 10:55 am

Corran wrote:These are the settings I've used for my phone in the past with no issues.
Code: Select all
subme=6:analyse=p8x8,b8x8,i4x4,p4x4:no-ssim:no-cabac:pass=1:threads=auto

does these settings work fine with the newest version of mencoder? (try them with the mencoder in my package for example...)

I've updated the .exe file again making the command closer to yours, (main difference was I had analyse=all and didn't have no-ssim) and took out some of the other flags to make them use the defaults. If none of the profiles still work, try the CM3 i added with bframes set to 0, Although android is supposed to support bframes, I just want to isolate the problem a little more. if it works on this, then it has to be one of the new bframe related options.

Also, have you tried it with the slider set to faster? (so it uses less aggressive subme, me, and ref settings, though I don't think this is the problem, as the default position should be the same as the older version that worked for you before. )

Also can you tell me what kind of phone you have and the software you are using to play video in android?
User avatar
Bakadeshi
Abuses Spellcheck
 
Joined: 29 Sep 2003
Location: Atlanta, GA

Re: AMVbe 1.1.alpha5 - Batch Encoder for anime and amvs

Postby Corran » Sun Jan 10, 2010 7:51 pm

I dropped your version of mplayer into my batch encoder and the resulting video files were like the first ones I tested in your new alpha: no video, just audio; played fine on PC.

I'll try out CM3 if you still want me to, but with that test it seems now like the problem is not related.

On a config note, I used the analyze=all config option in my batch encoder (before swaping with your executables) and it resulted in an unplayable file on android.


The player I'm using is the Meridian player available on the android market. I've also tried using the original video player app that was first to the market when the phone came out. Neither player however performs software rendering, it is accomplished through a hardware decoder. Both players can still play videos I encode with with my encoder so nothing critical to video playback has changed via Android over-the-air updates.


EDIT: I just tried CM3 for the hell of it... and it works. Odd considering dropping in your executables into my encoder did not work for me. I guess some x264 default settings have changed since mplayer/mencoder revision 29355... I suppose that is very likely considering how long it has been since then. CM3 with the slider set to extreme works as well.

I converted a 25 minute episode though and the audio desync'd quickly. I'll try some other files later.
User avatar
Corran
 
Joined: 14 Oct 2002

Re: AMVbe 1.1.alpha5 - Batch Encoder for anime and amvs

Postby Bakadeshi » Mon Jan 11, 2010 8:52 am

Corran wrote:EDIT: I just tried CM3 for the hell of it... and it works. Odd considering dropping in your executables into my encoder did not work for me. I guess some x264 default settings have changed since mplayer/mencoder revision 29355... I suppose that is very likely considering how long it has been since then. CM3 with the slider set to extreme works as well.

I converted a 25 minute episode though and the audio desync'd quickly. I'll try some other files later.


ok thanks, that probably means its a new bframe option that android doesn't understand. Maybe b-pyramid, if that is enabled by default. I'll do some research and see if i can find out what the culprit is.
User avatar
Bakadeshi
Abuses Spellcheck
 
Joined: 29 Sep 2003
Location: Atlanta, GA

Re: AMVbe 1.1.alpha5 - Batch Encoder for anime and amvs

Postby Corran » Mon Jan 11, 2010 5:21 pm

When you post the next build, could you enable harddup on the mencoder step also? I think the sync problems I'm encountering are a result of duplicate frames being lost in the encode. I encountered this problem around this time last year. When I test amvbe with the same files that gave me problems back then I get the same issue with the audio losing sync.


Mencoder Manual wrote:11.1.12.1. Improving muxing and A/V sync reliability

You may experience some serious A/V sync problems while trying to mux your video and some audio tracks, where no matter how you adjust the audio delay, you will never get proper sync. That may happen when you use some video filters that will drop or duplicate some frames, like the inverse telecine filters. It is strongly encouraged to append the harddup video filter at the end of the filter chain to avoid this kind of problem.

Without harddup, if MEncoder wants to duplicate a frame, it relies on the muxer to put a mark on the container so that the last frame will be displayed again to maintain sync while writing no actual frame. With harddup, MEncoder will instead just push the last frame displayed again into the filter chain. This means that the encoder receives the exact same frame twice, and compresses it. This will result in a slightly bigger file, but will not cause problems when demuxing or remuxing into other container formats.

You may also have no choice but to use harddup with container formats that are not too tightly linked with MEncoder such as the ones supported through libavformat, which may not support frame duplication at the container level.



I think this occurs because mencoder is not responsible for creating the container when performing multi-step encoding like this, mp4box is.
User avatar
Corran
 
Joined: 14 Oct 2002

Re: AMVbe 1.1.alpha5 - Batch Encoder for anime and amvs

Postby Corran » Mon Jan 11, 2010 6:45 pm

Also, it appears that you have the same problem with windows media video files that I did when adding streaming to this site. Mplayer is unable to determine the correct frame rate to render the video and inexplicably defaults to 1000fps. I think this is a result of wmv's capability to render at variable frame rates, however, most videos encoded with the wmv container still use standard, non-variable frame rates.

We solved this for the org by using mencoder essentially to direct stream copy the video to /dev/null and parsing the mencoder output to determine the total frame count of the video. We then use the video's duration to calculate an estimated frame rate.


Here is some of the code we used: (php)
Code: Select all
/*
The MIT License

Copyright (c) 2009 Anthony DeRobertis, Eric Parsons

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/

function getFps($filename){
     global $mencoder, $mplayer;
     
     $fileparts = explode(".",strtolower($filename));
     $ext = array_pop($fileparts);
     
     //If one of these file types, try to guess fps.
     If($ext == "wmv" || $ext == "asx"){
       $vidinfo = $mencoder . ' "' . $filename . '" -ovc copy -oac copy -o /dev/null 2>&1 | grep ^Video';
      unset($output);
      exec("$vidinfo 2>&1",$output,$return_val);
      if($return_val == 0){
         $vid_stream_data = strtolower(array_pop($output));
         $vid_stream_data = str_replace("  ", " ", $vid_stream_data); //Remove extra spaces
         $vid_stream_data_array = array_reverse(explode(" ",$vid_stream_data));
         $vid_frames = (int)$vid_stream_data_array[1];
         $time = (float)$vid_stream_data_array[3];
         
         if($time != 0){
            $rough_fps = $vid_frames / $time;
            //Estimate what fps should be. Use rough fps if nothing is close
            if($rough_fps >= 100){
                 $fps = "100.00";
            }elseif($rough_fps < 63 && $rough_fps >= 56){      
               $fps = "59.940";
            }elseif($rough_fps < 53 && $rough_fps >= 47){
                 $fps = "50.000";
            }elseif($rough_fps < 33 && $rough_fps >= 27){
                 $fps = "29.970";
            }elseif($rough_fps < 27 && $rough_fps >= 24.5){
               $fps = "25.000";
            }elseif($rough_fps < 24.5 && $rough_fps >= 20.5){
                 $fps = "23.976";
            }elseif($rough_fps < 18 && $rough_fps >= 13.5){
               $fps = "15.000";
            }elseif($rough_fps < 13.5 && $rough_fps >= 0){
               $fps = "12.000";
            }else{
                 $fps = (string)$rough_fps;
            }
         }else{ //$time = 0, return false
              return false;
         }
      }else{ //mencoder command failed, return false
           return false;
      }
   }else{ //If anything else just look it up with mplayer identify
        $vidinfo = $mplayer . ' -identify "' . $filename . '" -ao null -vo null -frames 0 2>/dev/null | grep ^ID_VIDEO';
      unset($output);
      exec("$vidinfo 2>&1",$output);
   
      foreach($output as $value){
           $parts = explode("=",$value);
           $orig_vidinfo[$parts[0]] = $parts[1];
      }
      $fps = $orig_vidinfo['ID_VIDEO_FPS'];
   }
   return $fps;
}



Perhaps you could adapt this to work with amvbe? Essentially the function isolates the file extension and uses it determine the method of acquiring the frame rate. It then runs the appropriate mencoder or mplayer commands, parses the output, and in the case of wmv or asx files, estimates the most appropriate frame rate to return.
User avatar
Corran
 
Joined: 14 Oct 2002

Re: AMVbe 1.1.alpha6 - (Need Ps3, Xbox360, and DROID testers)

Postby Bakadeshi » Mon Jan 25, 2010 1:16 pm

New version, Check first post for whats new.

Particularly need testers for Ps3 profile, since I don't have one yet. Also if xbox360 owners can test if the ps3 profile settings play on an xbox360.


DRIOD and Google NEXUS owners:
I believe some of the newer android hardware can support the more advanced h264 profile settings, I would like to test psp profile encodes on these 2 devices particularly to see if they will handle bframes and the other advanced settings that the psp profile uses, that the basic iphone/android profile does not support. I can then use this information to make a higher quality profile for the DROID and nexus one.

Thanks!

corran wrote:Also, it appears that you have the same problem with windows media video files that I did when adding streaming to this site. Mplayer is unable to determine the correct frame rate to render the video and inexplicably defaults to 1000fps. I think this is a result of wmv's capability to render at variable frame rates, however, most videos encoded with the wmv container still use standard, non-variable frame rates.


If this version does not solve the issue, can you provide a sample of the file having the problem so I can do some testing on my end? thanks!
User avatar
Bakadeshi
Abuses Spellcheck
 
Joined: 29 Sep 2003
Location: Atlanta, GA

Re: AMVbe 1.1.alpha6 - (Need Ps3, Xbox360, and DROID testers)

Postby Corran » Mon Jan 25, 2010 6:53 pm

When I ran the new version for the first time I got the following error:
Error readind saved settings, Reverting back to defaults.


Your usage of harddup isn't working for me. I notice that harddup is present in the command line twice.
mencoder.exe "F:\Video\AMVs\02. Good AMVs\Grave of the Fireflies-MJ-FinalMemory.mpeg" -vf scale=480:-2,harddup -of rawvideo -nosound -vf-add harddup -subfont-autoscale 1 -subfont-text-scale 7 -slang en -ovc x264 -x264encopts threads=auto:bitrate=362:bframes=0:ref=5:subme=6:trellis=1:analyse=p8x8,b8x8,i4x4,p4x4:no-ssim:level=3:no-fast-pskip:no-


I'm guessing that isn't the complete command line but that is all that is displaying. Here is a file that you can test the harddup switch with: http://www.animemusicvideos.org/members ... hp?v=12511

Bakadeshi wrote:If this version does not solve the issue, can you provide a sample of the file having the problem so I can do some testing on my end? thanks!


The problem is still present. You can use this video for testing the wmv framerate problems.
http://www.animemusicvideos.org/members ... hp?v=30179
User avatar
Corran
 
Joined: 14 Oct 2002

PreviousNext

Return to Footage Help

Who is online

Users browsing this forum: No registered users and 2 guests

cron