LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   AVI files playback problem (https://www.linuxquestions.org/questions/linux-newbie-8/avi-files-playback-problem-4175678427/)

mackowiakp 07-09-2020 10:46 AM

AVI files playback problem
 
I use as a satellite receiver the Zgemma H9 Combo receiver with Open ATV software. There is ordinary Ubuntu with added satellite signal support (PVR).
Than, I have several AVI video files recorded on different platforms. The problem is that some of them are played correctly and some do not.
That is, only sound is played, but the screen is black. It must be mentioned here that all AVI files are correctly played on a PC, iPad, Android phone and via DLNA on Samsung and Philips TVs.
Below is the result of the FFPROBE command for a file that does NOTt play properly.

Code:

[maciek@Piotr TMP]$ ffprobe Brudna\ sprawa.avi
ffprobe version 4.1.5 Copyright (c) 2007-2020 the FFmpeg developers
  built with gcc 8.3.1 (Mageia 8.3.1-0.20190524.1.mga7) 20190524
  configuration: --prefix=/usr --enable-shared --enable-pic --libdir=/usr/lib64 --shlibdir=/usr/lib64 --incdir=/usr/include --disable-stripping --enable-postproc --enable-gpl --enable-pthreads --enable-libtheora --enable-libvorbis --disable-encoder=vorbis --enable-libvpx --enable-runtime-cpudetect --enable-libaom --enable-libdc1394 --enable-librtmp --enable-libspeex --enable-libfreetype --enable-libgsm --enable-libcelt --enable-libopus --enable-libopencv --enable-libopenjpeg --enable-libtwolame --enable-libxavs --enable-frei0r --enable-libmodplug --enable-libass --enable-gnutls --enable-libcdio --enable-libpulse --enable-libv4l2 --enable-avresample --enable-opencl --enable-libmp3lame --enable-sndio --enable-libdav1d --disable-decoder=aac --disable-encoder=aac
  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 'Brudna sprawa.avi':
  Duration: 00:59:28.84, start: 0.000000, bitrate: 1772 kb/s
    Stream #0:0: Video: mpeg4 (DX50 / 0x30355844), yuv420p, 720x576 [SAR 1:1 DAR 5:4], 1571 kb/s, 25 fps, 25 tbr, 25 tbn, 30k tbc
    Metadata:
      title          : Video
    Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo, fltp, 192 kb/s
    Metadata:
      title          : Audio

And this is FFPROBE for the file being played correctly.

Code:

[maciek@Piotr TMP]$ ffprobe BLUE\ CAFE\ -\ Buena.avi
ffprobe version 4.1.5 Copyright (c) 2007-2020 the FFmpeg developers
  built with gcc 8.3.1 (Mageia 8.3.1-0.20190524.1.mga7) 20190524
  configuration: --prefix=/usr --enable-shared --enable-pic --libdir=/usr/lib64 --shlibdir=/usr/lib64 --incdir=/usr/include --disable-stripping --enable-postproc --enable-gpl --enable-pthreads --enable-libtheora --enable-libvorbis --disable-encoder=vorbis --enable-libvpx --enable-runtime-cpudetect --enable-libaom --enable-libdc1394 --enable-librtmp --enable-libspeex --enable-libfreetype --enable-libgsm --enable-libcelt --enable-libopus --enable-libopencv --enable-libopenjpeg --enable-libtwolame --enable-libxavs --enable-frei0r --enable-libmodplug --enable-libass --enable-gnutls --enable-libcdio --enable-libpulse --enable-libv4l2 --enable-avresample --enable-opencl --enable-libmp3lame --enable-sndio --enable-libdav1d --disable-decoder=aac --disable-encoder=aac
  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 'BLUE CAFE - Buena.avi':
  Metadata:
    encoder        : MEncoder Sherpya-SVN-r32492-4.2.5
  Duration: 00:04:03.80, start: 0.000000, bitrate: 3301 kb/s
    Stream #0:0: Video: mpeg4 (Simple Profile) (XVID / 0x44495658), yuv420p, 854x480 [SAR 1:1 DAR 427:240], 2990 kb/s, SAR 491520:491477 DAR 2048:1151, 25 fps, 25 tbr, 25 tbn, 25 tbc
    Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, stereo, fltp, 299 kb/s

]I don't really know what the difference is between them. Can you, for example, transcode to the TS format that Zgemma plays correctly without losing quality? Possibly somehow "improve" badly played files?

teckk 07-09-2020 05:07 PM

The first video is a divx mpeg4 with ac3 audio.

The second video is Xvid mpeg4 with mp3 audio

And you have both of them in an .avi container. Are you sure that .avi supports those?

Quote:

Can you, for example, transcode to the TS format that Zgemma plays correctly without losing quality?
What is the original .ts? If it's x264 then
Code:

ffmpeg -i In.mp4 -c:a copy -c:v copy -bsf:v h264_mp4toannexb Out.ts
Or is it some kind of mpeg2? Need more info.

What does the transport stream dump look like?

jamison20000e 07-09-2020 05:54 PM

VLC?

:scratch:

Always works for me... unless the hardwares too old and I have to downgrade the video.

mackowiakp 07-10-2020 03:02 AM

Quote:

What is the original .ts? If it's x264 then
Code:

ffmpeg -i In.mp4 -c:a copy -c:v copy -bsf:v h264_mp4toannexb Out.ts
Or is it some kind of mpeg2? Need more info.

What does the transport stream dump look like?
Generally all unplayable AVI files are ripped videos from ordinary DVD disks. It was done using Avidemux. But at this moment I have not those DVD`s.

teckk 07-10-2020 09:21 AM

Quote:

Generally all unplayable AVI files are ripped videos from ordinary DVD disks.
DVD's are mpeg2 video and ac3 audio. If you want to keep it that way then dump the .vob to file.

If you have Xvid and mp3 from a DVD then you have already re-encoded them. Before you re-encode a video, look at what hardware you intend to play it on and see what video/audio it supports.

Right now most hardware that you buy, tv's, bluray players, androids, iphones, pc's, notebooks, tablets, will all play x264 video and aac audio, put into a .mp4 container. They have to, that's what youtube and the web uses. It has become almost standard.

Some will play mpeg2 and ac3. Fewer will play xvid. The device will have to have the codec on it to decompress the video/audio to play it.

Those are 25fps videos, so I assume that thy were PAL video's to start with.

mackowiakp 07-10-2020 09:36 AM

THX for replay. Will try tochange AVI container to MP4, which is playable.

mackowiakp 07-14-2020 04:55 AM

So looks like the only solution is to convert/repack ln loop all files from AVI to MP4 container using command:

Code:

ffmpeg -i input.avi -c:v copy -c:a copy -y output.mp4
I am right?

ondoho 07-16-2020 04:15 AM

^ Try it.
It should be possible in most cases (ffmpeg will balk otherwise).

I wouldn't use '-y'.


All times are GMT -5. The time now is 01:18 AM.