mpv fails to play FLV encoded with AVC

Hello gurus,

mpv fails to play FLV videos, regardless of what output driver is used. I have yet to find a FLV video it will play. VLC also fails to play the video. Kaffine and Xine play the video correctly.

When I do the test, I am launching mpv via SMPlayer.

Also, when playing the video directly from the command line, it fails with:


tux@TuxBox:~/ mpv "/home/tux/IWI Tavor (TAR-21) Assult Rifle.flv"
Playing: /home/tux/IWI Tavor (TAR-21) Assult Rifle.flv
**Failed to recognize file format. **

The test video was downloaded from YouTube. I searched for it on YouTube, and it appears it no longer exists there.

Is there something I should have installed? Am I doing something wrong?

Please help.

Thanks In Advance,
Max

mpv fail log output via SMPlayer:


/usr/bin/mpv --no-config --no-quiet --terminal --no-msg-color --input-file=/dev/stdin --no-fs --hwdec=no --sub-auto=fuzzy --vo=opengl-hq --ao=pulse --stop-screensaver --no-input-default-bindings --input-x11-keyboard=no --no-input-cursor --cursor-autohide=no --no-keepaspect --wid=195035197 --monitorpixelaspect=1 --osd-scale=1 --sub-ass --embeddedfonts --ass-line-spacing=0 --sub-scale=1 --sub-text-font=Arial --sub-text-color=#ffffff --sub-text-shadow-color=#000000 --sub-text-border-color=#000000 --sub-text-border-size=2.5 --sub-text-shadow-offset=5 --sub-codepage=utf8:ISO-8859-1 --sub-pos=100 --volume=49 --cache=2048 --osd-level=0 --index=default --vf-add=lavfi=[pp] --screenshot-template=cap_%F_%p_%02n --audio-channels=2 --af-add=scaletempo --af-add=equalizer=0:0:0:0:0:0:0:0:0:0 --softvol=yes --softvol-max=110 --ytdl=no --term-playing-msg=MPV_VERSION=${=mpv-version:}
INFO_VIDEO_WIDTH=${=width}
INFO_VIDEO_HEIGHT=${=height}
INFO_VIDEO_ASPECT=${=video-aspect}
INFO_VIDEO_FPS=${=fps}
INFO_VIDEO_FORMAT=${=video-format}
INFO_VIDEO_CODEC=${=video-codec}
INFO_AUDIO_FORMAT=${=audio-codec-name:${=audio-format}}
INFO_AUDIO_CODEC=${=audio-codec}
INFO_AUDIO_RATE=${=audio-params/samplerate:${=audio-samplerate}}
INFO_AUDIO_NCH=${=audio-params/channel-count:${=audio-channels}}
INFO_LENGTH=${=duration:${=length}}
INFO_DEMUXER=${=demuxer}
INFO_TITLES=${=disc-titles}
INFO_CHAPTERS=${=chapters}
INFO_TRACKS_COUNT=${=track-list/count}
METADATA_TITLE=${metadata/by-key/title:}
METADATA_ARTIST=${metadata/by-key/artist:}
METADATA_ALBUM=${metadata/by-key/album:}
METADATA_GENRE=${metadata/by-key/genre:}
METADATA_DATE=${metadata/by-key/date:}
METADATA_TRACK=${metadata/by-key/track:}
METADATA_COPYRIGHT=${metadata/by-key/copyright:}
INFO_MEDIA_TITLE=${=media-title:}
 --term-status-msg=STATUS: ${=time-pos} / ${=duration:${=length:0}} P: ${=pause} B: ${=paused-for-cache} I: ${=core-idle} /home/tux/IWI Tavor (TAR-21) Assult Rifle.flv

Playing: /home/tux/IWI Tavor (TAR-21) Assult Rifle.flv
[input_file] Client connected
**Failed to recognize file format.**
Exiting... (Errors when loading file)

**Details about the test file (obtained using MediaInfo):
**


General
Complete name                            : /home/tux/IWI Tavor (TAR-21) Assult Rifle.flv
Format                                   : Flash Video
File size                                : 46.0 MiB
Duration                                 : 4mn 39s
Overall bit rate                         : 1 382 Kbps
httphostheader                           : r7---sn-a5m7zu7e.c.youtube.com

Video
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : Main@L3.1
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 3 frames
Codec ID                                 : 7
Duration                                 : 4mn 39s
Width                                    : 854 pixels
Height                                   : 480 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 29.919 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive

Audio
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : LC
Codec ID                                 : 10
Duration                                 : 4mn 39s
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 44.1 KHz
Compression mode                         : Lossy

**Details of my system:
**


openSUSE 13.2 for x86_64
Linux 3.16.7-21-desktop
mpv 0.9.2 (C) 2000-2015 mpv/MPlayer/mplayer2 projectsbuilt on May 27 2015
ffmpeg library versions:
   libavutil       54.27.100
   libavcodec      56.41.100
   libavformat     56.36.100
   libswscale      3.1.101
   libavfilter     5.16.101
   libswresample   1.2.100

SMPLayer 14.9.0 (svn r6994)
KDE 4.14.9

Have you installed the proprietary codecs as per the instruction at the top of this section of the board???

I thought MPlayer and mpv were self-contained, without need for external codecs. No?

Thanks,
Max

Your libav files are from the standard repo, you need to switch them to the Packman versions.

mpv uses libav* packages and without them, you won’t be able to play patented formats.

*Joy! :slight_smile:
[size=2]
[/size]*You were exactly correct! Thank you, thank you! I do not think I could have solved this problem in any reasonable amount of time without your help. The change you suggested even fixed MPlayer. :slight_smile:

I switched the following files to versions in the Packman repository:


libavutil54
libavcodec56
libavresample2
libavformat56
libavfilter5
libavdevice56
vlc-noX-lang (YaST changed this one automatically)

[size=2]Thank you, thank you!
Max
[/size]

That is exactly gogalthorpe was after, but instead of righout answering “No, I didn’t”, maybe even followed by “But now I did and it helped” you came was some lame argument. :wink:

And gogalthorpe was right after all, thus I hope your thanks are also to him.

On 2015-07-17 14:46, Max314 wrote:
>
> gogalthorp;2719898 Wrote:
>> Have you installed the proprietary codecs as per the instruction at the
>> top of this section of the board???
>
> I thought MPlayer and mpv were self-contained, without need for external
> codecs. No?

No.

Any application that contains patented or otherwise protected codecs,
has these duly removed before the application can be distributed by
openSUSE.

So in the end they usually repackage the application in two parts, one
of it containing the encumbered codecs, and it is provided outside of
openSUSE for legal reasons. Either that, or there are two versions of
the “self contained” application, one without the codecs in openSUSE,
and with them outside openSUSE.

I think only VLC is self contained, but it comes in two packages IIRC.
Or came.


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

MPlayer is not shipped at all by openSUSE since years.
And mpv never was.

I think only VLC is self contained, but it comes in two packages IIRC.
Or came.

Actually MPlayer is “self contained”, it consists of only one package including all codecs. (actually there is a separate package for the GTK GUI, gmplayer)
It even included its own copy of ffmpeg/libav*, so it actually would work even with openSUSE’s crippled libav*.
But this has been changed recently to also use the system’s libav*.
From the package changelog:

Fri Jul 10 22:32:22 UTC 2015 - joerg.lorenzen@ki.tng.de

  • build against libffmpeg-devel

Advantage: MPlayer doesn’t have to be updated whenever there is an update to ffmpeg, it’s sufficient to update ffmpeg.

VLC is not self contained at all, it actually contains of 7 packages (not even counting the -lang packages), the restricted codecs are part of vlc-codecs (i.e. a separate package), and it uses many system libraries (libav* in particular).

On 2015-07-20 14:36, wolfi323 wrote:
>
> robin_listas;2719946 Wrote:

> MPlayer is not shipped at all by openSUSE since years.
> And mpv never was.

I haven’t checked :slight_smile:

Not very long ago, at least xine-ui was in oss repo. I some times left
it, and installed the codecs package from packman, and it worked,
without replacing the ui.

The version distributed on OSS I remember was built with a switch that
removed all the encumbered parts. The legal team at suse had a good look
at the package and said what to remove.

Xine was the only package I really analyzed, because I translate it to
Spanish.


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

Yes, xine-ui is still in the oss repo. And it is just a frontend to libxine2, so it doesn’t need to be replaced.

The version distributed on OSS I remember was built with a switch that
removed all the encumbered parts. The legal team at suse had a good look
at the package and said what to remove.

Yes, that’s how it is for libxine2 (the non-free codecs are in libxine2-codecs), VLC (vlc-codecs), and gstreamer.
Actually just installing the additional codec packages from Packman should suffice for them, but most of the time Packman has a higher version already (unless you are using Tumbleweed) so you might have to upgrade also the “standard” packages.

When MPlayer was still part of SUSE it was crippled, i.e. all non-free codecs had been removed. The package on Packman was full-featured, you had to replace the whole MPlayer package with the one from Packman.
But as mentioned it has been removed from the distribution years ago, around 10.2… (probably even earlier, it is not in the 10.2 OSS repo any more at least)