News:

--

Main Menu

Problems with AVIdemux v2.6.x

Started by DragonsLord, March 19, 2014, 09:34:24 AM

Previous topic - Next topic

DragonsLord

Good morning to everyone,
I am experiencing two problems with AVIdemux v2.6.8 on Windows (64-bit) trying to decoding one H.264/MPEG-4 AVC video with AAC audio @50 fps to:
- AVI Muxer
- MPEG-4 ASP (XviD4)
- MP3 Lame @ 128 kbps CBR 48000 Hz stereo
- 25 fps

Here is what I do:
1. I open .MP4
2. I select the part I'm interested in using the arrows and setting A and B
3. I choose the option Audio Output MP3 (Lame) then Filter - Remix - Mixer: Stereo

4. Video Output - MPEG-4 ASP (XviD4)

  • Filter - Resample FPS - Mode: 25 PAL
  • Filter - Interlacing - Libavcodec Deinterlacers - Deinterlacing: Linear blend
  • Filter - Tranform - Crop
  • Filter - Tranform - swsResize - Lock Aspect Ratio: NO - Width: 704 - Height: 400 - Resize Method: Bilinear

5. Video Output - Configure (Motion Estimation)

  • Profile: Adv. Simple Level4
  • Number of B Frames: 0
  • GOP Size: 250
  • Encoding Mode: Two Pass - Video Size
  • Target Video Size (MB): 250

6. File - Save

Problems are:

1. Calculator does not work
Pressing the calculator button nothing happens.

2. Target Video Size not always respected
Setting up a Target Video Size eg 250 MB sometimes the result is clearly smaller (220 MB)

3. Mute
From a certain point of the video until the end the result became silent (of course I have viewed the .MP4 source and it seems to be all right).


I hope that some of you have patience and time to help me.
Thanks in advance.
- DragonsLord

AQUAR

#1
Title refers to avidemux 2.5.x.?

I would deinterlace before resampling.
50 fps might mean 50 fields per second.
Deinterlacing such a source with linear blend gives 25 frames per second.

Calculator issue has been flagged before.
Probably needs work to suit AVC complexities.

DragonsLord

Thank you for your prompt reply, AQUAR.

Quote from: AQUAR on March 19, 2014, 11:31:40 AM
Title refers to avidemux 2.5.x.?

You're absolutely right, I have just corrected the subject. ::)


Quote from: AQUAR on March 19, 2014, 11:31:40 AM
I would deinterlace before resampling.
50 fps might mean 50 fields per second.
Deinterlacing such a source with linear blend gives 25 frames per second.

Do you mean that resampling is useless if I carry out a linear blend deinterlacing?
If this is not, do you think I will solve issues 2 and 3 deinterlacing before resampling?


Quote from: AQUAR on March 19, 2014, 11:31:40 AM
Calculator issue has been flagged before.
Probably needs work to suit AVC complexities.

Well, but what do you think regarding issue no. 2 - Target Video Size not always respected?
How can I solve?

AQUAR

The 25 frames per second being ouput by the deinterlacing filter is being fed into the resampling filter to achieve 25 frames per second.
Thats one manipulation step thats can be avoided (if the source is interlaced 25 frames/sec!).

Re issue 2:
The video size is only a target size.
The end result is never precise due to limited quantiser scaling factors, its distribution (refined with more passes!) etc.
All things working out it should do better - try settiing a smaller minimum quantiser (eg 1!).

Re issue 3:
Hard to say what is going on.
Cutting AVC is best done at reference frames (might help!).


DragonsLord

Quote from: AQUAR on March 19, 2014, 12:27:56 PM
Re issue 3:
Hard to say what is going on.
Cutting AVC is best done at reference frames (might help!).

Sorry for being so ignorant ... How can I do cutting AVC at reference frames? :o

AQUAR

No problem:
Use the >> and << to navigate to Idr frames

DragonsLord

Unfortunately this is not feasible, at least for me, since my HD Capture device set IDR Frames each 2 seconds ...
... so is it not possible to do frame accurate cutting with AVC videos, right? :-[

mean


DragonsLord

Quote from: mean on March 19, 2014, 02:14:31 PM
If you re-encode yes
Else no

Thank you, mean.

As you read I am re-encoding video from H.264/MPEG-4 AVC to MPEG-4 ASP (XviD4) and what I did not understand is:

1. How can I do a frame accurate cutting of an AVC videos with AVIdemux
I mean that I have << >> buttons that move frames with a granularity 2 seconds and <- -> buttons that move frames with a granularity 0.2 seconds so what steps I can follow?

2. How can I understand and solve the problem as regard to the absence of sound of the output XviD?

Thank you very much, once more, for your support.

AQUAR

#9
Are you sure that the -> & <- buttons move the time scale by O.2 second?
These navigation buttons are for moving to the next/previous frame.
At 25 frames per second (50 interlaced fields) the time scale should really only move 0.04 seconds.
50 frames per second is 0.02 seconds - maybe you misread!

So normally you can define a cut/edit segment with frame accurate marker points.
As mean points out, re-encoding that segment from AVC to Xvid should also be frame accurate.
But just copying that segment would need a smartcopy function for frame accuracy (not available with 2.6).

If there is this coarse granularity in frame movement, maybe the capture device does something strange with the time codes.
Might be behind the sound issue?

Just a comment:
Try Yadif instead of libavdec (linear blend) to minimise blurring.
You could even setup Yadif to double the frame rate (= field rate) to preserve the motion smoothness of the source.

DragonsLord

Quote from: AQUAR on March 20, 2014, 12:41:56 AM
Are you sure that the -> & <- buttons move the time scale by O.2 second?
These navigation buttons are for moving to the next/previous frame.
At 25 frames per second (50 interlaced fields) the time scale should really only move 0.04 seconds.
50 frames per second is 0.02 seconds - maybe you misread!

Just to clarify here is the MediaInfo details for my source video ...

General
Complete name                            : F:\201306042336_24.mp4
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom
File size                                : 707 MiB
Duration                                 : 23mn 36s
Overall bit rate mode                    : Variable
Overall bit rate                         : 4 190 Kbps

Video
ID                                       : 2
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : Baseline@L3.0
Format settings, CABAC                   : No
Format settings, ReFrames                : 1 frame
Format settings, GOP                     : M=1, N=100
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 23mn 36s
Bit rate                                 : 3 992 Kbps
Width                                    : 720 pixels
Height                                   : 576 pixels
Display aspect ratio                     : 5:4
Frame rate mode                          : Constant
Frame rate                               : 50.000 fps
Standard                                 : PAL
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.193
Stream size                              : 674 MiB (95%)
Language                                 : English

Audio
ID                                       : 1
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : LC
Codec ID                                 : 40
Duration                                 : 23mn 36s
Bit rate mode                            : Variable
Bit rate                                 : 192 Kbps
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 KHz
Compression mode                         : Lossy
Stream size                              : 32.0 MiB (5%)
Language                                 : English


... and I was wrong: it's 720x576 50p not 50i (so 50 fps not interlaced).


Quote from: AQUAR on March 20, 2014, 12:41:56 AM
So normally you can define a cut/edit segment with frame accurate marker points.
As mean points out, re-encoding that segment from AVC to Xvid should also be frame accurate.
But just copying that segment would need a smartcopy function for frame accuracy (not available with 2.6).

And you are absolutely right: -> & <- buttons move the time scale by 0.020 second, for this specific case.


Quote from: AQUAR on March 20, 2014, 12:41:56 AM
If there is this coarse granularity in frame movement, maybe the capture device does something strange with the time codes.
Might be behind the sound issue?

To be honest I tried to encode the same video performing the same tasks with XMedia Recode:
the result is that the sound issue disappeared and audio and video are perfectly synchronized.

Then, I'm pretty sure that this is a problem of AVIdemux and I am available to provide all the details that you (or developers) will need in order to address and debug what is going wrong.

DragonsLord

Therefore here is the updated status of the problems I reported:

1. Calculator does not work
Q: Pressing the calculator button nothing happens.
R: Probably needs work to suit AVC complexities.


2. Target Video Size not always respected
Q: Setting up a Target Video Size eg 250 MB sometimes the result is clearly smaller (220 MB)
R: The video size is only a target size. The end result is never precise due to limited quantiser scaling factors, its distribution (refined with more passes!) etc.
All things working out it should do better - try settiing a smaller minimum quantiser (eg 1!).

I can confirm that, setting up a smaller minimum quantiser (eg. 1 instead of 2) the target size is more respected.
Unfortunately I found an additional issue: setting up a min quatizer as mentioned below I noticed come buffer underflow violations within the AVInaptic report.

Is it due to the profile "Adv. Simple Level4"?
Is it possible to set an "Unlimited" XviD profile?
Which was the profile used in AVIdemux 2.5.6?


3. Mute
Q: From a certain point of the video until the end the result became silent (of course I have viewed the .MP4 source and it seems to be all right).
R: To be honest I tried to encode the same video performing the same tasks with XMedia Recode: the result is that the sound issue disappeared and audio and video are perfectly synchronized. Then, I'm pretty sure that this is a problem of AVIdemux and I am available to provide all the details that you (or developers) will need in order to address and debug what is going wrong.


Thank you very much, again, for your patience and your time.
Enjoy your week-end!

AQUAR

#12
Create a small sample (copy mode I frame to I frame) around the problem point.
If re-encoding this sample also suffers from this loss of sound then ask mean (= avidemux author/developer) to look at it.

I suspect there is some error in the time stamps of your media file.
2.6 relies on these time stamps (cues) perhaps more than some other recoding software.

But if something else is going on that might lead to some code improvement.   

DragonsLord

I created a 90 MB sample copying audio and video and using AVI as a container. Is this fine ? Where should I put the sample to make it available ?

Would you be so kind also to reply Question 2, regarding  buffer underflow and XviD profile compared with AVIdemux 2.5.x ?

AQUAR

#14
First I must point out that very few endusers here can investigate video streams at the nitty gritty level.
Media files that break Avidemux operability may interest Mean (developer) sufficiently to take a look.

Does the 90 MB sample lose the sound on a recode?
If it does I'll test it on my machine to verify the problem.

Just upload it to a file sharing site like  http://www.datafilehost.com/ (but a smaller sample is better!)

Re buffer underflow: It relates to the exceeding the bitrate for too long for the specified profile level.
Not a problem on PC media players (big buffers!).
Could be a problem for standalone players with a max specification matching that profile level.

If you get breakups or stutter then you exceeeded the player limitations.
Personally my standalone media player works fine even if avinaptic gives these buffer underrun notifications.