Skip to main content

FFmpeg crop flac; fix freeze some first second

http://www.linuxquestions.org/questions/linux-software-2/using-ffmpeg-for-cut-first-1-minute-of-flac-files-866234/

Fix some first seconds freeze, the order of command parameter is matter.
ffmpeg -ss 00:00:00 -i input.mp4  -acodec copy -vcodec copy -to 00:00:30 output.mp4
If -to not work => use -t 30 [30 value is in seconds]

-t is in the same hh:mm:ss.xxx format as -ss ; thus you were recording the first 60 hours.

`-t duration'
Restrict the transcoded/captured video sequence to the duration specified in seconds. hh:mm:ss[.xxx] syntax is also supported.

ppd


My bad: miss read the documentation however suggest trying alternative long format.

I write this script to make 30 sec samples from my flac archive.
Code:
#!/bin/bash

for FILE in *;
do flac -d --until=00:40 --skip=00:10 "$FILE";
done

for FILE in *.wav;
do lame -b 32 -f -m m "$FILE" "$FILE.mp3";
done

#Remove .wav.mp3 from files and replace .mp3
find $1 -name '*.wav.mp3' | while read file; do
new=$(echo "$file" | sed s/'.wav.mp3/.mp3'/g)
mv "$file" "$new"
done

rm *.wav

x=$(basename `pwd`)
mkdir $x
mv *.mp3 $x

Fix some first seconds freeze, the order of command parameter is matter.
ffmpeg -ss 00:00:00 -i input.mp4  -acodec copy -vcodec copy -to 00:00:30 output.mp4

Extract only frame at n-th
https://superuser.com/questions/1009969/how-to-extract-a-frame-out-of-a-video-ffmpeg

Comments

Popular posts from this blog

Rand mm 10

https://stackoverflow.com/questions/2447791/define-vs-const Oh const vs define, many time I got unexpected interview question. As this one, I do not know much or try to study this. My work flow, and I believe of many programmer is that search topic only when we have task or job to tackle. We ignore many 'basic', 'fundamental' documents, RTFM is boring. So I think it is a trade off between the two way of study language. And I think there are a bridge or balanced way to extract both advantage of two method. There are some huge issue with programmer like me that prevent we master some technique that take only little time if doing properly. For example, some Red Hat certificate program, lesson, course that I have learned during Collage gave our exceptional useful when it cover almost all topic while working with Linux. I remember it called something like RHEL (RedHat Enterprise Linux) Certificate... I think there are many tons of documents, guide n books about Linux bu

Martin Fowler - Software Architecture - Making Architecture matter

  https://martinfowler.com/architecture/ One can appreciate the point of this presentation when one's sense of code smell is trained, functional and utilized. Those controlling the budget as well as developer leads should understand the design stamina hypothesis, so that the appropriate focus and priority is given to internal quality - otherwise pay a high price soon. Andrew Farrell 8 months ago I love that he was able to give an important lesson on the “How?” of software architecture at the very end: delegate decisions to those with the time to focus on them. Very nice and straight-forward talk about the value of software architecture For me, architecture is the distribution of complexity in a system. And also, how subsystems communicate with each other. A battle between craftmanship and the economics and economics always win... https://hackernoon.com/applying-clean-architecture-on-web-application-with-modular-pattern-7b11f1b89011 1. Independent of Frameworks 2. Testable 3. Indepe