Summary: | Feature request - ability to convert video files | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | Roger Foss <roger.foss> |
Component: | Plugin-Bqm-Convert | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | REPORTED --- | ||
Severity: | wishlist | CC: | aegoreev, caulier.gilles |
Priority: | NOR | ||
Version: | 5.3.0 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Roger Foss
2017-01-09 09:59:17 UTC
With the new QtAv dependency to handle video files in digiKam introduced with DK 5.4.0, we are able to re-encode easily video file, through ffmpeg in background. So it's planed... Gilles Caulier The question is : i'm not sure if BQM is the right place for a king of conversion of video file. BQM is dedicated to process a queue a image files. It's different approach. The subject is open... Gilles Caulier Well, my take on this is if you want to convert video files, you will probably want to do it repeatedly, to batches of files. Hence, the BQM. Also once that's implemented, I can imagine applying other base tools to videos. Ie. amp up the brightness, add some metadata, enhance contrast. I could see the some of the same base tools apply to video. I shall not get too far ahead: I know digikam is primarily a photo management tool. My point is this: why NOT the BQM? Here is the ffmpeg command I use to convert/compress video files. Works as a charm. ffmpeg -i in.mp4 -c:v libx264 -crf 23 -c:a libfaac -q:a 100 -map_metadata 0 out.mp4 This will convert the input with the x264 encoder and FAAC audio to an output file, copying the original metadata. In order to change the quality of the output, you can: * Change the CRF value for video. Lower means better quality. 23 is default, and anything below 18 will probably be visually lossless. * Change the Q parameter for audio. Higher means better, and 100% is the default. Unknown encoder 'libfaac' error? Then your ffmpeg is not compiled with FAAC support. Try " -c:a aac -strict experimental" instead. Also, if you want to copy metadata from one video file to another you can use this command: ffmpeg -i in.mp4 -i out.mp4 -map 1 -map_metadata 0 -c copy fixed.mp4 in.mp4 – the original file before conversion out.mp4 – the file after Handbrake conversion fixed.mp4 – the file with "corrected" metadata Take two input files (in.mp4 and out.mp4), which are assigned the IDs 0 and 1, respectively. * Map only the video/audio/subtitle streams from file 1 to the output (-map 1), so we take the bitstreams that are already converted * Map only the metadata from file 0 to the output (-map_metadata 0) * Use the copy codec (-c copy) to copy all the bitstreams instead of re-encoding the video. After that, you could obviously rename fixed.mp4 to out.mp4. |