Challenges in editing mp4-videos under openSUSE Leap 42.2 solved

posted Jan 8, 2017, 10:10 AM by Niels Jensen   [ updated Jan 8, 2017, 10:11 AM ]
About a year ago I inherited my sons Nexus 6 phone, and during this first year I have been quite pleased with it. I can record mp4-videos with excellent sound and picture quality. However the challenge start when I want to edit one of thee videos in openSUSE Leap 42.2. My preferred tools are ffmpeg and openshot. I use ffmpeg for croping, and then openshot for adding an opening picture and ending credits. This has for years worked fine with videos recorded with my Canon EOS 550D camera, which creates mov-videos, that are easily converted to other formats using ffmpeg. This is more abotu knowing your OS and the software installed on it, than anything wrong with the software or the error messages it provides.

Increasing frustration with ffmpeg

No such look with mp4-videeos. Or any other formats, which are containers for mp4. However, I was able to play the mp4-videos in smPlayer. While attempting to solve the issue I tried different output files to ffmpeg, without what demuxing and muxing capabilities my installed version of ffmpeg had. For example the command "ffmpeg -i SK.mp4 SK.flv", gave the error message "[NULL @ 0x798ea0] Unable to find a suitable output format for 'SK.flv' " followed by "SK.flv: Invalid argument". Later inspection of the output from "ffmpeg -formats" reveiled, that ffmpeg was correct. I even googled the message "Unable to find a suitable output format", and discovered that others encountered this message. But I did not find anything pointing towards a solution. So the learning here is: Check that the installed version of the software you are using is able to do, what you want to do!

Since I was pressed for time I turned to VLC. This video player also have some editing capabities, e.g. specification of cropping parameters before convesion to another format. I chose the ogg-format. This resulted in a playable file, but with somewhat reduced picture quality compared to what I was used to from ffmpeg.

What I should have done in the first place

Turns out the trick is to go to the openSUSE Community webpage at http://opensuse-community.org/ and use the 1-click installer for either KDE or GNOME. If things don't work after installing the codecs, make sure all your multimedia packages are coming from Packman. Go to YaST Software Managment, click "View", click "Repositories", select the Packman Repository, click on "Switch system packages". This will replace already installed packages with packages from the Packman repository and also install any packages your are missing. On our system we were missing 8 packages and 36 packages were replaced. And as usuall with linux no restart is needed. Both in openShot and in ffmpeg.

At first I had followed the instructions at "Unoffical Guide to openSUSE Leap 42.2 13. Multimedia Codecs" at http://opensuse-guide.org/codecs.php but overlloked the small print, which states "Afterwards make sure all your multimedia packages are coming from the Packman Repository: Start "YaST Software Management", then click on "View" and select "Rositories". Then select the Packman Repository and click on the buttom "Switch system packages" at the top of the list, and finally click on "Accept" to install the pacakges from the Packman Repository.

The legal reason for my problems is that openSUSE Leap 42.2 has to comply with the DMCA. I think that is this case the issue is the difference between "free to use" - properly for non-commercial perposes - and "free to distribute".