How does one view .avi video files on a Pi running Buster?
I've an old Canon A460 that captures video clips in .avi
format. When I connect the camera to the Pi it's recognized
and I can copy the files to the Pi, but when I try to open
them vlc player comes up with a black screen showing an orange
and white traffic cone.
Thanks for reading, any suggestions appreciated!
bob prohaska
How does one view .avi video files on a Pi running Buster?
How does one view .avi video files on a Pi running Buster?
I've an old Canon A460 that captures video clips in .avi format. When I connect the camera to the Pi it's recognized and I can copy the files to
the Pi, but when I try to open them vlc player comes up with a black
screen showing an orange and white traffic cone.
Thanks for reading, any suggestions appreciated!
bob prohaska
On Tue, 2 Aug 2022 15:30:48 -0000 (UTC), bob prohaska wrote:
How does one view .avi video files on a Pi running Buster?
AVI is not a format, it is a wrapper around the file that specifies many things including the format & codec in use
you probably do not have the correct codec installed
alister <alister.ware@ntlworld.com> wrote:
On Tue, 2 Aug 2022 15:30:48 -0000 (UTC), bob prohaska wrote:
How does one view .avi video files on a Pi running Buster?
AVI is not a format, it is a wrapper around the file that specifies many
things including the format & codec in use
you probably do not have the correct codec installed
If I open the media file using VLC Media player and open tools > codec I see:
stream 0
Codec Motion JPEG Video (MJPEG)
Video reolustion 64x480
Buffer dimensions 640x480
Frame rate 10
orientation top left
stream 1
Codec: Araw
Type: Audio
Sample rate 11024 Hz
Bits per sample: 8
Bitrate: 88kb/s
Meanwhile the progress bar moves back and forth, as if something's
running. If I click the play button nothing changes.
If I open the media file using VLC Media player [...]
the progress bar moves back and forth, as if something's running.
You could try mplayer or ffplay. Personally I'd focus on converting
it into a normal format (mpeg4, etc.) and playing that. Try ffmpeg
with "-acodec [codec]" and "-vcodec [codec]" to set the format to
something you like. I'd use "libmp3lame" and "mpeg4".
bob prohaska <bp@www.zefox.net> wrote:
How does one view .avi video files on a Pi running Buster?
You could try mplayer or ffplay. Personally I'd focus on converting
it into a normal format (mpeg4, etc.) and playing that. Try ffmpeg
with "-acodec [codec]" and "-vcodec [codec]" to set the format to
something you like. I'd use "libmp3lame" and "mpeg4".
Your recipe for using ffmpeg seemed to work, but the 10 Hz
videos don't seem to play and the 30 Hz videos aren't sharp enough.
Set the output frame rate to 24! "ffmpeg -i src.avi -r 24 dst.mp4"
bob prohaska <bp@www.zefox.net> wrote:
alister <alister.ware@ntlworld.com> wrote:
On Tue, 2 Aug 2022 15:30:48 -0000 (UTC), bob prohaska wrote:
How does one view .avi video files on a Pi running Buster?
AVI is not a format, it is a wrapper around the file that specifies many >>> things including the format & codec in use
you probably do not have the correct codec installed
If I open the media file using VLC Media player and open tools > codec I see:
stream 0
Codec Motion JPEG Video (MJPEG)
Video reolustion 64x480
Buffer dimensions 640x480
Frame rate 10
orientation top left
stream 1
Codec: Araw
Type: Audio
Sample rate 11024 Hz
Bits per sample: 8
Bitrate: 88kb/s
That's a prime example of "AVI is not a format". MJPEG is quite
unusual and only commonly used by cameras/webcams. VLC probably
should play it, but there may be some bug being triggered,
especially if the video data from the device isn't 100% to spec.
You could try mplayer or ffplay. Personally I'd focus on converting
it into a normal format (mpeg4, etc.) and playing that. Try ffmpeg
with "-acodec [codec]" and "-vcodec [codec]" to set the format to
something you like. I'd use "libmp3lame" and "mpeg4".
Meanwhile the progress bar moves back and forth, as if something's
running. If I click the play button nothing changes.
I've had that a lot in VLC over the years, it seems to be common
behaviour when a particular part of the decoding chain is broken.
Sometimes the audio plays without the video. Re-encoding the video
in a more common format as described above is my usual solution.
To see what ffmpeg thinks of a file, don't specify an output file name: >"ffmpeg -hide_banner -i input.avi" (hide_banner just to skip the annoying >program info header). But really, that should be the same as the stream
info from VLC.
ffprobe (filename)
bob prohaska <bp@www.zefox.net> wrote:
Your recipe for using ffmpeg seemed to work, but the 10 Hz
videos don't seem to play and the 30 Hz videos aren't sharp enough.
Set the output frame rate to 24! "ffmpeg -i src.avi -r 24 dst.mp4"
In article <tccgul$1r3gi$1@dont-email.me>,
A. Dumas <alexandre@dumas.fr.invalid> wrote:
To see what ffmpeg thinks of a file, don't specify an output file name: >>"ffmpeg -hide_banner -i input.avi" (hide_banner just to skip the annoying >>program info header). But really, that should be the same as the stream >>info from VLC.
Or just use
ffprobe (filename)
which dumps its opinion of the file content, streams, codecs, resolutions ...
If you are using the "other" toolset -- avprobe does similar
I tried using
ffmpeg -i MVI_0001.AVI -r 24 2nd_home_screen.mp4
That seems to run without errors and produces a file, but still
VLC player renders a black screen. The progress bar behaves normally,
and the sound is played back. Just no picture....
If I try to use Firefox ESR to open the .mp4 file it reports the
file is corrupt. The Chrome browser reports no errors, but delivers
neither picture nor sound. Not even a progress bar.
mplayer shows the video just fine.
A. Dumas <alexandre@dumas.fr.invalid> wrote:
To see what ffmpeg thinks of a file, don't specify an output file name:
"ffmpeg -hide_banner -i input.avi" (hide_banner just to skip the annoying
program info header). But really, that should be the same as the stream
info from VLC.
Or just use ffprobe (filename)
which dumps its opinion of the file content, streams, codecs, resolutions ...
bob prohaska <bp@www.zefox.net> wrote:I tried the conversion again using an output framerate of 30 Hz, No change. Chrome does nothing, firefox says the file is corrupt, mplayer works fine.
I tried using
ffmpeg -i MVI_0001.AVI -r 24 2nd_home_screen.mp4
That seems to run without errors and produces a file, but still
VLC player renders a black screen. The progress bar behaves normally,
and the sound is played back. Just no picture....
If I try to use Firefox ESR to open the .mp4 file it reports the
file is corrupt. The Chrome browser reports no errors, but delivers
neither picture nor sound. Not even a progress bar.
mplayer shows the video just fine.
Huh. What does ffprobe say about both files?
Would it help to put the files on a webserver so others can see them?
bob prohaska <bp@www.zefox.net> wrote:
Would it help to put the files on a webserver so others can see them?
Perhaps, but I probably won't be able to help; the file info seems fine on first sight.
I didn't know about ffprobe, but it seems it's simply an alias for 'ffmpeg >-i'
Input #0, avi, from 'MVI_0003.AVI':
Metadata:
creation_time : 2022-08-03 07:37:09
encoder : CanonMVI02
Duration: 00:11:11.70, start: 0.000000, bitrate: 5060 kb/s
Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p(pc, bt470bg/unknown/unknown), 640x480, 4971 kb/s, 10 fps, 10 tbr, 10 tbn, 10 tbc
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '2nd_charging_screen.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.20.100
Duration: 00:11:11.79, start: 0.000000, bitrate: 1534 kb/s
Stream #0:0(und): Video: h264 (High 4:2:2) (avc1 / 0x31637661), yuvj422p(pc), 640x480, 1477 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
There's nothing I recognize as an error report. The framerate changes as expected, 10 Hz in the original and 30 Hz in the converted file.
bob prohaska <bp@www.zefox.net> wrote:
Stream #0:0(und): Video: h264 (High 4:2:2) (avc1 / 0x31637661), yuvj422p(pc), 640x480, 1477 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
One thing of note is an unsual pixel format of "yuvj422p".
Is there any chance that a video editor on RasPiOS would be able to
help with the problem of browsers not displaying ffmpeg's .mp4 files?
Apt search finds openshot-qt, are there better choices?
bob prohaska <bp@www.zefox.net> wrote:
Input #0, avi, from 'MVI_0003.AVI':
Metadata:
creation_time : 2022-08-03 07:37:09
encoder : CanonMVI02
Duration: 00:11:11.70, start: 0.000000, bitrate: 5060 kb/s
Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p(pc, bt470bg/unknown/unknown), 640x480, 4971 kb/s, 10 fps, 10 tbr, 10 tbn, 10 tbc
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '2nd_charging_screen.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.20.100
Duration: 00:11:11.79, start: 0.000000, bitrate: 1534 kb/s
Stream #0:0(und): Video: h264 (High 4:2:2) (avc1 / 0x31637661), yuvj422p(pc), 640x480, 1477 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
One thing of note is an unsual pixel format of "yuvj422p".
Converting between pixel formats isn't something that I remember
needing to do in the past, but you can use the "-pix_fmt" option
with ffmpeg to convert the original video to another pixel format
during the conversion. Available formats are listed with
"ffmpeg -pix_fmts". A search for '"yuvj422p" VLC' picked up this
thread which suggests using "-pix_fmt yuv420p" with ffmpeg to solve
a very similar issue with VLC on a Raspberry Pi: https://github.com/RPi-Distro/vlc/issues/18
Computer Nerd Kev <not@telling.you.invalid> wrote:
bob prohaska <bp@www.zefox.net> wrote:The github issue was resolved nearly two years ago, at least
Input #0, avi, from 'MVI_0003.AVI':
Metadata:
creation_time : 2022-08-03 07:37:09
encoder : CanonMVI02
Duration: 00:11:11.70, start: 0.000000, bitrate: 5060 kb/s
Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p(pc, bt470bg/unknown/unknown), 640x480, 4971 kb/s, 10 fps, 10 tbr, 10 tbn, 10 tbc
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '2nd_charging_screen.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.20.100
Duration: 00:11:11.79, start: 0.000000, bitrate: 1534 kb/s
Stream #0:0(und): Video: h264 (High 4:2:2) (avc1 / 0x31637661), yuvj422p(pc), 640x480, 1477 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
One thing of note is an unsual pixel format of "yuvj422p".
Converting between pixel formats isn't something that I remember
needing to do in the past, but you can use the "-pix_fmt" option
with ffmpeg to convert the original video to another pixel format
during the conversion. Available formats are listed with
"ffmpeg -pix_fmts". A search for '"yuvj422p" VLC' picked up this
thread which suggests using "-pix_fmt yuv420p" with ffmpeg to solve
a very similar issue with VLC on a Raspberry Pi:
https://github.com/RPi-Distro/vlc/issues/18
so far as VLC player is concered. Sudo apt update/grade has
been run many times since then. Is it possible I've still got
a stale vlc player on the system? But, vlc play isn't important:
Since browsers are widely-used for viewing content I imagine that
converting video files to browser-compatible formats is a rather
common activity. In my case I want to convert a locally-recorded
video file into a format that can be viewed on-line by somebody
halfway around the world. Surely making it easy for them is a
solved problem....no?
What are you talking about? I just told you how to solve the
problem. You were happy before to convert the video with:
ffmpeg -i MVI_0001.AVI -r 24 2nd_home_screen.mp4
This time just do:
ffmpeg -i MVI_0001.AVI -pix_fmt yuv420p -r 24 2nd_home_screen.mp4
and it should play in VLC on the Pi.
One thing of note is an unsual pixel format of "yuvj422p".
Converting between pixel formats isn't something that I remember
needing to do in the past, but you can use the "-pix_fmt" option
with ffmpeg to convert the original video to another pixel format
during the conversion. Available formats are listed with
"ffmpeg -pix_fmts". A search for '"yuvj422p" VLC' picked up this
thread which suggests using "-pix_fmt yuv420p" with ffmpeg to solve
a very similar issue with VLC on a Raspberry Pi: https://github.com/RPi-Distro/vlc/issues/18
Since browsers are widely-used for viewing content I imagine that
converting video files to browser-compatible formats is a rather
common activity. In my case I want to convert a locally-recorded
video file into a format that can be viewed on-line by somebody
halfway around the world. Surely making it easy for them is a
solved problem....no?
Thanks for writing!
bob prohaska
If I open the media file using VLC Media player and open tools > codec I see:
stream 0
Codec Motion JPEG Video (MJPEG)
On 2022-08-02 23:11, bob prohaska wrote:
If I open the media file using VLC Media player and open tools >
codec I see:
stream 0
Codec Motion JPEG Video (MJPEG)
Isn't MJPEG the DVD-format?
The one that at least early pi's needed a license for?
Isn't MJPEG the DVD-format?
The one that at least early pi's needed a license for?
FWIW, it turns out openshot, which is in the apt repository, converts
.avi files that aren't browser-viewable into mp4 files that play just
fine in the chrome browser.
Thanks for everyone's help!
bob prohaska <bp@www.zefox.net> wrote:
FWIW, it turns out openshot, which is in the apt repository, converts
.avi files that aren't browser-viewable into mp4 files that play just
fine in the chrome browser.
Thanks for everyone's help!
I bet that's just an ffmpeg wrapper. Which is fine, if it works.
On 15/08/2022 17:42, A. Dumas wrote:
bob prohaska <bp@www.zefox.net> wrote:Possibly. I equip myself with VLC, Openshot and Handbrake which between
FWIW, it turns out openshot, which is in the apt repository, converts
.avi files that aren't browser-viewable into mp4 files that play just
fine in the chrome browser.
Thanks for everyone's help!
I bet that's just an ffmpeg wrapper. Which is fine, if it works.
them seem able to cope with everything so far thrown at them.
VLC is distinctly not the same codecs as the others.
Sysop: | Weed Hopper |
---|---|
Location: | Clearwater, FL |
Users: | 14 |
Nodes: | 6 (0 / 6) |
Uptime: | 231:40:25 |
Calls: | 55 |
Calls today: | 1 |
Files: | 50,127 |
D/L today: |
33 files (4,307K bytes) |
Messages: | 275,362 |