svice
Posts: 14
Joined: Tue Jul 28, 2015 4:58 pm
Location: Rio de Janeiro, Brazil

Windows command-line program on RPI

Tue Jan 05, 2016 11:51 am

Greetings,

I'm struggling with a situation. I'm using a DVR device that sends files to my RPI 2 B through FTP. Unfortunately, the video files came with a proprietary .DAV format that I cannot convert on ffmpeg. The manufacturer (DAHUA) don't have a linux converter too, but a third-party developer made a cool tool that converts these files on .AVI format using CLI without reencoding everything, but it's a Windows tool, running on CMD.

Is there a way to run this windows CLI tool on my RPI?

ghans
Posts: 7883
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Windows command-line program on RPI

Tue Jan 05, 2016 11:56 am

Unless you have the source code , the answer is no.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

User avatar
rurwin
Forum Moderator
Forum Moderator
Posts: 4257
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

Re: Windows command-line program on RPI

Tue Jan 05, 2016 12:20 pm

You can only do it by turning your Pi into an x86 emulator. It would be very slow -- ten times slower than running the program on a 900MHz Windows PC.

There's a possibility the program would run under DOSBOX, which is the easiest way to get it working. But it's likely to not be DOS compatible.

Otherwise you could create an x86 emulator with qemu, put a very small Linux on that and then run your program under Wine. You could try running a proper Windows on there, but it's going to be horribly slow. If your program will run under Windows 98 then that might be an option. Anything more advanced will probably not be worth it.

svice
Posts: 14
Joined: Tue Jul 28, 2015 4:58 pm
Location: Rio de Janeiro, Brazil

Re: Windows command-line program on RPI

Tue Jan 05, 2016 1:57 pm

I've managed to convert the .DAV file in a MP4 on Windows, but I could not do the same thing on the RPi using the same parameters. Still dunno why, but even on Windows, it takes more time than I am willing to wait.
The program is fast. It takes only 3-4 seconds per proprietary video file conversion which is WAYYYYY faster than converting with ffmpeg. If the emulator could run the software, even 10 times slower, will be better than converting with ffmpeg.
I just need some orientation to try it :P

I'll try the DOSBOX anyway, but I don't think it'll run.

Thanks a lot
rurwin wrote:You can only do it by turning your Pi into an x86 emulator. It would be very slow -- ten times slower than running the program on a 900MHz Windows PC.

There's a possibility the program would run under DOSBOX, which is the easiest way to get it working. But it's likely to not be DOS compatible.

Otherwise you could create an x86 emulator with qemu, put a very small Linux on that and then run your program under Wine. You could try running a proper Windows on there, but it's going to be horribly slow. If your program will run under Windows 98 then that might be an option. Anything more advanced will probably not be worth it.

jgreen71
Posts: 92
Joined: Wed May 01, 2013 12:29 pm
Location: Clarksville, IN

Re: Windows command-line program on RPI

Tue Jan 05, 2016 2:35 pm

3-4 seconds? Honestly, it sounds like your ".DAV" file is really just renamed, and maybe some header information updated.

Can you compare the two files (original one and converted one)? Are they similar size? Does a binary compare show much difference?

svice
Posts: 14
Joined: Tue Jul 28, 2015 4:58 pm
Location: Rio de Janeiro, Brazil

Re: Windows command-line program on RPI

Tue Jan 05, 2016 2:43 pm

I think Dahua adds some bytes on the start/end of the file and removes it when changing back to regular .AVI. File size is similar too. Unfortunately, they dont pass information about the file structure so nobody came with a solution without using their proprietary development kit. Most unfortunate, the third party who built the DAV/AVI converter don't work with Linux and don't make the source available.
jgreen71 wrote:3-4 seconds? Honestly, it sounds like your ".DAV" file is really just renamed, and maybe some header information updated.

Can you compare the two files (original one and converted one)? Are they similar size? Does a binary compare show much difference?

User avatar
Laurens-wuyts
Posts: 716
Joined: Wed Aug 21, 2013 7:35 pm
Location: Belgium
Contact: Website

Re: Windows command-line program on RPI

Tue Jan 05, 2016 3:01 pm

Can you post the 2 files here? converted and not converted? So we can have a look. :)
(You'll need to add them in a zip file cause the forum doesn't allow anything else.)

Laurens

svice
Posts: 14
Joined: Tue Jul 28, 2015 4:58 pm
Location: Rio de Janeiro, Brazil

Re: Windows command-line program on RPI

Tue Jan 05, 2016 3:09 pm

The samples that I have here are 20 minutes long. I think they have around 150MB each.
I'll upload on my Gdrive and edit the post to put the link.
Edit: Here's the link
https://drive.google.com/file/d/0B53oBG ... sp=sharing
Laurens-wuyts wrote:Can you post the 2 files here? converted and not converted? So we can have a look. :)
(You'll need to add them in a zip file cause the forum doesn't allow anything else.)

Laurens

svice
Posts: 14
Joined: Tue Jul 28, 2015 4:58 pm
Location: Rio de Janeiro, Brazil

Re: Windows command-line program on RPI

Mon Jan 11, 2016 10:33 am

bump

AndyPi
Posts: 83
Joined: Wed Feb 22, 2012 10:24 pm
Location: Gloucestershire,UK

Re: Windows command-line program on RPI

Mon Jan 11, 2016 12:08 pm

Try using mkvmerge -o outfile.mkv ch3_14.00.00-14.20.00.dav.

Might have to install mkvtool-nix. Took 34 seconds.
[root@archi videos]# mkvmerge -o out.mkv ch3_14.00.00-14.20.00.dav
mkvmerge v8.7.0 ('All of the above') 32bit
'ch3_14.00.00-14.20.00.dav': Using the demultiplexer for the format 'AVC/h.264'.
'ch3_14.00.00-14.20.00.dav' track 0: Using the output module for the format 'AVC/h.264 (unframed)'.
The file 'out.mkv' has been opened for writing.
Warning: 'ch3_14.00.00-14.20.00.dav' track 0: This AVC/h.264 track's timing information indicates that it uses a variable frame rate. However, no default duration nor an external timecode file has been provided for it, nor does the source container provide timecodes. The resulting timecodes may not be useful.
Progress: 100%
The cue entries (the index) are being written...
Muxing took 34 seconds.

Return to “Advanced users”