• Viewing .avi videos on Buster

    From bob prohaska@3:770/3 to All on Tue Aug 2 15:30:48 2022
    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

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Jan Panteltje@3:770/3 to bp@www.zefox.net on Tue Aug 2 17:06:22 2022
    On a sunny day (Tue, 2 Aug 2022 15:30:48 -0000 (UTC)) it happened bob prohaska <bp@www.zefox.net> wrote in <tcbfv8$1in57$1@dont-email.me>:

    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

    I seem to be using ffplay for videos on my Pi4 these dsys

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Andy Burns@3:770/3 to bob prohaska on Tue Aug 2 19:11:40 2022
    bob prohaska wrote:

    How does one view .avi video files on a Pi running Buster?

    VLC

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From alister@3:770/3 to bob prohaska on Tue Aug 2 18:42:16 2022
    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?

    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

    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




    --
    Be careful! Is it classified?

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From bob prohaska@3:770/3 to alister on Tue Aug 2 21:11:24 2022
    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.

    There's no prompt or error message saying a codec is needed.
    If I open current media information all values are zero.
    The file size is nearly six MB, so it's not empty.

    I'm baffled.

    Any suggestions appreciated!

    bob prohaska

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Computer Nerd Kev@3:770/3 to bob prohaska on Wed Aug 3 07:33:26 2022
    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.

    --
    __ __
    #_ < |\| |< _#

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Andy Burns@3:770/3 to bob prohaska on Tue Aug 2 22:46:24 2022
    bob prohaska wrote:

    If I open the media file using VLC Media player [...]
    the progress bar moves back and forth, as if something's running.

    IME when the progress bar bounces backward and forward it's bad news. Usually a
    stream failing to connect, don't think I've ever seen it for a local file.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From A. Dumas@3:770/3 to Computer Nerd Kev on Wed Aug 3 00:53:41 2022
    Computer Nerd Kev <not@telling.you.invalid> wrote:
    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".

    You need those options if you want a specific encoder, yes, but if you just want a compatible format, simply specify .mp4 as the extension of the
    output file: "ffmpeg -i input.avi output.mp4".

    Most examples will use -c:v and -c:a now instead of -vcodec and -acodec.
    Also the thing to remember is that these can be input or output options; to choose their function, specify them before the input file name (-i
    srcfile.avi) or before the output file name (dstfile.mp4), or both. But
    really, using them as input options should "never" be necessary because
    ffmpeg is good at automatically determining the decoders needed, and they
    need to be exactly right.

    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.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From bob prohaska@3:770/3 to Computer Nerd Kev on Wed Aug 3 01:05:59 2022
    Computer Nerd Kev <not@telling.you.invalid> wrote:
    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".

    Mplayer can display my camera's video capture directly. Unfortunately,
    the video performance is very poor; either 640x480 at 10 Hz or 320x240
    at 30 Hz. 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.

    An old iPhone6 takes much better videos, but my Pi4 freezes instantly
    when the iPhone is connected. Any hope of connecting to the iPhone?

    The reason for the videos is to let tech support look at the panel
    display of a piece of equipment. They want to see lights flash and
    numbers change. I may start with stills and hope that's good enough.
    10 Hz is fast enough to show the action, but unless there's a 10 Hz
    viewer readily available (probably for Windows) I'm kinda stuck.

    Thanks for writing!

    bob prohaska



    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From A. Dumas@3:770/3 to bob prohaska on Wed Aug 3 01:17:39 2022
    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"

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From A. Dumas@3:770/3 to A. Dumas on Wed Aug 3 01:20:49 2022
    A. Dumas <alexandre@dumas.fr.invalid> wrote:
    Set the output frame rate to 24! "ffmpeg -i src.avi -r 24 dst.mp4"

    Or 30 for a smoother up-rating if the source is 10 Hz, but 24 is the most compatible frame rate number.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Jan Panteltje@3:770/3 to Computer Nerd Kev on Wed Aug 3 05:16:02 2022
    On a sunny day (3 Aug 2022 07:33:26 +1000) it happened not@telling.you.invalid (Computer Nerd Kev) wrote in <62e99826@news.ausics.net>:

    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.

    Yes, I have 2 A470 and these scripts I used in the past:


    #canon_a470_big_to_30fps_mpeg4
    if [ "$1" = "" ]
    then
    echo "Usage: canon_a470_big_to_30fps_mpeg4 infile.avi outfile.avi"
    exit 1
    fi

    if [ "$2" = "" ]
    then
    echo "Usage: canon_a470_big_to_30fps_mpeg4 infile.avi outfile.avi"
    exit 1
    fi

    echo "Extracting wave file."

    ffmpeg -i $1 -f wav tmp.wav

    sleep 1

    echo "Encoding to mpeg4 at 30 fps."

    ffmpeg -i $1 -f yuv4mpegpipe -b 5000 -vcodec pgmyuv -y /dev/stdout \
    | \
    yuvmotionfps -r 30:1 \
    | \
    ffmpeg -i tmp.wav -f yuv4mpegpipe -i - \
    -f avi -vcodec mpeg4 -r 30 -b 1000 -g 300 -bf 2 -ar 48000 -y $2


    echo "Ready, file is $2"


    An other one:

    #encode_a470_small
    if [ "$1" = "" ]
    then
    echo "Usage: encode_a470_small infile.avi outfile.avi"
    exit 1
    fi

    if [ "$2" = "" ]
    then
    echo "Usage: encode_a470_small infile.avi outfile.avi"
    exit 1
    fi

    ffmpeg -i $1 -f avi -vcodec mpeg4 -r 30 -b 1000 -g 300 -bf 2 -ar 48000 -y $2


    And yet an other one:

    #encode_a470_big
    if [ "$1" = "" ]
    then
    echo "Usage: encode_a470_big infile.avi outfile.avi"
    exit 1
    fi

    if [ "$2" = "" ]
    then
    echo "Usage: encode_a470_big infile.avi outfile.avi"
    exit 1
    fi

    ffmpeg -i $1 -f avi -vcodec mpeg4 -r 20 -b 1000 -g 300 -bf 2 -ar 48000 -y $2


    So, his were just scripst I ued long agao, have a different small canon now. But should give some hints.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Mike@3:770/3 to alexandre@dumas.fr.invalid on Wed Aug 3 14:45:38 2022
    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

    --
    --------------------------------------+------------------------------------ Mike Brown: mjb[-at-]signal11.org.uk | http://www.signal11.org.uk

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From bob prohaska@3:770/3 to A. Dumas on Wed Aug 3 14:42:49 2022
    A. Dumas <alexandre@dumas.fr.invalid> wrote:
    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"

    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.

    Am I missing a switch or option in the ffmpeg command line?
    There's a -ilme option for interlace, but I can't figure where
    it goes in the command line, nor whether it's relevant.

    Thanks very much!

    bob prohaska

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Jan Panteltje@3:770/3 to Mike on Wed Aug 3 15:35:21 2022
    On a sunny day (Wed, 3 Aug 2022 14:45:38 +0100 (BST)) it happened mjb@signal11.invalid (Mike) wrote in <tcdu62$n0u$1@posie.signal11.org.uk>:

    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 use mediainfo

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From A. Dumas@3:770/3 to bob prohaska on Wed Aug 3 15:55:49 2022
    bob prohaska <bp@www.zefox.net> wrote:
    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?

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From A. Dumas@3:770/3 to Mike on Wed Aug 3 15:55:48 2022
    Mike <mjb@signal11.invalid> wrote:
    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 ...

    I didn't know about ffprobe, but it seems it's simply an alias for 'ffmpeg
    -i' (almost; it doesn't warn about a missing output file). It even prints
    the same annoying banner which can be hidden with the same option
    -hide_banner.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From bob prohaska@3:770/3 to A. Dumas on Wed Aug 3 16:41:10 2022
    A. Dumas <alexandre@dumas.fr.invalid> wrote:
    bob prohaska <bp@www.zefox.net> wrote:
    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.

    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.
    mplayer shows the video just fine.

    Huh. What does ffprobe say about both files?

    About the .AVI file ffprobe reports:
    libavutil 56. 22.100 / 56. 22.100
    libavcodec 58. 35.100 / 58. 35.100
    libavformat 58. 20.100 / 58. 20.100
    libavdevice 58. 5.100 / 58. 5.100
    libavfilter 7. 40.101 / 7. 40.101
    libavresample 4. 0. 0 / 4. 0. 0
    libswscale 5. 3.100 / 5. 3.100
    libswresample 3. 3.100 / 3. 3.100
    libpostproc 55. 3.100 / 55. 3.100
    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
    Stream #0:1: Audio: pcm_u8 ([1][0][0][0] / 0x0001), 11024 Hz, 1 channels, u8, 88 kb/s


    About the .mp4 file ffprobe reports
    libavutil 56. 22.100 / 56. 22.100
    libavcodec 58. 35.100 / 58. 35.100
    libavformat 58. 20.100 / 58. 20.100
    libavdevice 58. 5.100 / 58. 5.100
    libavfilter 7. 40.101 / 7. 40.101
    libavresample 4. 0. 0 / 4. 0. 0
    libswscale 5. 3.100 / 5. 3.100
    libswresample 3. 3.100 / 3. 3.100
    libpostproc 55. 3.100 / 55. 3.100
    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)
    Metadata:
    handler_name : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 11025 Hz, mono, fltp, 53 kb/s (default)
    Metadata:
    handler_name : SoundHandler

    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.

    Thanks for writing, and any further thoughts!

    Would it help to put the files on a webserver so others can see them?

    bob prohaska

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From A. Dumas@3:770/3 to bob prohaska on Wed Aug 3 17:04:58 2022
    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.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From bob prohaska@3:770/3 to A. Dumas on Wed Aug 3 18:12:01 2022
    A. Dumas <alexandre@dumas.fr.invalid> wrote:
    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.

    In searching on the web there were quite a few references to ffmpeg
    conversions not playing in firefox/chrome/whatever browsers. The
    claim seemed to be that it had something to do with h.264 but a
    sample command line I tried (after simply trimming out unrecognized
    options) didn't make any difference. It was very much a "monkey see,
    monkey do" sort of experiment. Are browsers some kind of special case
    for video?

    Thanks for writing!

    bob prohaska

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Mike@3:770/3 to alexandre@dumas.fr.invalid on Wed Aug 3 20:12:10 2022
    In article <tce5q4$2ap69$1@dont-email.me>,
    A. Dumas <alexandre@dumas.fr.invalid> wrote:

    I didn't know about ffprobe, but it seems it's simply an alias for 'ffmpeg >-i'

    Here, it's a separate binary of slightly different size to ffmpeg/ffplay
    etc. but I wouldn't be surprised to find at some point a change was
    made to put all the stuff into one binary and just have symlinks for compatibility reasons.

    In 3.2.14 there are separate source files for ffmpeg.c and ffprobe.c
    that yield separate binaries ... can't vouch for newer.


    --
    --------------------------------------+------------------------------------ Mike Brown: mjb[-at-]signal11.org.uk | http://www.signal11.org.uk

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From bob prohaska@3:770/3 to All on Wed Aug 3 19:44:23 2022
    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?

    Thanks for reading,

    bob prohaska

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Computer Nerd Kev@3:770/3 to bob prohaska on Thu Aug 4 09:32:50 2022
    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)

    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.

    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

    --
    __ __
    #_ < |\| |< _#

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From A. Dumas@3:770/3 to Computer Nerd Kev on Thu Aug 4 09:04:17 2022
    On 04-08-22 01:32, Computer Nerd Kev wrote:
    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".

    Ah, good one. I'm afraid I'm not familar with pixel formats so I didn't
    see that. I should have, though, if I had compared this output to the
    format of a known good file.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to bob prohaska on Thu Aug 4 15:30:12 2022
    On 03/08/2022 20:44, bob prohaska wrote:
    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?

    Ive not found openshot much good at reading 'odd' movie formats but
    HandBrake usually does and renders them into 'pretty much anyone can
    read it' files.

    Try both, as well as VLC
    Together with ffmpeg thats about the whole emergency toolkit!

    --
    There is nothing a fleet of dispatchable nuclear power plants cannot do
    that cannot be done worse and more expensively and with higher carbon
    emissions and more adverse environmental impact by adding intermittent renewable energy.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From bob prohaska@3:770/3 to Computer Nerd Kev on Thu Aug 4 22:37:13 2022
    Computer Nerd Kev <not@telling.you.invalid> wrote:
    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

    The github issue was resolved nearly two years ago, at least
    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?

    Thanks for writing!

    bob prohaska

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Computer Nerd Kev@3:770/3 to bob prohaska on Fri Aug 5 08:57:58 2022
    bob prohaska <bp@www.zefox.net> wrote:
    Computer Nerd Kev <not@telling.you.invalid> wrote:
    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

    The github issue was resolved nearly two years ago, at least
    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:

    The thread/issue was very long so I skimmed and word-searched my
    way through because I don't have time to spend hours reading this
    stuff, however the impression I got was that many of the
    participants were quite confused and the idea that it had really
    been solved when it was marked as such didn't sound convincing to
    me. I would have thought that your posts are just more evidence of
    that.

    The root of the issue seems to be a Pi-specific one to do with the
    hardware video decoding. At one point it's suggested that "--codec
    FFmpeg" is passed to VLC on the command line so that hardware
    acceleration is turned off, but it sounds like that turned out to
    be buggy in other ways.

    I've heard about hardware acceleration being used with web browsers
    for video playback (though I never play video in browsers on any
    platform myself), so they're probably getting stuck at the same
    bug. But it should only be a problem on the Raspberry Pi, not other
    platforms. If you convert the video with ffmpeg into a different
    pixel format then it shouldn't be a problem anywhere.

    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.

    --
    __ __
    #_ < |\| |< _#

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Computer Nerd Kev@3:770/3 to Computer Nerd Kev on Fri Aug 5 09:03:05 2022
    Computer Nerd Kev <not@telling.you.invalid> wrote:

    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.

    Actually you probably didn't really need 24fps, so just:
    ffmpeg -i MVI_0001.AVI -pix_fmt yuv420p 2nd_home_screen.mp4

    Plus try playing the original video in VLC on PC if you're curious
    whether it's the same problem that's discussed at GitHub. But it's
    academic unless you want to go and report the bug.

    --
    __ __
    #_ < |\| |< _#

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From bob prohaska@3:770/3 to Computer Nerd Kev on Thu Aug 4 23:36:31 2022
    Computer Nerd Kev <not@telling.you.invalid> wrote:

    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

    Well, -pix_fmt yuv420p solved all the problems. A video created
    using ffmpeg -i MVI_0002.AVI -r 30 -pix_fmt yuv420p output.mp4
    displays correctly using firefox, chrome and vlc player.

    Thank you _very_ much!

    bob prohaska

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Jan Panteltje@3:770/3 to bp@www.zefox.net on Fri Aug 5 05:16:15 2022
    On a sunny day (Thu, 4 Aug 2022 22:37:13 -0000 (UTC)) it happened bob prohaska <bp@www.zefox.net> wrote in <tchhmo$2u268$1@dont-email.me>:

    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

    These script I have used to put my A470 videos on youtube with subtitles.
    All browsers I have play those.
    I do not know if youtube chaged anything to the format.

    I never use VLC as it does not even run as root, neither do I use that
    raspi mediaplayer that has silly error messages and plays basically nothing


    ## canon A470 320x240 20fps AVI conversion to youtube divx4 320x240

    echo "Usage: canon_to_youtube file.avi file.ppml"

    #ffmpeg -i $1 -f wav q0.wav
    #ffmpeg -i $1 -f yuv4mpegpipe -b 5000 -vcodec pgmyuv -y q1.yuv

    #sox q0.wav -r 44100 q1.wav resample

    transcode -f 30 -g 320x240 -i q1.yuv -p q1.wav -R1 -w 350 \
    -J subtitler="anti_alias font_factor=.75 font_size=14 color_depth=32 frame_offset=0 subtitle_file=$2 show_output=1" \
    -x yuv4mpeg -y divx4 -o $1.avi -V -k

    transcode -f 30 -g 320x240 -i q1.yuv -p q1.wav -R2 -w 350 \
    -J subtitler="anti_alias font_factor=.75 font_size=14 color_depth=32 frame_offset=0 subtitle_file=$2 show_output=1" \
    -x yuv4mpeg -y divx4 -o $1.avi -V -k

    -----
    so adds subtitles from a .ppml file

    panteltje20: ~ # ls /usr/local/sbin/canon_a470_to_youtube
    -rwxr-xr-x 1 root root 683 Jan 15 2012 /usr/local/sbin/canon_a470_to_youtube*

    hehe 2012, you need to install 'transcode', I run it on this x86 laptop

    'subtitler' I wrote and is somewhere on my site panteltje.com

    There are a million ways I suppose to do these things...

    I just write stuff when I need it.
    http://panteltje.com/panteltje/subtitles/index.html
    http://panteltje.com/panteltje/newsflex/download.html


    Subtitles is nice on youtube to show what's happening each moment.

    Anyways mplayer and ffmpeg is likely more today's way for raspi users.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From =?UTF-8?Q?Bj=c3=b6rn_Lundin?=@3:770/3 to bob prohaska on Sun Aug 14 22:19:07 2022
    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?


    --
    /Björn

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From =?UTF-8?Q?Bj=c3=b6rn_Lundin?=@3:770/3 to All on Sun Aug 14 22:24:26 2022
    On 2022-08-14 22:19, Björn Lundin wrote:
    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?


    Hmm, I somehow only saw the first 5 replies to the thread.
    Now I see many more and that is was resolved.
    Sorry for the noise


    --
    /Björn

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Ahem A Rivet's Shot@3:770/3 to bnl@nowhere.com on Mon Aug 15 06:27:46 2022
    On Sun, 14 Aug 2022 22:19:07 +0200
    Björn Lundin <bnl@nowhere.com> wrote:

    Isn't MJPEG the DVD-format?
    The one that at least early pi's needed a license for?

    You're thinking of MPEG2.

    --
    Steve O'Hara-Smith
    Odds and Ends at http://www.sohara.org/

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From bob prohaska@3:770/3 to All on Mon Aug 15 16:24:52 2022
    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

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From A. Dumas@3:770/3 to bob prohaska on Mon Aug 15 16:42:40 2022
    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.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to A. Dumas on Mon Aug 15 18:43:15 2022
    On 15/08/2022 17:42, A. Dumas wrote:
    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.

    Possibly. I equip myself with VLC, Openshot and Handbrake which between
    them seem able to cope with everything so far thrown at them.
    VLC is distinctly not the same codecs as the others.

    --
    For in reason, all government without the consent of the governed is the
    very definition of slavery.

    Jonathan Swift

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Computer Nerd Kev@3:770/3 to The Natural Philosopher on Tue Aug 16 08:56:43 2022
    The Natural Philosopher <tnp@invalid.invalid> wrote:
    On 15/08/2022 17:42, A. Dumas wrote:
    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.

    Possibly. I equip myself with VLC, Openshot and Handbrake which between
    them seem able to cope with everything so far thrown at them.
    VLC is distinctly not the same codecs as the others.

    Actually they all depend on the FFmpeg project's libavcodec library. https://packages.debian.org/buster/vlc-plugin-video-output https://packages.debian.org/buster/libopenshot16 https://packages.debian.org/stable/handbrake

    VLC and Handbrake (not sure about Openshot) can be built against
    other codec-specific libraries as well, like FFmpeg itself can too.
    The differences in use probably come down to which library
    the software decides to use, including in the case of this thread,
    one that uses (apparantly incorrectly) the video decoder built into
    the GPU. Ideally the decoder selection could be controlled at
    run-time, but in the case of forcing use of the FFmpeg codec over
    hardware acceleration in the RPi OS version of VLC, that was
    apparantly buggy at one point, so you'd probably have to recompile
    VLC.

    It could also be that there are bugs in the way the programs use
    the libavcodec library. Or in this case Openshot obviously changes
    the pixel format by default, whereas FFmpeg doesn't, so that's
    just a design choice. They may both be using the same FFmpeg
    codecs though, as might VLC if it's not built with hardware
    acceleration enabled.

    --
    __ __
    #_ < |\| |< _#

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)