Images at end get lost during conversion

Started by cucujoidea, January 18, 2015, 09:30:18 PM

Previous topic - Next topic

cucujoidea

Hello Avidemux-developers,

I'm using Avidemux 2.5.4 on Kubuntu 14.04 64 Bit.
During use of avidemux i found that during a conversion/compression from .AVI to .mp4 (H.264) often towards the end the resulting movie misses a small rest. Here I provide my conversion script (which compresses all my movies in one folder) and an example.



#!/bin/bash
VAR="files_asdf.txt"
ls *.AVI | sort > $VAR # Collect the files in the current directory
ls *.avi | sort >> $VAR
ls *.mov | sort >> $VAR
ls *.mp4 | sort >> $VAR
cat $VAR | while read line; do  # Loop read the filenames from the file
  INPUT=$(echo ${line}) # Grab the nxt new filename
  OUTPUT=${INPUT%.*} # Remove shortest match of characters between the .* at end of string
  if [[ $INPUT == *mp4 ]]
  then
    OUTPUT+="_.mp4" # Append new extension. case we recompress mp4, the '_' makes the new filename.
    autoanswer="y"  # answer some question from avidemux wich comes for mp4 's automatically
  else
    OUTPUT+="__.mp4" # Append new extension.
    autoanswer=""
  fi
  # some stuff
  # avidemux2 --force-alt-h264 --load "$INPUT" --save "$OUTPUT" --output-format AVI --quit
  #
  avidemux2_cli --load "$INPUT" --audio-resample 22050 --audio-stereo2mono --audio-codec MP3 --video-codec x264 --save "$OUTPUT" --quit  <<< $autoanswer
 
done
rm $VAR # Remove the text file with the file names
echo "done."
#read pause



the example input can be found here:
https://www.dropbox.com/s/4vq82ytenm1kc16/avidemux_dropped_images_during_conversion_original_1.avi?dl=1
and the output here:
https://www.dropbox.com/s/sab586h2a9a9gwe/avidemux_dropped_images_during_conversion_converted_2.mp4?dl=1

if you look closely at the end, the red square appears completely in the input file but appears not completely with the output file (i used dragon player to watch). This should be reproducible easily with the given script and file.

Thank you for providing and working on Avidemux.

Edit:
Ubuntu -> Kubuntu

Jan Gruuthuse