Welcome Guest ( Log In | Register )


Important

The forums will be closing permanently the weekend of March 15th. Please see the notice in the announcements forum for details.

 
Video Frame Could Not Be Read From The Source
« Next Oldest | Next Newest » Track this topic | Email this topic | Print this topic
ihateforums
Posted: Oct 13 2014, 07:11 AM


Newbie


Group: Members
Posts: 3
Member No.: 38322
Joined: 13-October 14



I have a Vivitar DVR 979HD. It records .AVI files, but I can't edit these files with VirtualDub.

Video: 1920x1080 25fps MJPG
Audio: 32KHz 16-bit mono PCM

At first I was getting an error about MJPEG images with size not divisible by 16. So I installed ffdshow. Now, when I open the file in VirtualDub, the input pane correctly renders the frame. I can seek to any frame, no problem. BUT, I can't start any dub or playback. The error "Video frame xxxx could not be read from the source. The file may be corrupt." appears. The frame number given in the error depends on where I tried to start playback/dub but seems to only specify multiples of 5 (eg. 24, 29, 34, 39...)

Additional info: VirtualDub can save the audio stream to a .WAV which seems to be correct. I tried VirtualDub versions 1.10.4, 1.9.6, 1.6.1. Media Player Classic and VLC can play the .AVIs. After installing ffdshow, even the ancient AVIVIEW.EXE included with VFWDK can play the file, albeit without sound.
 
     Top
dloneranger
Posted: Oct 13 2014, 11:10 AM


Moderator


Group: Moderators
Posts: 2366
Member No.: 22158
Joined: 26-September 07



Things you could try

Virtualdub has an internal mjpeg codec that can be dis/enabled from the options
Open the file using an input plugin, ffmpeg plugin or directshow plugin might work better (ffmpeg uses it's own dlls and directshow uses whatever directshow codecs are installed on the pc)
http://forums.virtualdub.org/index.php?act...=ST&f=7&t=19488

---
To use input plugins
Get the right version of the plugin for your virtualdub (32 or 64bit)
Extract 32bit plugins into plugins32
Extract 64bit plugins into plugins64
Start virtualdub
File menu->Open video file
Open video file dialog box->select the video you want
Open video file dialog box->change the 'files of type' dropdown to the plugin you want to use
Open video file dialog box->click 'open' button to open the file


--------------------
MultiAdjust JoinWav WavNormalize FFMPeg Input Plugin v1827 UnSharpMask
Windows7/8 Codec Chooser
All FccHandlers Stuff inc. Installers for acm codecs AAC, AC3, LameMp3
 
    Top
ihateforums
Posted: Oct 17 2014, 04:01 AM


Newbie


Group: Members
Posts: 3
Member No.: 38322
Joined: 13-October 14



I see the problem now. For some reason the camera is padding the file with zeroes so that every fifth frame ends on a 32KB boundary. And these areas are not included in any chunk. Hmph.
 
     Top
ihateforums
Posted: Oct 19 2014, 02:37 AM


Newbie


Group: Members
Posts: 3
Member No.: 38322
Joined: 13-October 14



fixed by writing the correct size value given in the index to each chunk (note that first frame of movi list always starts at $8000 following a junk chunk)
CODE
dim as integer x,y,z,l,ff,idxend
dim fourcc as string*4
dim fourcd as string*4

ff=freefile
open "drift.avi" for binary as #ff


get #ff,,fourcc:if fourcc<>"RIFF" then ? "oops, no RIFF.":end

l=&H7FF5
get #ff,l,fourcc:if fourcc<>"LIST" then ? "oops, no LIST at";l:end
get #ff,,z

l=&H7FFD+z
get #ff,l,fourcc:if fourcc<>"idx1" then ? "oops, no idx1 at";l:end
get #ff,,z
l=l+8
idxend=l+z

a10:
get #ff,l,fourcc:? fourcc
get #ff,,x
get #ff,,x
get #ff,,y

l=l+16:if l>idxend then end

x=x+&H7FFD
get #ff,x,fourcd:if fourcc<>fourcd then ? fourcc;"->";fourcd;"?":end
x=x+4
put #ff,x,y     ' write the correct size from the index to the chunk!

goto a10
 
     Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
3 replies since Oct 13 2014, 07:11 AM Track this topic | Email this topic | Print this topic

<< Back to General Discussion