VideoHelp Forum




+ Reply to Thread
Results 1 to 20 of 20
  1. Member
    Join Date
    Mar 2013
    Location
    United Kingdom
    Search Comp PM
    Hello Everyone!
    I recently purchased a cheap starter camcorder along with an 8GB SDHC Kingston memory card. The camera is working perfectly fine, however there's something wrong with the encoding. When I tried to import a video into Sony Vegas it imported as an audio file which consisted of a loud screeching, kind of like the sound of data going through wires that they use in movies. Anyway, a quick search on google suggested there was a problem with my .avi codecs (the raw files are in .avi). I downloaded a codec pack but it did not help in any way. Next, I tried to use a video converter (both prism and handbrake) to covnert them to MP4, but again they both threw an error hinting at an error with the codecs but nothing specific. Strangely the video will play perfectly in VLC.. Attached is a very short file from the camera, could someone please analyse it and see what's going on and why I can't do anything with it...many thanks in advance!
    -Fraser
    Image Attached Files
    Quote Quote  
  2. Definitely something wrong with that AVI file. MPC-HC terminates and will not play it.
    Quote Quote  
  3. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    The latest FFmpeg build from Zeranoe can decode it http://ffmpeg.zeranoe.com/builds/

    It reports...

    Code:
    Input stream #0:0 
      ... frame changed from size:1280x720 fmt:yuvj422p to size:1280x720 fmt:yuvj420p
    That's probably the problem with other decoders. They process it as yuvj422p while it immediately seems to switch over to yuvj420p.

    FFmpeg log ...

    Code:
    Input #0, avi, from 'F:/SUNP0004.AVI':
      Duration: 00:00:02.55, start: 0.000000, bitrate: 10373 kb/s
        Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p, 1280x720, 29.37 tbr,
          29.37 tbn, 29.37 tbc
        Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 22050 Hz, mono, s16,
          352 kb/s
    EDIT: My installed FFdshow (rev4486 Aug 25 2012) decodes it as well so it should play without re-encoding in WMP if you install FFdshow.
    Last edited by Chris K; 20th Mar 2013 at 18:43.
    Quote Quote  
  4. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    What does the mftr of the cam recommend? Model#?

    I notice you started with "cheap". Maybe that's the problem.

    Scott

    <edit>BTW, codec pack = bad, bad, bad idea! Could confound all later efforts to resolve your problem.
    Last edited by Cornucopia; 20th Mar 2013 at 18:58.
    Quote Quote  
  5. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    When I remux it with FFmpeg while cutting off the first second, it plays in everything that formerly failed.

    Code:
    ffmpeg -ss 1 -i "F:/SUNP0004.AVI" -codec:v copy -codec:a copy -y "f:/remuxed.avi"
    You could try if Vegas accepts it that way.
    Quote Quote  
  6. Member
    Join Date
    Mar 2013
    Location
    United Kingdom
    Search Comp PM
    Originally Posted by Cornucopia View Post
    What does the mftr of the cam recommend? Model#?

    I notice you started with "cheap". Maybe that's the problem.

    Scott

    <edit>BTW, codec pack = bad, bad, bad idea! Could confound all later efforts to resolve your problem.
    It's an unbranded model, but that's not really the problem, as I said everything else works fine.
    Quote Quote  
  7. Member
    Join Date
    Mar 2013
    Location
    United Kingdom
    Search Comp PM
    Originally Posted by Chris K View Post
    The latest FFmpeg build from Zeranoe can decode it http://ffmpeg.zeranoe.com/builds/

    It reports...

    Code:
    Input stream #0:0 
      ... frame changed from size:1280x720 fmt:yuvj422p to size:1280x720 fmt:yuvj420p
    That's probably the problem with other decoders. They process it as yuvj422p while it immediately seems to switch over to yuvj420p.

    FFmpeg log ...

    Code:
    Input #0, avi, from 'F:/SUNP0004.AVI':
      Duration: 00:00:02.55, start: 0.000000, bitrate: 10373 kb/s
        Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p, 1280x720, 29.37 tbr,
          29.37 tbn, 29.37 tbc
        Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 22050 Hz, mono, s16,
          352 kb/s
    EDIT: My installed FFdshow (rev4486 Aug 25 2012) decodes it as well so it should play without re-encoding in WMP if you install FFdshow.

    Ffmpeg sorted it, thank you very much!
    Quote Quote  
  8. Member
    Join Date
    Mar 2013
    Location
    United Kingdom
    Search Comp PM
    Originally Posted by FraserDAHD View Post
    Originally Posted by Chris K View Post
    The latest FFmpeg build from Zeranoe can decode it http://ffmpeg.zeranoe.com/builds/

    It reports...

    Code:
    Input stream #0:0 
      ... frame changed from size:1280x720 fmt:yuvj422p to size:1280x720 fmt:yuvj420p
    That's probably the problem with other decoders. They process it as yuvj422p while it immediately seems to switch over to yuvj420p.

    FFmpeg log ...

    Code:
    Input #0, avi, from 'F:/SUNP0004.AVI':
      Duration: 00:00:02.55, start: 0.000000, bitrate: 10373 kb/s
        Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p, 1280x720, 29.37 tbr,
          29.37 tbn, 29.37 tbc
        Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 22050 Hz, mono, s16,
          352 kb/s
    EDIT: My installed FFdshow (rev4486 Aug 25 2012) decodes it as well so it should play without re-encoding in WMP if you install FFdshow.

    Ffmpeg sorted it, thank you very much!
    *Sigh*
    As if my days been bad enough, now bloody Ffmpeg has messed up.
    After posting this I went to record some more videos on my camera. I just got around to editing them a few minutes ago. The first video opens in Sony Vegas perfectly with no problems (I didn't run FFmpeg or anything). All of the other videos come out as that stupid bloody audio file again. So, I ran Ffmpeg by dragging all the files over it. It asked if I wanted to overwrite them and I, ofcourse pressed Y. But no, now all the god damn videos have gone to 0kb and wont do anything. At all. OH BUT WAIT I MADE A .RAR WITH ALL THE FILES IN! HORRAH! Oh no wait, that's been corrupted out of nowhere and won't work either. All the recordings are gone.

    Sorry, I needed somewhere to vent because this has pissed me right off. I'll be recording some more videos and trying again some time in the week, and I'll see how much of a sh*t-storm that creates.
    Quote Quote  
  9. VirtualDub had no problem opening the file with its internal MJPEG decoder or with ffmpeg decompressing the video.
    Quote Quote  
  10. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    Originally Posted by FraserDAHD View Post
    As if my days been bad enough, now bloody Ffmpeg has messed up.
    I'm sorry you've lost your clips but you can't just throw something on FFmpeg. It will see it as ...
    Code:
    ffmpeg "F:/SUNP0004.AVI"
    and cosider it as the output filename. I agree that FFmpeg should do some checking and give a warning but that's how it works.

    You must at least give it a input filename preceded with the -i command and a output filename that differs from the input. I suggested this command line earlier ...
    Code:
    ffmpeg -ss 1 -i "F:/SUNP0004.AVI" -codec:v copy -codec:a copy -y "f:/remuxed.avi"
    Quote Quote  
  11. winff is a decent front end for ffmpeg. You can just drop your file in it, choose your output and go. Your file converted fine to an mp4.

    edit: Nevermind, looks like he's got it sorted.
    Quote Quote  
  12. Member
    Join Date
    Mar 2013
    Location
    United Kingdom
    Search Comp PM
    Sigh
    Well I recorded two new videos, both of them are acting strangely.
    Video #1 will play fine on VLC media player, but will throw the "Vegas cannot import any of these files" error when importing.
    Video #2 will not play on VLC and gives the error "VLC media player cannot play the file format "undf" (although the video is clearly an .avi file) and when imported to vegas, gives that weird audio file I discussed earlier.
    Suggestions please?
    Quote Quote  
  13. Upload more samples? The sample in your first post is fine here -- I think. It's very grainy but looks to be a shot of some walls with part of a chair at the edge of the frame. The audio is just background noise with a constant whine and a few clicks. The codec is MJEG.

    Click image for larger version

Name:	junk.jpg
Views:	863
Size:	81.5 KB
ID:	17026

    VLC had no problems playing it.
    Last edited by jagabo; 31st Mar 2013 at 18:59.
    Quote Quote  
  14. Member
    Join Date
    Mar 2013
    Location
    United Kingdom
    Search Comp PM
    Originally Posted by jagabo View Post
    Upload more samples? The sample in your first post is fine here -- I think. It's very grainy but looks to be a shot of some walls with part of a chair at the edge of the frame. The audio is just background noise with a constant whine and a few clicks. The codec is MJEG.

    Image
    [Attachment 17026 - Click to enlarge]


    VLC had no problems playing it.
    Yes, that first video was fine I know. The grains were just the quality of the camera.
    I wish I could upload a sample video but the only one I have which gives the "undf" error is 10 minutes long and seeing as it can't be imported, I can't edit it down.
    Quote Quote  
  15. Use a hex editor to trim out the first 10 million bytes or so. Then post that. Actually, just open the file with a hex editor and show what the first page of data looks like. That will include the AVI and stream headers. Enough to give some hints. If that looks OK you can go on to uploading a sample. Here's a hex dump of your original AVI file:

    Click image for larger version

Name:	hex.png
Views:	715
Size:	16.4 KB
ID:	17027

    Notice it starts with RIFF (in the right part of the dump). All AVI files must start that way. You can see the MJPG tokens several lines below that indicating the video codec. Also included in there are the frame dimensions, number of frames, etc.

    There are many free hex editors available on the net. VirtualDub has a built in hex editor you can use. Start the program then select Tools -> Hex Editor. In the Hex editor select File -> Open...

    By the way, one common problem with memory cards is that unscrupulous sellers take small cards and format them to look like bigger cards, then sell them at the price of the bigger card. For example, they may take a 4 GB card and format it as if its an 8 GB card. The card will appear to be working fine until you write more the 4 GB to it, then files start getting corrupt (not just new files, even files written earlier). I would try a different card. One bought from a reputable seller.
    Last edited by jagabo; 31st Mar 2013 at 19:25.
    Quote Quote  
  16. Member
    Join Date
    Mar 2013
    Location
    United Kingdom
    Search Comp PM
    Originally Posted by jagabo View Post
    By the way, one common problem with memory cards is that unscrupulous sellers take small cards and format them to look like bigger cards, then sell them at the price of the bigger card. For example, they may take a 4 GB card and format it as if its an 8 GB card. The card will appear to be working fine until you write more the 4 GB to it, then files start getting corrupt (not just new files, even files written earlier). I would try a different card. One bought from a reputable seller.
    I'll try the hex thing now.
    The card is a legitimate Kingston one so there's no problems there.

    EDIT:
    Results from hex editor...No RIFF, so that's a start, then it's all just what seems like random characters...
    Quote Quote  
  17. Originally Posted by FraserDAHD View Post
    The card is a legitimate Kingston one so there's no problems there.
    A brand name is no guarantee. Where you got is is more important. Anyone can buy a bunch of 4 GB Kingston memory cards, reformat them, then sell them on ebay, craigslist, at the local swap meet, etc. A malfunctioning card could also be the problem. So regardless of where you got it, try a different card for future recordings.

    Originally Posted by FraserDAHD View Post
    EDIT:
    Results from hex editor...No RIFF, so that's a start, then it's all just what seems like random characters...
    Yes, the AVI header has been overwritten with junk. It may still be possible to restore some of the video (if it hasn't all been overwritten) but it gets much harder. The process involves copying the header data from a good file (from the same camera, with similar resolution, length, etc.) onto the bad file (obviously, make a backup of the file since you may screw it up even more). Then try some AVI fix utilities. Such utilities will search through the data in the file looking for video and audio chunks. Fortunately for you, MJPG encodes each frame as a complete image making recovery easier. VirtualDub has some ability to fix AVI files.
    Quote Quote  
  18. Member
    Join Date
    May 2011
    Location
    United States
    Search PM
    Without going into great detail about your issue..The saved video file in your sample is a mjepg with one channel pcm audio,,your sony vegas encoder probably cannot handle the super high bitrates that your camcorder incorporated into the files and it may not even be able to encode mjpeg files..You should go into the camcorders options and see if you can change the outputted video to a more usable format like an avi,mp4,mkv and for audio mp3,ac3,aac<< these file types and its resolutions are more accepted by most hardware devices and more easily encoded by most software conversion programs..A quick video and audio change in your camcorder should fix all your problems..Good Luck...~
    Quote Quote  
  19. Member
    Join Date
    Mar 2013
    Location
    United Kingdom
    Search Comp PM
    Originally Posted by RappinRod View Post
    Without going into great detail about your issue..The saved video file in your sample is a mjepg with one channel pcm audio,,your sony vegas encoder probably cannot handle the super high bitrates that your camcorder incorporated into the files and it may not even be able to encode mjpeg files..You should go into the camcorders options and see if you can change the outputted video to a more usable format like an avi,mp4,mkv and for audio mp3,ac3,aac<< these file types and its resolutions are more accepted by most hardware devices and more easily encoded by most software conversion programs..A quick video and audio change in your camcorder should fix all your problems..Good Luck...~
    Unfortunately because the camera is so low end I cannot change the output.
    Quote Quote  
  20. MJPG and PCM in AVI is one of the easiest type of files for an editor to work with. But the editor must have support for those codecs. Or you may need to install decoders for them. I don't know what Vegas uses to open AVI files. VFW? DirectShow? It's own internal reader/splitters/codecs? Maybe a Vegas user can let you know. I'd try installing ffdshow for decoding. It has support for MJPG and PCM of all flavors.

    If you can't get Vegas to open the files directly you can convert to something else. I would try VirtualDub, creating an AVI with HuffYUV as the video codec, PCM for the audio -- but with more common properties, 16 bit, stereo, 48 KHz, PCM. The files will be much larger but there will be no loss of quality and Vegas should be able to work with them (you might need a HuffYUV decoder but I know I've seen people using HuffYUV with Vegas). Such a file is attached if you want to try it out. Only the first 10 frames of your video in post #1.
    Image Attached Files
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!