VideoHelp Forum

Try DVDFab and copy Ultra HD Blu-rays and DVDs! Or rip iTunes movies and music! Download free trial !
+ Reply to Thread
Results 1 to 10 of 10
Thread
  1. Hi.
    I got a kid's toy camera, a really simple one.
    It doesn't even have interface nor software for PC.
    Reading the sd card, it records AVI files.
    My idea was to match the format, in order to record my video files using better resources, encode themand put them again on the camera to be able to viewing.
    Trouble is, no matter the analysis or settings I use, my files are no recognized on the camera.
    I also made some tests such replacing a local file name with mine.

    Original camera file properties
    Code:
    General
    Complete name                            : C:\Pictures\Camera Roll\MOVI0000_origen.avi
    Format                                   : AVI
    Format/Info                              : Audio Video Interleave
    File size                                : 15.9 MiB
    Duration                                 : 10 s 667 ms
    Overall bit rate                         : 12.5 Mb/s
    Director                                 : Generplus
    Original source form/Distributed by      : Generplus
    Recorded date                            : 2010-06-29
    Copyright                                : Generplus
    
    Video
    ID                                       : 0
    Format                                   : JPEG
    Codec ID                                 : MJPG
    Duration                                 : 10 s 667 ms
    Bit rate                                 : 17.1 Mb/s
    Width                                    : 1 280 pixels
    Height                                   : 720 pixels
    Display aspect ratio                     : 16:9
    Frame rate                               : 30.000 FPS
    Color space                              : YUV
    Chroma subsampling                       : 4:2:2
    Bit depth                                : 8 bits
    Compression mode                         : Lossy
    Bits/(Pixel*Frame)                       : 0.619
    Stream size                              : 21.7 MiB
    
    Audio
    ID                                       : 1
    Format                                   : PCM
    Format settings                          : Little / Signed
    Codec ID                                 : 1
    Duration                                 : 10 s 500 ms
    Bit rate mode                            : Constant
    Bit rate                                 : 256 kb/s
    Channel(s)                               : 1 channel
    Sampling rate                            : 16.0 kHz
    Bit depth                                : 16 bits
    Stream size                              : 328 KiB (2%)
    Alignment                                : Aligned on interleaves
    Interleave, duration                     : 508  ms (15.24 video frames)
    Iīm using MediaCoder andthese are the settings for the best file I have exported (more like original) settings [not recognized in camera]
    Code:
    General
    Complete name                            : C:\Users\swane\Pictures\Camera Roll\MOVI0000_1.avi
    Format                                   : AVI
    Format/Info                              : Audio Video Interleave
    File size                                : 7.35 MiB
    Duration                                 : 20 s 565 ms
    Overall bit rate                         : 2 998 kb/s
    Writing application                      : Lavf58.29.100
    
    Video
    ID                                       : 0
    Format                                   : JPEG
    Codec ID                                 : MJPG
    Duration                                 : 20 s 529 ms
    Bit rate                                 : 2 738 kb/s
    Width                                    : 1 280 pixels
    Height                                   : 720 pixels
    Display aspect ratio                     : 16:9
    Frame rate                               : 16.416 FPS
    Color space                              : YUV
    Bit depth                                : 8 bits
    Scan type                                : Progressive
    Compression mode                         : Lossy
    Bits/(Pixel*Frame)                       : 0.181
    Stream size                              : 6.70 MiB (91%)
    
    Audio
    ID                                       : 1
    Format                                   : PCM
    Format settings                          : Little / Signed
    Codec ID                                 : 1
    Duration                                 : 20 s 565 ms
    Bit rate mode                            : Constant
    Bit rate                                 : 256 kb/s
    Channel(s)                               : 1 channel
    Sampling rate                            : 16.0 kHz
    Bit depth                                : 16 bits
    Stream size                              : 643 KiB (9%)
    Alignment                                : Aligned on interleaves
    Interleave, duration                     : 128  ms (2.09 video frames)
    Settings for such file
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <MediaCoderPrefs>
       <node key="overall.audio.channels">Mono (Downmix)</node>
       <node key="overall.audio.source">FFmpeg</node>
       <node key="overall.audio.format">PCM</node>
       <node key="overall.audio.encoder">FFmpeg</node>
       <node key="overall.video.csp">I444</node>
       <node key="overall.video.mode">VBR</node>
       <node key="overall.video.bitrate">16000</node>
       <node key="overall.video.autoBitrate">By Ratio</node>
       <node key="overall.video.quality">80</node>
       <node key="overall.video.bitrateRatio">75</node>
       <node key="overall.video.ar">Set PAR</node>
       <node key="overall.video.format">MJPEG</node>
       <node key="overall.video.encoder">FFmpeg</node>
       <node key="overall.container.format">AVI</node>
       <node key="overall.container.external">Enabled</node>
       <node key="overall.container.muxer">FFmpeg</node>
       <node key="overall.preview.mode">Off</node>
       <node key="muxer.mp4box.inter">0</node>
       <node key="audiofilter.resample.samplerate">16000</node>
       <node key="audiofilter.volume.normalization">true</node>
       <node key="videofilter.generic.applicator">Encoder</node>
       <node key="videofilter.scale.enabled">true</node>
       <node key="videofilter.scale.width">1280</node>
       <node key="videofilter.scale.height">720</node>
       <node key="videofilter.frame.enabled">true</node>
       <node key="videofilter.frame.fps">30</node>
    </MediaCoderPrefs>
    Do you have a suggestion of something else I can change?
    Quote Quote  
  2. Some other differences are the frame rate (30.0 vs. 16.416), and pixel format (422 vs 444 - if "<node key="overall.video.csp">I444</node>" was passed correctly), and audio interleave duration

    If you change those and still cannot get it working, upload a small sample from the camera

    The AVI container can have differences as well, that are not revealed by mediainfo, and there might be metadata preventing it from working
    Quote Quote  
  3. Thanks a lot for the so quick answer!
    I made the modifications I saw pertinent, according your comments but still didnīt worked.
    I upload the file I tried to run and I record a new one for comparison (Interesting and lateral thing, camera did saw my file and create the new one with good subsequent name, but still skip playback of my video)

    My file with the new settings
    https://app.box.com/s/53dl9yn7rm8q5a3y8m61qg0tf0bup0m5
    Properties
    Code:
    General
    Complete name                            : E:\DCIM\MOVI0002.avi
    Format                                   : AVI
    Format/Info                              : Audio Video Interleave
    File size                                : 12.6 MiB
    Duration                                 : 10 s 600 ms
    Overall bit rate                         : 9 995 kb/s
    Director                                 : Generplus
    Original source form/Distributed by      : Generplus
    Recorded date                            : 2010-06-29
    Copyright                                : Generplus
    
    Video
    ID                                       : 0
    Format                                   : JPEG
    Codec ID                                 : MJPG
    Duration                                 : 10 s 600 ms
    Bit rate                                 : 13.4 Mb/s
    Width                                    : 1 280 pixels
    Height                                   : 720 pixels
    Display aspect ratio                     : 16:9
    Frame rate                               : 30.000 FPS
    Color space                              : YUV
    Chroma subsampling                       : 4:2:2
    Bit depth                                : 8 bits
    Compression mode                         : Lossy
    Bits/(Pixel*Frame)                       : 0.483
    Stream size                              : 16.9 MiB
    
    Audio
    ID                                       : 1
    Format                                   : PCM
    Format settings                          : Little / Signed
    Codec ID                                 : 1
    Duration                                 : 10 s 500 ms
    Bit rate mode                            : Constant
    Bit rate                                 : 256 kb/s
    Channel(s)                               : 1 channel
    Sampling rate                            : 16.0 kHz
    Bit depth                                : 16 bits
    Stream size                              : 328 KiB (3%)
    Alignment                                : Aligned on interleaves
    Interleave, duration                     : 505  ms (15.14 video frames)
    New settings
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    -<MediaCoderPrefs>
       <node key="overall.audio.channels">Mono (Downmix)</node>
       <node key="overall.audio.source">FFmpeg</node>
       <node key="overall.audio.format">PCM</node>
       <node key="overall.audio.encoder">FFmpeg</node>
       <node key="overall.video.csp">I422</node>
       <node key="overall.video.mode">CBR</node>
       <node key="overall.video.bitrate">1562</node>
       <node key="overall.video.quality">80</node>
       <node key="overall.video.bitrateRatio">75</node>
       <node key="overall.video.ar">Set PAR</node>
       <node key="overall.video.format">MJPEG</node>
       <node key="overall.video.encoder">FFmpeg</node>
       <node key="overall.container.format">AVI</node>
       <node key="overall.container.external">Enabled</node>
       <node key="overall.container.muxer">FFmpeg</node>
       <node key="overall.preview.mode">Off</node>
       <node key="muxer.mp4box.inter">0</node>
       <node key="audiofilter.resample.samplerate">16000</node>
       <node key="videofilter.generic.applicator">Encoder</node>
       <node key="videofilter.scale.enabled">true</node>
       <node key="videofilter.scale.width">1280</node>
       <node key="videofilter.scale.height">720</node>
       <node key="videofilter.frame.enabled">true</node>
       <node key="videofilter.frame.fps">30</node>
    </MediaCoderPrefs>
    New video from camera for comparison
    https://app.box.com/s/aopksj8eowtxb8mponvw1e9coqxo4d6r
    Properties
    Code:
    General
    Complete name                            : E:\DCIM\MOVI0003.avi
    Format                                   : AVI
    Format/Info                              : Audio Video Interleave
    File size                                : 31.5 MiB
    Duration                                 : 26 s 500 ms
    Overall bit rate                         : 9 976 kb/s
    Director                                 : Generplus
    Original source form/Distributed by      : Generplus
    Recorded date                            : 2010-06-29
    Copyright                                : Generplus
    
    Video
    ID                                       : 0
    Format                                   : JPEG
    Codec ID                                 : MJPG
    Duration                                 : 26 s 467 ms
    Bit rate                                 : 13.4 Mb/s
    Width                                    : 1 280 pixels
    Height                                   : 720 pixels
    Display aspect ratio                     : 16:9
    Frame rate                               : 30.000 FPS
    Color space                              : YUV
    Chroma subsampling                       : 4:2:2
    Bit depth                                : 8 bits
    Compression mode                         : Lossy
    Bits/(Pixel*Frame)                       : 0.484
    Stream size                              : 42.2 MiB
    
    Audio
    ID                                       : 1
    Format                                   : PCM
    Format settings                          : Little / Signed
    Codec ID                                 : 1
    Duration                                 : 26 s 500 ms
    Bit rate mode                            : Constant
    Bit rate                                 : 256 kb/s
    Channel(s)                               : 1 channel
    Sampling rate                            : 16.0 kHz
    Bit depth                                : 16 bits
    Stream size                              : 828 KiB (3%)
    Alignment                                : Aligned on interleaves
    Interleave, duration                     : 499  ms (14.98 video frames)
    Quote Quote  
  4. Member DB83's Avatar
    Join Date
    Jul 2007
    Location
    United Kingdom
    Search Comp PM
    Are you just making work for yourself. Or are you simply unable to view the camera video on your PC ?


    vlc will play your latest sample just fine.
    Quote Quote  
  5. I think it counts as work for myself. I want to give the camera with preloaded videos to my kid to be seen directly on camera display
    Quote Quote  
  6. I think some decoders may have problems with ffmpeg's (and thus mediacoder's) mjpeg 422 encoding . eg. vdub's native mjpeg decoder reports "mulitple chroma blocks not supported" when trying to decode it. It's possible some HW decoders have problems with it too

    Can you test this on the camera, it uses picvideo 422 to encode, AVI1.0 like your camera file, and audio interleave 500ms
    Image Attached Files
    Quote Quote  
  7. Member DB83's Avatar
    Join Date
    Jul 2007
    Location
    United Kingdom
    Search Comp PM
    Here is an experiment for you.


    Shoot a video on the camera. Copy it from the SD card. Delete video on camera(not from the card while in the PCD) and then transfer video back to SD card. Does it work ?
    Quote Quote  
  8. Try to replace the first bytes in your avi's like in the following picture (only the marked bytes) with a hex-editor.

    Click image for larger version

Name:	01.jpg
Views:	11
Size:	26.1 KB
ID:	55104
    Quote Quote  
  9. Originally Posted by poisondeathray View Post
    I think some decoders may have problems with ffmpeg's (and thus mediacoder's) mjpeg 422 encoding . eg. vdub's native mjpeg decoder reports "mulitple chroma blocks not supported" when trying to decode it. It's possible some HW decoders have problems with it too

    Can you test this on the camera, it uses picvideo 422 to encode, AVI1.0 like your camera file, and audio interleave 500ms
    Thanks a lot, I tried it but wasnīt recognized either.
    Quote Quote  
  10. Cheap devices like that often aren't tolerant of variations in the AVI structure. It could something like the exact size and location of different data elements of the AVI structure (this varies from muxer to muxer), or something stupid the "Generplus" tag near the end of the video.
    Quote Quote  



Similar Threads