Ffmpeg notes

From I Will Fear No Evil
Jump to navigation Jump to search

ffmpeg when dealing with mp4 that skips and stutters in playback. Seen in MythTV.

Superuser.com source link

ffmpeg -i ./foo.mp4 -c:v libx264 -crf 24 -pix_fmt yuv420p -tune film -c:a aac -b:a 192k -ar 44100 -vol 300 -strict -2 -speed fastest ./bar.mp4

reddit link with more details

ffmpeg -i 'input' -map 0 -c copy 'output.mkv'

Redit comment

ffmpeg -i input.mkv -c:v copy -c:a ac3 -b:a 320k /path/to/usb/output.mkv

Remux audio to work for Roku

To get 2 channel:
the -ac:2 switch is used to tell it to use 2 channels
ffmpeg -i "National Treasure.mkv" -c:v copy -c:a aac -ac 2 -b:a 256K "National Treasure.mp4"

Convert from H265 to H264

ffmpeg -xerror -i 'h265/The_Flash.mkv' -hide_banner -threads 2 -map 0 -c:a copy -c:s copy -c:v libx264 -pix_fmt yuv420p 'The_Flash.mkv'