Ffmpeg notes: Difference between revisions

From I Will Fear No Evil
Jump to navigation Jump to search
(Created page with "ffmpeg when dealing with mp4 that skips and stutters in playback. Seen in MythTV. <pre> ffmpeg -i ./foo.mp4 -c:v libx264 -crf 24 -pix_fmt yuv420p -tune film -c:a aac -b:a 19...")
 
mNo edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
ffmpeg when dealing with mp4 that skips and stutters in playback.  Seen in MythTV.
ffmpeg when dealing with mp4 that skips and stutters in playback.  Seen in MythTV.


[https://superuser.com/questions/895335/how-to-convert-an-mp4-to-mp4-using-ffmpeg| Superuser.com source link]
<pre>
<pre>
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
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
</pre>
</pre>
[https://www.reddit.com/r/ffmpeg/comments/cq9bbv/repairing_avi_file_brokenmissing_index/| reddit link with more details]
<pre>
ffmpeg -i 'input' -map 0 -c copy 'output.mkv'
</pre>
[https://www.reddit.com/r/ffmpeg/comments/9gm17g/convert_only_audio_dts_to_ac3_in_a_mkv_file/| Redit comment]
<pre>
ffmpeg -i input.mkv -c:v copy -c:a ac3 -b:a 320k /path/to/usb/output.mkv
</pre>
[https://www.technibble.com/forums/threads/guide-to-making-mkv-audio-work-on-your-device-roku-etc.81333/| Remux audio to work for Roku]
<pre>
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"
</pre>
Convert from H265 to H264
<pre>
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'
</pre>


[[Category:ffmpeg]]
[[Category:ffmpeg]]

Latest revision as of 06:04, 10 August 2023

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'