FWIW: "Innocent" mp4 gets 3-fold length after editing

Started by fkuebler, May 04, 2015, 06:06:24 PM

Previous topic - Next topic

fkuebler

Usually my Handbraked mp4-files can be edited without problems. Today though I had the same bug both wit the April version of Avidemux and with the one from yesterday:

After cutting the front 20 seconds from a "normal" mp4 file (with output format mp4v2), the length acc. to MediaInfo was nearly tripled. Trying to play it with VLC resulted in the first hours playing without video, only sound.

I have attached the MediaInfos and kept the original mp4, and I can supply additional information or do test, if wished.

mean

a small file where it happens would help
Maybe you could handbrake ~1 mn of the same source ?

fkuebler

Quote from: mean on May 04, 2015, 06:09:02 PM
a small file where it happens would help
Maybe you could handbrake ~1 mn of the same source ?
I just did cut the original mkv (using Avidemux), handbraked the result, and then did a front-cut with Avidemux again. Unfortunately the bug did not happen.

I will continue to try producing a useful result.

fkuebler

Do you know by chance, whether Handbrake has a (reasonably simple) option, to convert only the first 2 minutes or so?

fkuebler

I found a way to limit the handbrake output to a specific amount of seconds, but unfortunately with such shortened output the problem of the subsequent Avidemux editing did also not occur...

The only thing which I can tell to be different from my "normal" operations is the following: My handbraked mkv had a subtitle track, which I did let Handbrake burn in.

I will try the original length mkv be handbraked without the burn-in option, and I will report what happened then.

Jan Gruuthuse

#5
QuoteDo you know by chance, whether Handbrake has a (reasonably simple) option, to convert only the first 2 minutes or so?
handbrake: found no way to set duration.
record from source with limited duration 1 min, 2 min, ... (Set Top Box)
find similar content with the required duration (youtube, ... ) browser download extension

did run into possible mkv issue, either:
- audio track source/conversion. Can't recall exactly what it was (mono, aac (Faac vs Lav), ...)
- If more then one possibility in avidemux preferences for Display & HW Accel, switch back to lower performing option. see if that issue is gone then

not on MacOSX, but ubuntu, could still be related

mean

Could be the sub are mixing up with the audio tracks

fkuebler

Quote from: mean on May 05, 2015, 07:01:20 AM
Could be the sub are mixing up with the audio tracks
I was suspicious of a correlation as well, because usually I don't Handbrake burned-in subtitles into the mp4 (which I subsequently edited with Avidemux). But my tests revealed, that this was a pure coincidence. FWIW, I describe the latest workflow again:

I took a 1080p mpv consisting of a video, an audio, and a subtitle track. This file I converted with the latest Handbrake into an mp4, using the iTunes compatible preset, ignoring the subtitle track.

The resulting mp4 has a video and 2 audio tracks, and it plays well with VLC, with Quicktime, and with MPlayer OS X Extended.

But when I edit this mp4 with Avidemux, cutting only the front 20 seconds, and using mp4v2 as output format, then the file is corrupted, with a video length of 6 hours, as shown in my first post.

I made an additional observation: although the mp4 has 2 GB, it is opened by Avidemux within only app. 3 seconds, and can be edited immediately. Usually reading in takes a minute or so. But when I save the file after the edit, then for more than a minute the "saving" progress bar was empty, showing nothing, before then starting to display progress for another one or two minutes.

Please tell me, if I can do anything in addition.

fkuebler

Quote from: Jan Gruuthuse on May 05, 2015, 06:59:57 AM
handbrake: found no way to set duration.

FWIW: the Handbrake nightlies allow to specify, which chapters are to be converted, and it is also possible, instead to specify a number of seconds.

Jan Gruuthuse

remove the .idx2 file with the same name as your video. This should allow avidemux 2.6.8 to re-index the the file (just in case).

thnx for chapter tip.

mean

It smells like bad timestamp decoding
A sample would really help

fkuebler

Quote from: mean on May 05, 2015, 10:51:35 AM
It smells like bad timestamp decoding
A sample would really help
Yes, but anything shortened up to now did not produce the bug. I've ran out of ideas...

fkuebler

Quote from: Jan Gruuthuse on May 05, 2015, 10:50:35 AM
remove the .idx2 file with the same name as your video. This should allow avidemux 2.6.8 to re-index the the file (just in case).

Can you explain that technically, i.e. what I have to do?

Jan Gruuthuse

In the folder where you have the concerned videofile, you should have a similar named file with the extension .idx2, delete this one then reload that video in avidemux. This should create a new index file.

handbrake rev5474 (about handbrake) I don't find the iTunes compatible set. Have only iPod, iPhone & iPod touch, iPad, AppleTV, AppleTV 2, AppleTV 3.


fkuebler

#14
Quote from: Jan Gruuthuse on May 05, 2015, 12:51:22 PM
In the folder where you have the concerned videofile, you should have a similar named file with the extension .idx2, delete this one then reload that video in avidemux. This should create a new index file.
Unfortunately I don't find such a file, even not when I look for invisible or system files.

But that's no longer a problem, because in 20 minutes or so I will present a downloadable repeatable version of the problem, which hopefully can be debugged

Quotehandbrake rev5474 (about handbrake) I don't find the iTunes compatible set. Have only iPod, iPhone & iPod touch, iPad, AppleTV, AppleTV 2, AppleTV 3.
E.g. all AppleTV presets generate iTunes compatible format. This means, that they have an AAC audio as the preferred (or "active") audio, plus a second AC3 audio stream.

BTW: I'm using the latest version 7156 of the nightlies, which I strongly recommend. I can not remember to ever have stumbled upon a bug with the nightlies.