uraliss
Posts: 3
Joined: Tue Jan 14, 2014 12:15 pm

How do I view raspivid files on windows

Tue Jan 14, 2014 12:38 pm

Hi There,
I just posted this question but the post seems to have vanished so I will try again.
I have a headless raspberry pi and I have a camera installed. When I ssh into the pi I am able to use the raspistill and raspivid commands and everything seems good. I then ftp those files back to my windows box. From there I can view the images but for some reason the video files wont show any video. I am using VLC to view the video.

What could I be doing wrong?
Thanks

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23708
Joined: Sat Jul 30, 2011 7:41 pm

Re: How do I view raspivid files on windows

Tue Jan 14, 2014 12:40 pm

Odd, VLC should work I think.

You might need to 'encapsulate' the raw H264 stream in to a container (MP4 or similar). This can be done on the Pi itself using ffmpeg (or avconv - same app). I cannot remember the exact runes though.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

towolf
Posts: 421
Joined: Fri Jan 18, 2013 2:11 pm

Re: How do I view raspivid files on windows

Tue Jan 14, 2014 1:43 pm

Code: Select all

ffmpeg -i in.h264 -c copy out.mp4
avconv -i in.h264 -c copy out.mp4
optionally "-r 30" to specify frame rate.

uraliss
Posts: 3
Joined: Tue Jan 14, 2014 12:15 pm

Re: How do I view raspivid files on windows

Tue Jan 14, 2014 2:24 pm

Code: Select all

alan@raspberrypi ~ $ ffmpeg -i in.h264 -c copy out.mp4
ffmpeg version 0.8.6-6:0.8.6-1+rpi1, Copyright (c) 2000-2013 the Libav developers
  built on Mar 31 2013 13:58:10 with gcc 4.6.3
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
[h264 @ 0x1a23660] Estimating duration from bitrate, this may be inaccurate

Seems stream 0 codec frame rate differs from container frame rate: 2400000.00 (2400000/1) -> 25.00 (25/1)
Input #0, h264, from 'in.h264':
  Duration: N/A, bitrate: N/A
    Stream #0.0: Video: h264 (High), yuv420p, 1920x1080, 25 fps, 25 tbr, 1200k tbn, 2400k tbc
Unrecognized option 'c'
Failed to set value 'copy' for option 'c'

balamuralimanoghar
Posts: 13
Joined: Thu Jan 09, 2014 8:54 am

Re: How do I view raspivid files on windows

Tue Jan 14, 2014 4:56 pm

You can copy *.h264 files to your computer and use .h264 to .avi (or other formats of your choice).I used Format Factory..

towolf
Posts: 421
Joined: Fri Jan 18, 2013 2:11 pm

Re: How do I view raspivid files on windows

Tue Jan 14, 2014 9:12 pm

err, maybe mine is newer. What about

Code: Select all

-vcodec copy

uraliss
Posts: 3
Joined: Tue Jan 14, 2014 12:15 pm

Re: How do I view raspivid files on windows

Tue Jan 14, 2014 9:45 pm

-vcodec copy

i seem to be getting somewhere with this in command. Thanks.
The video seems to be only about a second when it should have been 10... but i should be able to troubleshoot that from here.

thanks for the help guys

Return to “Camera board”