[FFmpeg-user] 4K Compression using x.265 issues

Kieran O Leary kieran.o.leary at gmail.com
Thu Nov 15 15:30:36 EET 2018


Hi,

On Thu, Nov 15, 2018 at 12:49 PM Ron Barnes <rbarnes at njdevils.net> wrote:
>
> Hello All,
>
> First off, thank you to anyone for your time and attention to my email!
>
> I have 3 issues I'm trying to solve.
>
> First, I have a 4K home video taken with my YI action cam.  It is an 80GB video captured @ 4k 30/FPS.  I really want to share it via Plex to the family but at that size and my bandwidth, it's not going very well.
>
> I'm trying to solve this issue with the following command.
>
> ffmpeg -i "YDXJ0085.MP4" -c:v libx265 -preset medium -crf 22 -s 3840x2160 -b:v 10M -c:a aac -b:a 128k -metadata title="Juliana - Disney 8-12-2018" Disney_Vac_1.mkv
>
> it did indeed compress the video down to a manageable 10GB but it is still having streaming issues.  I have searched the net for a solution and I think I need to set a bit (or something) to indicate that the file should be streamed and not downloaded.  Not sure if that’s correct.

It seems that in Matroska, the flag to use is -reserve_index_space.
https://ffmpeg.org/ffmpeg-formats.html#Options-7 has official info,
and this page has a real-world command -
https://superuser.com/questions/1190153/make-mkv-file-suitable-for-streaming-with-ffmpeg-or-avconv-how-to-move-all-m
It seems that a value of 50k is suitable for an hour, but you might
want to experiment with increasing that.

> Can anyone offer any advice for this?
> Also, is there a way to have the original frame height and width used instead of specifying it?

Can you share the full, uncut terminal output? You should not have to
specify this at all, ffmpeg will retain the width and height. If it is
not, something is going wrong and the terminal output will let us know
what is the issue.

>
> Second,  I have a movie that I want to convert and it has 15 different audio streams and I am not able to convert the movie and preserve all the audio streams.  I only get the first one and it's not the one I want.
>
 You should ass -map 0 to your command. https://trac.ffmpeg.org/wiki/Map

> Third (related to second), I would like to convert the audio streams from 7.1 to just stereo as I do not have a fancy sound system and the audio volume is way to low (I think it is just playing the center channel).
>
I don't know enough about audio to know what is happening here, like
will just downsampling to stereo increase audio? Anyhow, this wiki has
info: https://trac.ffmpeg.org/wiki/AudioChannelManipulation , it seems
like you can just add -ac 2 to your command.

So overall, your command would be something like (i haven't tested this):
ffmpeg -i "YDXJ0085.MP4" -c:v libx265 -preset medium -map 0
-reserve_index_space 50k -crf 22 -s 3840x2160 -b:v 10M -ar 2 -c:a aac
-b:a 128k -metadata title="Juliana - Disney 8-12-2018"
Disney_Vac_1.mkv

Best,

Kieran

> Thanks,
>
> -Ron
>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-user mailing list