Compressed SWF format not supported - ffmpeg

When trying to convert a .swf file to .flv in ffmpeg, I get this error. Is there any way to decompress or bypass this error in ffmpeg, or is there any other command line video conversion tool that can do this conversion for me with a compressed .swf?

Yes, there are conversion tools, and one comes with ffmpeg actually. It's called cws2fws. You can find the source file at "ffmpeg_root/tools/cws2fws.c". I'm not sure if you need to pass additional options to your ./configure script to make it compile.

Related

How to determine if ffmpeg supports an extension for the output file?

When ffmpeg is given a command to output a file with a particular extension it presumably runs an internal algorithm do determine what encoder and/or muxer to use with it. Is there a command to find out whether a particular output extension is supported or not? Like in imagemagick with a command magick identify -list format?
ffmpeg -h muxer=mp4 does not work with image formats like jpg and png even though ffmpeg is capable of outputting images of these formats.
ffmpeg -formats does not seem reliable enough as well as instead of jpg it has singlejpg and does not include png (only apng and png_pipe).

How do i convert flv to mp4/mkv?

I'm trying to grab content from http://tv.nrk.no and the content is downloaded as *.flv. But VLC cannot play that file, no errors or other information.
I have tried to reinstall ffmpeg with additional codes: brew reinstall ffmpeg --with-libvpx and convert the flv file to mp4. But getting error *.flv: could not find codec parameters.
So how can I either download in another format? Or convert the file to mkv/mp4?
I cannot download the content, so I can't try the input video from http://tv.nrk.no
And, what is your command line? Can you post it?
It seems that you don't have some codec.
Maybe you can download ffmpeg-static to transcode the video.

how to convert pdf files to jpg with soffice command?

I've tried using soffice -writer and swriter to convert pdf files to jpg:
The documentation is pretty rare and I can't seem to make it work.
I'm sure something is happening because the OpenOficce icon shows up briefly but I don't know what because there is no trace of a new file...
I hope someone can help me...
This worked for me using LibreOffice 5:
for %F in (*.pdf) do "%ProgramFiles%\LibreOffice 5\program\soffice" -convert-to jpg "%F" -outdir conv
Explanation of the command:
To convert more than one file, the For command specifies each name separately.
\conv goes to C:\conv. To put the folder on the desktop instead, just use conv.
Use one dash rather than two on Windows.
No need for the headless argument.
It did not work in Apache OpenOffice, apparently for several reasons:
It had trouble reading the PDF.
It expected the conv folder to already exist.
Something seemed wrong with automatic conversion in general. It opened the file but nothing happened.

Tagging mkv files with cover images?

I found this screenshot which shows that you can add a cover image to an mkv file in a way that it is displayed as the icon of the file in the Windows explorer using Shark007+icaros.
But these tools are messing with the system in a really bad way. A lot of people are having problems with it and I too very much regret that I've installed it. I'm really glad I got my Windows to boot again...
Anyway, how could I programmatically add a cover image to an mkv file?
And would I need to change something in the registry to make Windows display them?
I'm not neccessarely looking for code, I'm more looking for something like the format the cover needs to have and the byte at which I have to inject/insert/attach the image file and maybe a registry entry that would cause the tagged images to be displayed etc.
You can use the FFmpeg multimedia framework to attach an image as MKV metadata. More Windows builds can be found at Zeranoe.
Example CLI usage:
ffmpeg -i input.mkv -c copy -attach image.jpg -metadata:s:t \
mimetype=image/jpeg output.mkv
-c copy copy all streams in the source file without re-encoding
-attach image.jpg attach a JPEG image
-metadata:s:t mimetype=image/jpeg set the attachement MIME type
On *nix the same can be accomplished with MKVToolNix.
Ubuntu demo:
Programmatic approach:
use the ffmpeg C libraries to attach or replace the cover art
write a custom Shell Extension to read the MKV format and display the image attachement as thumbnail.

Compress command results in corrupted zip file

I have a script set up to rotate some log files in windows, and as part of the process I'd like it to automatically compress the rotated file. To do this I use the command
compress source.file destination.file.zip
However, if I try to open the file, I get the message "The Compressed (zipped) Folder is invalid or corrupted"
I've tried compress with -Z, and I get the same message. What am I doing wrong?
compress output is not ZIP file format compatible, it uses the LZW algorithm.
The only way to "open" a compressed file is with uncompress or gunzip.
Windows ports of common Unix commands, including compress and gzip/gunzip available here.
EDIT: To produce ZIP files from the command line in Windows, you can use something like 7-Zip, which includes a command line application (7z.exe). The Unix commands linked above also include zip.exe for manipulating ZIP files from the command line.

Resources