Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
![]() |
|
Thread Tools | Search this Thread | Display Modes |
![]() |
#1 | Link |
Registered User
Join Date: Feb 2025
Location: France
Posts: 13
|
MP4 to AVI conversion incompatible (playback problem with camera)
Hi,
I bought a child camera for my daughter, and it can shoot videos in AVI format. It has an SD card on it, so you can easily add videos manually (provided you keep the right numbering), and play them with the camera. I have a problem: I recovered a small 3-minute cartoon in MP4 and when I try to convert it to the same AVI format (Motion Jpeg) as a Video generated by the device, the generated video is unreadable, although support told me that normally there was no problem doing this kind of thing. I've tried hundreds of may to convert with tools like ffmpeg, AviDemux and VLC, but nothing works, although the GSpot software tells me that the generated video has the right Video and Audio Codecs. Could you tell me how you would do it, and with which tools please? Video MP4 source: https://limewire.com/d/27c70af9-32d7...VGfq7KfhHHDEGg AVI video generated by the camera: https://limewire.com/d/086063bc-6e58...oFVthyi_7qjos8 Format genereted by the camera: Code:
Motion JPEG (MJPG) - 70 Frms - 25244 kbps - 30 Pics/s - 30 Frames/s 1920 x 1080 PCM Audio - 16000 Hz - 32000 Bps / 256 kb/s (1 chnl - mono)YUV 4:2:0, 8 bits Hexa editor says that video is packed with: Generalplug AviPackerV3 https://forum.videohelp.com/threads/...m-with-camera) https://forum.hardware.fr/hfr/VideoS...2.htm#t2367640 PS : I tried to copy/paste an existing video located on the device + renumbering, and it works perfectly, so the problem is not there. Last edited by cedico; 22nd February 2025 at 11:46. |
![]() |
![]() |
![]() |
#2 | Link |
Life's clearer in 4K UHD
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,356
|
Your Dropbox links want people to "sign up" for their service, which I don't want to do!
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
|
![]() |
![]() |
![]() |
#4 | Link |
Big Bit Savings Now !
Join Date: Feb 2007
Location: close to the wall
Posts: 1,928
|
The same: Big G requires personal login credentials here. What about wetransfer.com ?
Inbetween you may add mediaInfo of camera file and your encoding attempt file(s) and which encoder and which settings were used. BTW. MJPEG in FHD is not everyday's choice, the bitrate should be rather high (more than BD-Bitrate ?), unexpected high for a children's cam, and then on SD. Just curious. P.S. Well, Generalplug AviPackerV3. If some bright mind decided to compress further additionally applying non-video data reduction algos, then you are out of luck. Proprietary solution to bind you to that cam forever.
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain) "Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..." Last edited by Emulgator; 22nd February 2025 at 00:01. |
![]() |
![]() |
![]() |
#5 | Link |
Registered User
Join Date: Feb 2025
Location: France
Posts: 13
|
Ok, I've uploaded and shared the 2 movie files using another website (WeTransfer keeps files only during 7 days apparently). The links below has been updated in the initial post.
Is it ok now ? Here the main command line i've used to encode the file : Code:
ffmpeg -i "D:\Les petites princesses du monde.mp4" -s 1920x1080 -c:v mjpeg -q:v 5 -ac 1 -c:a pcm_s16le -ar 16000 "D:\Les petites princesses du monde 1080p.avi" https://github.com/wythe-lin/ZTKVR/b.../AviPackerV3.c Even if this pack encoder is more than 10 years old, maybe it contains interesting data that could help me to re-encode my video? Last edited by cedico; 22nd February 2025 at 12:13. |
![]() |
![]() |
![]() |
#6 | Link |
Big Bit Savings Now !
Join Date: Feb 2007
Location: close to the wall
Posts: 1,928
|
Yes, downloaded fine. MOVI0075.avi is straight decodable here,
mediainfo shows MJPEG FHD 30p 8-bit 4:2:0@ 25,5Mbps + PCM 1.0 16 bit @fs 16kHz, nothing odd. Your encode has completely different parameters and is not comparable. Or is it not your encode ? "Les petites princesses du monde.mp4" has wrong codecs/parameters. 399kbps AV1 1280x720x30p 8-bit 4:2:0 + 128kbps LC-AAC 2.0 @ 44,1kHz AV1+AAC can definitely not be decoded by a children's cam, at least not from the past. P.S. I see. Not the encode, it is the source. Please post your encode as well, otherwise we have no comparison. Solution would be a full transcode with audio resampling, should be well possible in ffmpeg in one go, but I would rather decode/encode streams separately...
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain) "Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..." Last edited by Emulgator; 22nd February 2025 at 16:05. |
![]() |
![]() |
![]() |
#7 | Link | ||||
Registered User
Join Date: Feb 2025
Location: France
Posts: 13
|
Quote:
Quote:
Quote:
The MOVI0075.avi file, is a file generated by the camera but I really don't know how the engineers did or how the camera hardware has encoded it. I've just suspected that the camera was using Generalplug AviPackerV3, but it is a supposition because I've read this information in the HEXA movie file. Quote:
![]() |
||||
![]() |
![]() |
![]() |
#8 | Link | ||
Big Bit Savings Now !
Join Date: Feb 2007
Location: close to the wall
Posts: 1,928
|
Quote:
AND the camera objects because it finds differences, or is just used to that subset, then after any outside encode the mux would have to be done by the very same tool, Generalplug AviPackerV3. "Your encode" would be the result of your ffmpeg commandline, if you could upload that attempt it might be useful to compare against, and if not..well, then not. https://github.com/wythe-lin/ZTKVR/tree/master is a good find and it could well be that the firmware of that children's cam has been compiled from that source, or a branch. Quote:
Care to name the children's cam Maker/Model ?
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain) "Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..." Last edited by Emulgator; 23rd February 2025 at 14:20. |
||
![]() |
![]() |
![]() |
#10 | Link | ||
Registered User
Join Date: Feb 2025
Location: France
Posts: 13
|
Quote:
https://limewire.com/d/40175e51-fb1a...w8Bcxqo7PnlPW0 Could you send one of your encoding method (command line with all params), for me to test please ? Quote:
|
||
![]() |
![]() |
![]() |
#13 | Link |
Life's clearer in 4K UHD
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,356
|
@ cedico,
What is the make and model or the camera. It would be very odd if it only supported just M-JPG video with PCM audio (within the .avi container) as the resulting file sizes are huge!
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
|
![]() |
![]() |
![]() |
#14 | Link | |
Registered User
Join Date: Feb 2025
Location: France
Posts: 13
|
Quote:
Sorry for my ignorance, but what do you mean by remux the movie? Which tool and wich command line do you want me to use, to process the remuxing please? |
|
![]() |
![]() |
![]() |
#15 | Link | |
Registered User
Join Date: Feb 2025
Location: France
Posts: 13
|
Quote:
(with thermal printing) |
|
![]() |
![]() |
![]() |
#16 | Link | |
Registered User
Join Date: Aug 2024
Posts: 572
|
Quote:
Code:
ffmpeg -i MOVI0075.avi -c copy MOVI0075_remux.avi |
|
![]() |
![]() |
![]() |
#17 | Link | |
Registered User
Join Date: Feb 2025
Location: France
Posts: 13
|
Quote:
As my previous tests, the camera detects there is a new file, but nothing more. ![]() |
|
![]() |
![]() |
![]() |
#18 | Link |
Big Bit Savings Now !
Join Date: Feb 2007
Location: close to the wall
Posts: 1,928
|
Using abcAVI to export properties and diffing both .txt files using WinMerge I find some mismatches, maybe junk entries from the cam.
number of planes, audio stream scale, audio stream rate... MOVI0075.txt: Code:
[RIFF AVI 12189688]: Audio/Video Interleaved File [LIST hdrl 4064]: Format Definition Chunk [avih 56]: Main AVI Header [dwMicroSecPerFrame]: Microseconds Per Frame: 33333 [dwMaxBytesPerSec]: Maximum Bytes Per Second: 0 [dwPaddingGranularity]: Padding Granularity (bytes): 0 [dwFlags]: Flags 0x00000110 [AVIF_HASINDEX]: AVI file has 'idx1' chunk [AVIF_ISINTERLEAVED]: AVI file is interleaved [dwTotalFrames]: Number Of Frames: 130 [dwInitialFrames]: Numer Of Initial Frames: 0 [dwStreams]: Number Of Streams: 2 [dwSuggestedBufferSize]: Suggested Buffer Size (bytes): 0 [dwWidth]: Image Width (pixels): 1920 [dwHeight]: Image Height (pixels): 1080 [LIST strl 116]: Stream Format Definition Chunk [strh 56]: Stream Header [fccType]: Type: vids (Video Data) [fccHandler]: Handler: mjpg (Motion JPEG including Huffman Tables 'mjpg' <0x67706A6D>) [dwFlags]: Flags 0x00000000 [wPriority]: Stream Priority: 0 [wLanguage]: Language: 0 (Undefined) [dwInitialFrames]: Numer Of Initial Frames: 0 [dwScale]: Stream Scale: 1 [dwRate]: Stream Rate: 30 [dwStart]: Stream Start: 0 [dwLength]: Stream Duration: 130 [dwSuggestedBufferSize]: Suggested Buffer Size (bytes): 119026 [dwQuality]: Stream Quality (1-10000): 0 [dwSampleSize]: Sample Size: 0 [rcFrame]: Frame Size Of Stream [wX1]: Top: 0 [wY1]: Bottom: 0 [wX2]: Left: 1920 [wY2]: Right: 1080 [strf 40]: Video Stream Format [biSize]: Header Size (bytes): 40 [biWidth]: Image Width (pixels): 1920 [biHeight]: Image Height (pixels): 1080 [biPlanes]: Number Of Planes: 0 [biBitCount]: Number Of Bits Per Pixel: 24 [biCompression]: Compression Algorithm: MJPG (Motion JPEG including Huffman Tables 'MJPG' <0x47504A4D>) [biSizeImage]: Image Size (bytes, 0 = uncompressed): 6220800 [biXPelsPerMeter]: Horizontal resolution of target device: 0 [biYPelsPerMeter]: Vertical resolution of target device: 0 [biClrUsed]: Number of colors used (0 = maximum): 0 [biClrImportant]: Number of important colors (0 = all): 0 [LIST strl 92]: Stream Format Definition Chunk [strh 56]: Stream Header [fccType]: Type: auds (Audio Data) [fccHandler]: Handler: 0x00000001 (Run length encoded 8bpp RGB image <0x00000001>) [dwFlags]: Flags 0x00000000 [wPriority]: Stream Priority: 0 [wLanguage]: Language: 0 (Undefined) [dwInitialFrames]: Numer Of Initial Frames: 0 [dwScale]: Stream Scale: 2 [dwRate]: Stream Rate: 32000 [dwStart]: Stream Start: 0 [dwLength]: Stream Duration: 64000 [dwSuggestedBufferSize]: Suggested Buffer Size (bytes): 0 [dwQuality]: Stream Quality (1-10000): 0 [dwSampleSize]: Sample Size: 2 [rcFrame]: Frame Size Of Stream [wX1]: Top: 0 [wY1]: Bottom: 0 [wX2]: Left: 0 [wY2]: Right: 0 [strf 16]: Audio Stream Format [wFormatTag]: Audio Format: 0x0001 (Microsoft PCM Format <0x0001>) [nChannels]: Number of channels: 1 [nSamplesPerSec]: Frequency of the sample rate (Hz): 16000 [nAvgBytesPerSec]: Average data rate (byte/s): 32000 [nBlockAlign]: Block alignment of the data (bytes): 2 [wBitsPerSample]: Number of bits per sample (0 = undefined): 16 [cbSize]: Size of extra information (bytes): 0 [JUNK 3764]: Padding [LIST movi 12071940]: Audio/Video Data Skipped [JUNK 48112]: Padding [idx1 2144]: AVI Index Chunk [LIST INFO 4]: RIFF Textual Informative Details [JUNK 63372]: Padding Les petites princesses du monde 1080p.txt : Code:
[RIFF AVI 573288810]: Audio/Video Interleaved File [LIST hdrl 8892]: Format Definition Chunk [avih 56]: Main AVI Header [dwMicroSecPerFrame]: Microseconds Per Frame: 33333 [dwMaxBytesPerSec]: Maximum Bytes Per Second: 57000 [dwPaddingGranularity]: Padding Granularity (bytes): 0 [dwFlags]: Flags 0x00000910 [AVIF_HASINDEX]: AVI file has 'idx1' chunk [AVIF_ISINTERLEAVED]: AVI file is interleaved [AVIF_TRUSTCKTYPE]: use chunk type to find key frames [dwTotalFrames]: Number Of Frames: 6196 [dwInitialFrames]: Numer Of Initial Frames: 0 [dwStreams]: Number Of Streams: 2 [dwSuggestedBufferSize]: Suggested Buffer Size (bytes): 1048576 [dwWidth]: Image Width (pixels): 1920 [dwHeight]: Image Height (pixels): 1080 [LIST strl 4320]: Stream Format Definition Chunk [strh 56]: Stream Header [fccType]: Type: vids (Video Data) [fccHandler]: Handler: MJPG (Motion JPEG including Huffman Tables 'MJPG' <0x47504A4D>) [dwFlags]: Flags 0x00000000 [wPriority]: Stream Priority: 0 [wLanguage]: Language: 0 (Undefined) [dwInitialFrames]: Numer Of Initial Frames: 0 [dwScale]: Stream Scale: 1 [dwRate]: Stream Rate: 30 [dwStart]: Stream Start: 0 [dwLength]: Stream Duration: 6196 [dwSuggestedBufferSize]: Suggested Buffer Size (bytes): 130138 [dwQuality]: Stream Quality (1-10000): -1 [dwSampleSize]: Sample Size: 0 [rcFrame]: Frame Size Of Stream [wX1]: Top: 0 [wY1]: Bottom: 0 [wX2]: Left: 1920 [wY2]: Right: 1080 [strf 40]: Video Stream Format [biSize]: Header Size (bytes): 40 [biWidth]: Image Width (pixels): 1920 [biHeight]: Image Height (pixels): 1080 [biPlanes]: Number Of Planes: 1 [biBitCount]: Number Of Bits Per Pixel: 24 [biCompression]: Compression Algorithm: MJPG (Motion JPEG including Huffman Tables 'MJPG' <0x47504A4D>) [biSizeImage]: Image Size (bytes, 0 = uncompressed): 6220800 [biXPelsPerMeter]: Horizontal resolution of target device: 0 [biYPelsPerMeter]: Vertical resolution of target device: 0 [biClrUsed]: Number of colors used (0 = maximum): 0 [biClrImportant]: Number of important colors (0 = all): 0 [JUNK 4120]: Padding [vprp 68]: AVI2 (OpenDML) Video Header [LIST strl 4220]: Stream Format Definition Chunk [strh 56]: Stream Header [fccType]: Type: auds (Audio Data) [fccHandler]: Handler: 0x00000001 (Run length encoded 8bpp RGB image <0x00000001>) [dwFlags]: Flags 0x00000000 [wPriority]: Stream Priority: 0 [wLanguage]: Language: 0 (Undefined) [dwInitialFrames]: Numer Of Initial Frames: 0 [dwScale]: Stream Scale: 1 [dwRate]: Stream Rate: 16000 [dwStart]: Stream Start: 0 [dwLength]: Stream Duration: 3305407 [dwSuggestedBufferSize]: Suggested Buffer Size (bytes): 744 [dwQuality]: Stream Quality (1-10000): -1 [dwSampleSize]: Sample Size: 2 [rcFrame]: Frame Size Of Stream [wX1]: Top: 0 [wY1]: Bottom: 0 [wX2]: Left: 0 [wY2]: Right: 0 [strf 16]: Audio Stream Format [wFormatTag]: Audio Format: 0x0001 (Microsoft PCM Format <0x0001>) [nChannels]: Number of channels: 1 [nSamplesPerSec]: Frequency of the sample rate (Hz): 16000 [nAvgBytesPerSec]: Average data rate (byte/s): 32000 [nBlockAlign]: Block alignment of the data (bytes): 2 [wBitsPerSample]: Number of bits per sample (0 = undefined): 16 [cbSize]: Size of extra information (bytes): 0 [JUNK 4120]: Padding [JUNK 260]: Padding [LIST INFO 26]: RIFF Textual Informative Details [ISFT 14]: Software Used: Lavf61.9.101 [JUNK 1016]: Padding [LIST movi 573037328]: Audio/Video Data Skipped [idx1 241504]: AVI Index Chunk
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain) "Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..." Last edited by Emulgator; 24th February 2025 at 03:55. |
![]() |
![]() |
![]() |
#19 | Link | |
Registered User
Join Date: Feb 2025
Location: France
Posts: 13
|
Quote:
Yes, for the Junk/metadata differences between files, I actually observed this, using GSpot (please see the 2 forums urls I've posted above). But I never succeed in playing/hacking with these junks. Could you show me what you would try to change ? and how you would do please ? I've already tested such a command line with (-map_metadata 0 -movflags +faststart) but without success : Code:
ffmpeg -i "MOVI0075.avi" -i "a.avi" -map 1 -c copy -map_metadata 0 -movflags +faststart "b.avi" |
|
![]() |
![]() |
![]() |
#20 | Link |
Big Bit Savings Now !
Join Date: Feb 2007
Location: close to the wall
Posts: 1,928
|
You would hexedit your way through until the file is accepted by your babycam.
I gave 3 hints, you have the babycam to check your results, not me.
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain) "Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..." |
![]() |
![]() |
![]() |
Tags |
codec, encoding, mjpeg, mp4 to mjpeg |
Thread Tools | Search this Thread |
Display Modes | |
|
|