VideoHelp Forum
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 50
Thread
  1. Member
    Join Date: Aug 2014
    Location: Italy
    Search PM
    Hi all,

    I've got a 9" video door phone that records in avi files with Xvid codec (Zoran). I'm trying to convert other videos in this format but until now with no success.
    Here is what mediainfo reports about a file recorded by the video door phone:

    Code:
    Format                                   : AVI
    Format/Info                              : Audio Video Interleave
    File size                                : 11.6 MiB
    Duration                                 : 31s 974ms
    Overall bit rate                         : 3 033 Kbps
    
    Video
    ID                                       : 0
    Format                                   : MPEG-4 Visual
    Format profile                           : Advanced Simple@L5
    Format settings, BVOP                    : No
    Format settings, QPel                    : No
    Format settings, GMC                     : No warppoints
    Format settings, Matrix                  : Default (MPEG)
    Codec ID                                 : XVID
    Codec ID/Hint                            : XviD
    Duration                                 : 31s 960ms
    Bit rate                                 : 2 962 Kbps
    Width                                    : 720 pixels
    Height                                   : 540 pixels
    Display aspect ratio                     : 4:3
    Frame rate                               : 25.000 fps
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Progressive
    Compression mode                         : Lossy
    Bits/(Pixel*Frame)                       : 0.305
    Stream size                              : 11.3 MiB (98%)
    Writing library                          : Zoran
    
    Audio
    ID                                       : 1
    Format                                   : MPEG Audio
    Format version                           : Version 2
    Format profile                           : Layer 2
    Codec ID                                 : 50
    Duration                                 : 31s 974ms
    Bit rate mode                            : Constant
    Bit rate                                 : 64.0 Kbps
    Channel(s)                               : 1 channel
    Sampling rate                            : 22.05 KHz
    Compression mode                         : Lossy
    Stream size                              : 250 KiB (2%)
    Alignment                                : Aligned on interleaves
    Interleave, duration                     : 52 ms (1.31 video frame)
    I've tried to convert another video using virtual dub and set Xvid codec with the same settings, than used MPEG modifier to change writing library to Zoran and here is the result:

    Code:
    Format                                   : AVI
    Format/Info                              : Audio Video Interleave
    File size                                : 29.6 MiB
    Duration                                 : 2mn 5s
    Overall bit rate                         : 1 977 Kbps
    
    Video
    ID                                       : 0
    Format                                   : MPEG-4 Visual
    Format profile                           : Advanced Simple@L5
    Format settings, BVOP                    : No
    Format settings, QPel                    : No
    Format settings, GMC                     : No warppoints
    Format settings, Matrix                  : Default (MPEG)
    Codec ID                                 : XVID
    Codec ID/Hint                            : XviD
    Duration                                 : 2mn 5s
    Bit rate                                 : 1 904 Kbps
    Width                                    : 720 pixels
    Height                                   : 540 pixels
    Display aspect ratio                     : 4:3
    Frame rate                               : 25.000 fps
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Progressive
    Compression mode                         : Lossy
    Bits/(Pixel*Frame)                       : 0.196
    Stream size                              : 28.5 MiB (96%)
    Writing library                          : Zoran
    
    Audio
    ID                                       : 1
    Format                                   : MPEG Audio
    Format version                           : Version 2
    Format profile                           : Layer 2
    Codec ID                                 : 50
    Duration                                 : 2mn 5s
    Bit rate mode                            : Constant
    Bit rate                                 : 64.0 Kbps
    Channel(s)                               : 1 channel
    Sampling rate                            : 22.05 KHz
    Compression mode                         : Lossy
    Stream size                              : 981 KiB (3%)
    Alignment                                : Aligned on interleaves
    Interleave, duration                     : 52 ms (1.31 video frame)
    But the video doesn't play on the door phone.
    FourCC code changer reports XVID codec both on original and converted video.
    GSpot on the original file reports: AVI v1.0
    So I've tried saving in this old format without success.

    Then I've noticed that in the original video there was one keyframe (I-frame) every 20 frame (GSpot report: B->B 0 max; I->I N=20 (100%)). So I've set xvid to produce the same keyframe frequency but the video didn't play.


    Then I've tried to modify the original door phone file striping out the audio (direct stream copy with no audio using virtual dub), changing the name, the writing library and four CC code and the video still played on the door phone.

    So it is not an audio or four CC problem.


    I've no other ideas, please, can anyone help me ?

    Thank you a lot.

    Best regards,
    cdr
    Quote Quote  
  2. Member Cornucopia's Avatar
    Join Date: Oct 2001
    Location: Deep in the Heart of Texas
    Search Comp PM
    What are the filenames? Where are the files located (folder structure)? Are there other, index/database/thumb type files? Are there other fields/hexcodes (not shown by mediainfo) that the doorphone expects? What does the manual say? Model#?

    Also, why do you WANT to show other videos on the doorphone?

    Scott
    "When will the rhetorical questions end?!" - George Carlin
    Quote Quote  
  3. Member
    Join Date: Aug 2014
    Location: Italy
    Search PM
    Originally Posted by Cornucopia View Post
    What are the filenames? Where are the files located (folder structure)? Are there other, index/database/thumb type files? Are there other fields/hexcodes (not shown by mediainfo) that the doorphone expects? What does the manual say? Model#?

    Also, why do you WANT to show other videos on the doorphone?

    Scott
    Thank you for the fast response.
    Filenames and directories are not important: I've tried to change both filename and directory to the original file and it plays correctly. There are no other index/database/thumb type files.
    All the files converted are showed on the door phone but if I try to play them the door phone reports: "Unsupported format".

    The .jpg files are supported but I prefer a video containing a slide show of my photos with background music, as in several photo frames

    How to check for other fields/hexcodes ? With a binary editor ?
    The manual say nothing about playing other files. I don't know the model number (it is a cheap no brand model) but here is the link I've bought it from:
    w w w . aliexpress . com/item/Home-9-Door-Speakerphone-intercome-Color-Video-Take-Picture-Record-doorphone-Access-Control-System/1680600231.html


    Any other ideas?

    Thank you.

    Best regards,
    cdr
    Quote Quote  
  4. A guess:
    Hardware encoded video, Linux encoder/board.
    http://www.rpmfind.net/linux/RPM/mandriva/2008.0/i586/media/main/release/mjpegtools-1....08.0.i586.html

    Looks like they're using vintage capture software (2007(ish). Can't help you, sorry. I know nothing about linux.
    As Scott implies, without a hex dump it will be hard to compare flags with newer encoders.
    Quote Quote  
  5. It's probably a muxing issue. Try remuxing the doorphone's video and see if the result plays. View the RIFF chunk trees in VirtualDub's hex editor. Ie, the player may be poorly written and expecting to find particular chunks at particular locations.
    Last edited by jagabo; 28th Aug 2014 at 11:09.
    Quote Quote  
  6. Member Cornucopia's Avatar
    Join Date: Oct 2001
    Location: Deep in the Heart of Texas
    Search Comp PM
    Or post a 5 sec. sample clip here...

    Scott
    "When will the rhetorical questions end?!" - George Carlin
    Quote Quote  
  7. Member
    Join Date: Aug 2014
    Location: Italy
    Search PM
    Originally Posted by jagabo View Post
    It's probably a muxing issue. Try remuxing the doorphone's video and see if the result plays. View the RIFF chunk trees in VirtualDub's hex editor. Ie, the player may be poorly written and expecting to find particular chunks at particular locations.
    I don't think it is a muxing issue because striping out the audio stream from the original clip doesn't affect the playback: it works also with video only files. So I've tried using video only converted files but with no success.

    I'll try VirtualDub's hex editor, thank you.

    Here is a 4s original clip:
    http://www.mediafire.com/watch/tzdtdp3hwn2o6dm/182929_DOOR1.AVI

    Here is the .rar one:
    http://www.mediafire.com/download/d11tt95or9bofb5/182929_DOOR1.rar


    Thanks to all


    Best regards,
    cdr
    Quote Quote  
  8. Member Cornucopia's Avatar
    Join Date: Oct 2001
    Location: Deep in the Heart of Texas
    Search Comp PM
    I see it's indexed (is your re-encoded one indexed?), and it has the TrustCKtype flag (I used the AVI structure viewer in abcAVI Tag Editor).

    To thoroughly compare, though, we'd need a copy of a GOOD one and a BAD one.

    Scott
    "When will the rhetorical questions end?!" - George Carlin
    Quote Quote  
  9. See if this plays this video. It's a simple remux (with VirtualDub) of the file in post #7.
    Attached Files
    Quote Quote  
  10. Member Cornucopia's Avatar
    Join Date: Oct 2001
    Location: Deep in the Heart of Texas
    Search Comp PM
    I notice both the re-encode & the remuxed file DO NOT have the "TrustCKType" flag.

    Scott
    "When will the rhetorical questions end?!" - George Carlin
    Quote Quote  
  11. Member
    Join Date: Aug 2014
    Location: Italy
    Search PM
    Originally Posted by jagabo View Post
    See if this plays this video. It's a simple remux (with VirtualDub) of the file in post #7.
    Yes, it plays correctly, as the original. Also the video only file plays correctly. It is not a mux problem.
    I would like to see a reencoded video playing correctly

    Thanks.

    Best regards,
    cdr
    Quote Quote  
  12. Originally Posted by cdr400 View Post
    Originally Posted by jagabo View Post
    See if this plays this video. It's a simple remux (with VirtualDub) of the file in post #7.
    Yes, it plays correctly, as the original. Also the video only file plays correctly. It is not a mux problem.
    I agree.

    Try this file. I changed "XVID" to "xvid" in the strh chunck of your original video. I noticed that your re-compressed file used xvid.
    Attached Files
    Quote Quote  
  13. Member
    Join Date: Aug 2014
    Location: Italy
    Search PM
    Originally Posted by jagabo View Post
    Originally Posted by cdr400 View Post
    Originally Posted by jagabo View Post
    See if this plays this video. It's a simple remux (with VirtualDub) of the file in post #7.
    Yes, it plays correctly, as the original. Also the video only file plays correctly. It is not a mux problem.
    I agree.

    Try this file. I changed "XVID" to "xvid" in the strh chunck of your original video. I noticed that your re-compressed file used xvid.
    I cannot try the file right now (I am at office). However, I had tried to change FourCC code of the original file to DV50 and it still had played correctly.
    I don't think it is a FourCC code problem.

    Best regards,
    cdr
    Quote Quote  
  14. Member
    Join Date: Aug 2014
    Location: Italy
    Search PM
    Hi,

    with abcAVI Tag Editor (thanks to cornucopia) I've checked the differences in AVI structure of the two file "182929_DOOR1_recompress" (bad) and "182929_DOOR1 remux old format" (good), that are more similar than original door phone files.

    bad
    [dwMaxBytesPerSec]: Maximum Bytes Per Second: 0
    [fccHandler]: Handler: xvid (XviD MPEG-4 codec 'xvid' <0x64697678>)
    [dwQuality]: Stream Quality (1-10000): 10000

    good
    [dwMaxBytesPerSec]: Maximum Bytes Per Second: 385571
    [fccHandler]: Handler: XVID (XviD MPEG-4 codec 'XVID' <0x44495658>)
    [dwQuality]: Stream Quality (1-10000): -1


    I think the main difference is <0x64697678> vs <0x44495658>

    The bad file has these two inconsistent lines (fccHandler and biCompression differs) :
    [fccHandler]: Handler: xvid (XviD MPEG-4 codec 'xvid' <0x64697678>)
    [biCompression]: Compression Algorithm: XVID (XviD MPEG-4 codec 'XVID' <0x44495658>)

    while the good one has (fccHandler and biCompression are the same):
    [fccHandler]: Handler: XVID (XviD MPEG-4 codec 'XVID' <0x44495658>)
    [biCompression]: Compression Algorithm: XVID (XviD MPEG-4 codec 'XVID' <0x44495658>)

    Also the "Maximum Bytes Per Second" could have some importance.

    With FourCC changer is possible to change [fccHandler] and [biCompression] but how to change other values ?

    However the problem could be not the FourCC code itself but the inconsistency between [fccHandler] and [biCompression]


    Thanks to all.


    Best regards,
    cdr
    Quote Quote  
  15. Originally Posted by cdr400 View Post
    I think the main difference is <0x64697678> vs <0x44495658>
    Those are the fourcc codes viewed as 32 bit hex values rather than ASCII text:. Get an ASCII chart and you'll see:

    http://ascii-code.com/

    0x64697678:
    0x64 = "d"
    0x69 = "i"
    0x76 = "v"
    0x79 = "x"

    0x44495658:
    0x44 = "D"
    0x49 = "I"
    0x56 = "V"
    0x58 = "X"

    They're backward in that representation because intel CPUs are little endian.

    The second video I uploaded will tell you whether "xvid" vs. "XVID" makes any difference. Keep in mind that the fourcc appears in at least two places in an AVI file. In the "strh" chucnk and the "strf" chunk. I've see players that are case sensitive with one or the other.

    Name:  strh.png
Views: 122
Size:  24.4 KB

    Name:  strf.png
Views: 122
Size:  24.5 KB
    Last edited by jagabo; 29th Aug 2014 at 08:07.
    Quote Quote  
  16. Member
    Join Date: Aug 2014
    Location: Italy
    Search PM
    Hi,

    I've tried your second video uploaded (182929_DOOR1 xivd.AVI) and it plays correctly...
    I've also tried to set XVID / XVID with FourCC code changer to the bad file and it still doesn't play

    How to change these tag ?
    [dwMaxBytesPerSec]: Maximum Bytes Per Second: 0
    [dwQuality]: Stream Quality (1-10000): 10000

    Any other ideas ?

    Thanks again

    Best regards,
    cdr
    Quote Quote  
  17. Member Cornucopia's Avatar
    Join Date: Oct 2001
    Location: Deep in the Heart of Texas
    Search Comp PM
    I don't know if fourcc code changer changes the fourcc correctly in BOTH places as mentioned by jagabo. You could always test that out. Regardless, you could easily use a hex editor to change the fourcc (1st instance), fourcc (2nd instance), or the dwMaxBytesPerSec or dwQuality, TrustCKType or any flag. You can use Vdub's (as long as you don't try WHILE you've loaded the file in Vdub!), but it is pretty minimal. I'd use HxD or similar.

    Scott
    "When will the rhetorical questions end?!" - George Carlin
    Quote Quote  
  18. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    Where would you adjust the dwMaxBytesPerSec , dwQuality, TrustCKType ? I don't see the corresponding entries in a hex editor or vdub's hex editor

    What about the "junk" space entries in the header from the vdub encoded file? Is it possible that affects playback ? and will deleting it have any "bad" effects ?
    Quote Quote  
  19. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    It looks like the dwMaxBytesPerSec is filled when you do a 2pass encode with xvidvfw in vdub. It's "0" when used in quantizer or 1pass ABR mode. It probably has to do with the VBV maxrate
    Quote Quote  
  20. You can use VirtualDub's hex editor and its RIFF Chunk Tree veiwer to locate the various fields in the headers.

    Click image for larger version

Name:	riff.png
Views:	11
Size:	53.3 KB
ID:	27142

    Or you can parse the headers yourself:
    http://msdn.microsoft.com/en-us/library/windows/desktop/dd318180%28v=vs.85%29.aspx
    Last edited by jagabo; 29th Aug 2014 at 13:45.
    Quote Quote  
  21. Member
    Join Date: Aug 2014
    Location: Italy
    Search PM
    Originally Posted by Cornucopia View Post
    I don't know if fourcc code changer changes the fourcc correctly in BOTH places as mentioned by jagabo. You could always test that out. Regardless, you could easily use a hex editor to change the fourcc (1st instance), fourcc (2nd instance), or the dwMaxBytesPerSec or dwQuality, TrustCKType or any flag. You can use Vdub's (as long as you don't try WHILE you've loaded the file in Vdub!), but it is pretty minimal. I'd use HxD or similar.

    Scott
    I confirm that FourCC code changer change the code in both places.
    I use UltraEdit as Hex Editor but how to find dwMaxBytesPerSec field ?

    Thanks,
    cdr

    Edit: ops...
    Quote Quote  
  22. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    Originally Posted by jagabo View Post
    You can use VirtualDub's hex editor and its RIFF Chunk Tree veiwer to locate the various fields in the headers.


    Or you can parse the headers yourself:
    http://msdn.microsoft.com/en-us/library/windows/desktop/dd318180%28v=vs.85%29.aspx

    Thanks. I just had a weird deja vu moment, because I asked you almost the exact same thing before!
    Quote Quote  
  23. Last edited by jagabo; 29th Aug 2014 at 13:44.
    Quote Quote  
  24. Member
    Join Date: Aug 2014
    Location: Italy
    Search PM
    Hi,

    I've edited the bad file changing [dwMaxBytesPerSec] and [dwQuality] fields

    But it doesn't play...

    Here is the edited file:
    https://www.mediafire.com/?0yuh91pd8peqqpj

    How to remove the padding field ?
    Any other suggestion ?

    Thank you.

    Best regards,
    cdr
    Last edited by cdr400; 30th Aug 2014 at 07:31.
    Quote Quote  
  25. The padding field doesn't appear to be a problem because the first file I sent you, your original file remixed with VirtualDub, includes a big padding JUNK chunk. You say that file played properly.

    By the way, your recompressed file in post #7 was AVI 2.0 (it contains an ODML chunk) not AVI 1.0.

    When you say the files don't play -- what exactly happens? Can you see the files in the menu (assuming it has some kind of menu for picking recordings)? Does it attempt to play them? Do you get an error message? Do you get a blank screen? Do you get a garbled picture? If it tries to play the video does it play the video (blank or garbled picture) for the correct duration? The answers to those questions might give some hint as to what's going wrong.
    Quote Quote  
  26. Member
    Join Date: Aug 2014
    Location: Italy
    Search PM
    Originally Posted by jagabo View Post
    The padding field doesn't appear to be a problem because the first file I sent you, your original file remixed with VirtualDub, includes a big padding JUNK chunk. You say that file played properly.

    By the way, your recompressed file in post #7 was AVI 2.0 (it contains an ODML chunk) not AVI 1.0.

    When you say the files don't play -- what exactly happens? Can you see the files in the menu (assuming it has some kind of menu for picking recordings)? Does it attempt to play them? Do you get an error message? Do you get a blank screen? Do you get a garbled picture? If it tries to play the video does it play the video (blank or garbled picture) for the correct duration? The answers to those questions might give some hint as to what's going wrong.
    Yes, the first file with padding JUNK chunk played properly.

    You are right, the recompressed file in post #7 was AVI 2.0 but I've resaved in AVI 1.0 with Virtual Dub but still no go.

    All the files, good, bad, jpg, mp3 and other video format are shown on the files browser of the door phone.
    When I try to launch a bad file it reports this error: "unsupported format". Then it returns to files browser.
    With some files the error is reported immediately, with others after a few seconds. In the latter case the door phone hangs with black screen and requires a reset. No garbled picture was ever shown. No playing video with blank screen.
    Only in one case (but I don't remember which) the first frame of the video has been showed correctly and immediately after the error "unsupported format" was shown.

    Thank you very much for your patience.

    Best regards,
    cdr
    Quote Quote  
  27. Member
    Join Date: Aug 2014
    Location: Italy
    Search PM
    Hi,

    in this video you can see the door phone browser and the error reported.
    I hope to get some other suggestion

    https://www.mediafire.com/?qvn57kc297x7kga

    Thank you.

    Best regards,
    cdr
    Quote Quote  
  28. You've tried the most obvious possibilities. About all I can suggest is that you go through all the Xvid settings and try all options. I don't know of a program that will tell you what matrix the source AVI uses. So try using both the h.263 and MPEG matrix.

    Beyond that I would start by disabling everything you can in the Xvid settings and see if you can get that to play. If you can then try enabling features one or two at a time until you figure out what's causing problems. Try using Divx instead of Xvid (you may have to manually patch the fourcc since Divx will use DX50/DIVX). Try using AviDemux instead of VirtualDub. Or some other non-Xvid based MPEG 4 ASP encoder.

    I used ffdshow's Xvid decoder to examine some of the other properties of the working video. You can force the decoder to show motion vectors, quantizers, etc.

    Name:  ffds.jpg
Views: 90
Size:  145.4 KB

    The working video uses adaptive quantization but I doubt the lack of that would cause issues with the player. It uses motion vectors so I doubt that's an issue (your reencoded video does too). I did see one oddity, the input bitrate sometimes dropped to zero though the coded frame size did not. I don't know what that means.
    Quote Quote  
  29. Member Cornucopia's Avatar
    Join Date: Oct 2001
    Location: Deep in the Heart of Texas
    Search Comp PM
    To keep things straight, you may want to label (either in filename or as a subtitle burn-in) each of your trials, so you'll know clearly which ones worked and which didn't.

    I agree with jagabo, re: the path to try next.

    BTW, have you tried remuxing not just with NO audio, but with different audio? Or trying a re-encode with no audio muxed (just to rule audio out completely)?

    Scott
    "When will the rhetorical questions end?!" - George Carlin
    Quote Quote