Avidemux Forum

Avidemux => Windows => Topic started by: pstein on April 27, 2014, 07:30:53 AM

Title: Bug: AD crashes for conversion of portrait video
Post by: pstein on April 27, 2014, 07:30:53 AM
I have many DigiCam videos in *.MOV container format which are either in Landscape or in Portrait mode.
Used codecs inside (see attached MediaInfo snapshot) the source videos:
AVC video
PCM audio

I wanted to convert them to MPEG 4 AVC (x264) video and LameMP3 audio and reduce especially the bitrates
to 1700 kbps (two-pass video) and 160 (audio).

This all works fine for all the videos in landscape mode.

However when I do the same conversion on videos with portrait mode Avidemux v2.6.8 (x64) starts and runs a couple of seconds but crahses then silently (!) under 64bit Win7.
This crash can be reproduced and occurs on all my portrait DigiCam videos. Again: On landscape videos with same audio/video codecs) it works fine.

This seems to be a bug.

Can I avoid it?

What is need so that developers can fix it?

Thx
Peter

Title: Re: Bug: AD crashes for conversion of portrait video
Post by: AQUAR on April 27, 2014, 08:19:58 AM
Height is 853 ie not an even number and not divisible by macroblock sizes.
Not sure if that is the cause of the crash.

Try cropping to 848: that is 16*integer(853/16) 
Title: Re: Bug: AD crashes for conversion of portrait video
Post by: Jan Gruuthuse on April 28, 2014, 05:35:04 AM
Try with copy video and audio to mkv container and work with the mkv video. You could be lucky.
See if you have another choice to save in another container the .mov (quicktime format), perhaps .mp4 container.
Video was never made/intended to record in page format 3:4 or 9:16 and this poses now sometimes issues.

Provide/upload a 5 second recording in the mov format to public available download area (no login/subscription). Users and developer can then check if this works on their system.
Title: Re: Bug: AD crashes for conversion of portrait video
Post by: Jan Gruuthuse on April 28, 2014, 06:40:11 AM
As mean did mention something about video hardware accelerated having issues with none standard video resolutions. You could also try this and see if this works for you.
- start avidemux
- goto Main Menu: Edit: Preferences:
[Display]:
-- select anything else but VDPAU/OPENGL/LIBVA. In my case XVideo (best) did work.
-- disabel openGL support: [ ] enable openGL support
[HW Accel]
-- untick all boxes:
[ ] Decode video using VDPAU (NVIDIA)
[ ] Decode video using XVBA (AMD)
[ ] Decode video using LIBVA (Intel)

- press [OK]

exit avidemux, restart avidemux, load video and see if this works now.
Title: Re: Bug: AD crashes for conversion of portrait video
Post by: pstein on May 01, 2014, 10:45:03 AM
Ok, thank you all for the suggestions. But they are not possible.

1.) I tried to crop the video as suggested from 853 to 848. When I enter "5" (pixel) to crop from the top then Avidemux changes this automatically to 4. I guess Avidemux allows only to crop multiples of 2. So the resulting video would have a size of 480x849 which has the same problems as the original. See attached snapshot number 1

2.) I tried to set something like XVideo in "Display" tab but there is no such entry (see attached snapshot number 2). Enable openGL support was already disabled.

Furthermore I could not find a tab "HW accel".

3.) Just copying at first to *.mkv does not help either.
When I apply the reencoding to the mkv video and want to save the new video Avidemux tell me:

"File D:/tmp/new.avi was NOT saved correctly."

So any more suggestions?

Peter
Title: Re: Bug: AD crashes for conversion of portrait video
Post by: Jan Gruuthuse on May 01, 2014, 12:55:19 PM
Have you only openGL as option in [Display] try those.

I wonder why you would get
QuoteD:/tmp/new.avi was NOT saved correctly.
when saving in container in Output Format: Mkv Muxer?

Sorry I'm not that much of help, I'm not on windows OS.
Title: Re: Bug: AD crashes for conversion of portrait video
Post by: AQUAR on May 01, 2014, 01:23:16 PM
Those decode options are for hardware accelerated decoding under linux.
They don't exist under windows.

Windows has DXVA and third party accelerators like CUDA.
I don't think the windows builds of avidemux provides for hardware accelerated decoding.   

Re
QuoteFile D:/tmp/new.avi was NOT saved correctly
I am guessing the .avi extension was incorrectly set by the user.
And the NOT saved correctly might be caused by the media file issue. 

If avidemux refuses to remux into MKV I would try doing it with MKVToolnix.
Maybe also set the display height to an even number in MKVToolnix? 
Title: Re: Bug: AD crashes for conversion of portrait video
Post by: Jan Gruuthuse on May 01, 2014, 02:31:10 PM
Quote from: AQUAR on May 01, 2014, 01:23:16 PM
Those decode options are for hardware accelerated decoding under linux.
They don't exist under windows.

Windows has DXVA and third party accelerators like CUDA.
I don't think the windows builds of avidemux provides for hardware accelerated decoding.
No other option then openGL? If possible try without openGL. Pity buildBot is not building, did like to see if it works now with r9052 windows?
Title: Re: Bug: AD crashes for conversion of portrait video
Post by: Jan Gruuthuse on May 01, 2014, 02:57:35 PM
Anyway I can only produce this video AVC MPEG-4 854x480.
Right click and save as. 4.5 MB download: https://www.dropbox.com/s/fiul51u198iroyq/854x480PortraitRecorded.mp4
Perhaps you can play with it on windows avidemux and see if you have issues with that?
Title: Re: Bug: AD crashes for conversion of portrait video
Post by: Jan Gruuthuse on May 01, 2014, 03:11:21 PM
and from that source I could make this:  4.5 MB download https://www.dropbox.com/s/xdefraxi30ho61v/480%2A854by%20avidemux.mp4
Title: Re: Bug: AD crashes for conversion of portrait video
Post by: AQUAR on May 02, 2014, 04:16:02 AM
@ Jan Gruuthuse
QuoteNo other option then openGL?
Options are:
Default raster or
OpenGL (only newer graphics subsystems).

Title: Re: Bug: AD crashes for conversion of portrait video
Post by: Jan Gruuthuse on May 02, 2014, 04:29:59 AM
should try with default raster, if it works with default raster, there could be an issue with openGL as there was a similar issue with VDPAU. http://avidemux.org/smuf/index.php/topic,16192.msg70545.html#msg70545
Title: Re: Bug: AD crashes for conversion of portrait video
Post by: AQUAR on May 02, 2014, 05:10:42 AM
I think VDPAU provides hardware accelerated decoding and rendering (DXVA equivalent).
OpenGL provides hardware accelerated rendering.

Default raster might be better if the issue related to rendering (frame size and scaling!).
When the buildbots catch up it would be interesting to see if things are better on a windows PC.
Title: Re: Bug: AD crashes for conversion of portrait video
Post by: Jan Gruuthuse on May 02, 2014, 05:30:05 AM
Have you played with the uploaded 854x480 sample video, having issues with it?
Title: Re: Bug: AD crashes for conversion of portrait video
Post by: AQUAR on May 02, 2014, 05:35:02 AM
Not yet, but will do so later today and give an update.
Title: Re: Bug: AD crashes for conversion of portrait video
Post by: pstein on May 02, 2014, 07:02:53 AM
So ok, here is a sample:

http://www13.zippyshare.com/v/30991622/file.html

How do I re-encode this under 64bit Win7 (not Linux!) this with a minimum of extra clicks in Avidemux?
Title: developer intervention required
Post by: Jan Gruuthuse on May 02, 2014, 08:49:17 AM
It looks like developer intervention is required with this video.
This video can't be coded with
Mpeg4 AVC (x264) and Mpeg4 ASP (xvid4) protests about
QuoteVideo
Cannot setup codec. Bitrate too low

Mpeg4 ASP (ff) seems to work fine with your required settings.

endresult: 8.6 MB download (right click save as) https://www.dropbox.com/s/axsi2hqdf1981lw/480x853-1700Kbps-160Kbps.mp4

find attached the Tinypy job
load video then from Menu: File: Tinypy Project: Run Project and select job
done on Linux, no idea if this works on Windows like it is
If this job does work you could save this in the folder custom, need to search for it with windows file browser, don't know where it sits in window.
You can then access this job directly from Menu: Custom   (2 mouse clicks to load these settings or settings you saved yourself)
Title: Re: Bug: AD crashes for conversion of portrait video
Post by: AQUAR on May 02, 2014, 10:10:20 AM
@ Jan Gruuthuse
I noticed that the windows 32 bit builds do not have OpenGL enabled.
Unlike the 64 bit builds that do have OpenGL enabled.

No problem with this portrait video on my machines with OpenGL or Default Raster rendering.

@ pstein
I'll test your video on my windows PC's
Title: Re: Bug: AD crashes for conversion of portrait video
Post by: AQUAR on May 02, 2014, 10:55:07 AM
Had a quick look on my core2duo PC: Same result as per Jan's post.
Remux with MKVToolnix/MKVMerge: Same dice.
Extract only the audio and video streams with MKVCleaver and remux into MKV: Result is fully recodable by Avidemux.

MKVCleaver has helped me before with stubborn media files.
Not exactly sure why MKVCleaver is different than MKVMerge (they both are just front ends for the MKVToolnix utilities).
I guess MKVCleaver route strips more stuff out of the video stream.

Difference between the 2 remuxed MKV files is that the MKVCleaver version results in the display height set to 854 pixels.
At least in the container meta data for display aspect (hopefully it matches that in the AVC stream).

Anyway: easy workaround
Load file into avidemux - copy copy into MKV - extract audio/video with MKVcleaver - remux extracted with MKVmerge - gives original audio/video in MKV -reload into avidemux for recoding/editing.