I have some songs that are in .ogg format but they also contain video (which just shows the album cover the whole song, if played in a video player). How can I losslessly remove the video part of the files? The audio format is already Vorbis encoded with Lavc56.60.100 libvorbis. Hopefully the solution doesn't include re-encoding the file with ffmpeg/avconv..
If you want to use FFmpeg (for example, if you use it regularly and don't want to have countless single-use-applications on your computer), you can use it without re-encoding:
ffmpeg -i input_video.ogv -vn -c:a copy output_audio.ogg
-vn: no video.
-c:a copy: just copy the audio-stream.) Source1
ffmpeg -i input_video.ogv -an -c:v copy output_audio.ogv
-an: no audio.
-c:v copy: just copy the video-stream.) Source1
Or, instad of
-an, you can also specify the streams to copy with
ffmpeg -i input_video.ogv -map 0:0 -c:a copy output_audio.ogg
(Only map first stream (of first input-file) to output) Source2
Note that you can find out the stream number (and its content) via FFmpeg:
ffmpeg -i input_video.ogv -hide_banner
-hide_banner is not necessary, but the output will be easier on the eye as it doesn't show you the build-infos of FFmpeg.)
Oh, apparently there's a tool for this called oggz-rip, I believe the package name is either liboggz or oggz-tools depending on your distro.
To extract audio from a .ogv file you just:
oggz-rip -c vorbis input_video.ogv > output_audio.ogg
Or if you just want video and no audio:
oggz-rip -c theora input_video.ogv > output_video.ogv
(alternatively, the command could be oggzrip rather than oggz-rip, depending on your distro.)