Discussion:
[FFmpeg-user] 4K Compression using x.265 issues
Ron Barnes
2018-11-15 12:48:54 UTC
Permalink
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.
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?

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.

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).

Thanks,

-Ron

_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-***@ffmpeg.org wi
Kieran O Leary
2018-11-15 13:30:36 UTC
Permalink
Hi,
Post by Ron Barnes
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.
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.
Post by Ron Barnes
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.
Post by Ron Barnes
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
Post by Ron Barnes
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
Post by Ron Barnes
Thanks,
-Ron
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-***@ffmpeg.org with subject "unsubscri
Kieran O Leary
2018-11-15 13:33:35 UTC
Permalink
I should have proof-read better. I have many typos in here, but the
worse is my broken command where I said -ar 2 instead of -ac 2

Also I meant to say that I wasn't sure if downsampling will increase
the volume levels, as I don't know enough about audio .

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 -ac 2 -c:a aac
-b:a 128k -metadata title="Juliana - Disney 8-12-2018"
Disney_Vac_1.mkv
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-request
Ron Barnes
2018-11-15 16:35:32 UTC
Permalink
Hi Kieran,

I was able to compress the file from 80GB to 27GB but I'm still having major buffering issues. Would the commands below be the same for an MP4 output? I have had better luck using MP4 instead of MKV.

Thanks,
-Ron

-----Original Message-----
From: ffmpeg-user <ffmpeg-user-***@ffmpeg.org> On Behalf Of Kieran O Leary
Sent: Thursday, November 15, 2018 8:34 AM
To: FFmpeg user questions <ffmpeg-***@ffmpeg.org>
Subject: Re: [FFmpeg-user] 4K Compression using x.265 issues

I should have proof-read better. I have many typos in here, but the worse is my broken command where I said -ar 2 instead of -ac 2

Also I meant to say that I wasn't sure if downsampling will increase the volume levels, as I don't know enough about audio .

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 -ac 2 -c:a aac -b:a 128k -metadata title="Juliana - Disney 8-12-2018"
Disney_Vac_1.mkv
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email ffmpeg-user-***@ffmpeg.org with subject "unsubscribe".

_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-***@ff
Kieran O Leary
2018-11-15 16:53:38 UTC
Permalink
Post by Ron Barnes
Hi Kieran,
I was able to compress the file from 80GB to 27GB but I'm still having
major buffering issues. Would the commands below be the same for an MP4
output? I have had better luck using MP4 instead of MKV.
You could replace the reserve_index_space 50k command with
-movflags +fast start

If using MP4 or mov.

Best,

Kieran
Post by Ron Barnes
Thanks,
-Ron
-----Original Message-----
Sent: Thursday, November 15, 2018 8:34 AM
Subject: Re: [FFmpeg-user] 4K Compression using x.265 issues
I should have proof-read better. I have many typos in here, but the worse
is my broken command where I said -ar 2 instead of -ac 2
Also I meant to say that I wasn't sure if downsampling will increase the
volume levels, as I don't know enough about audio .
ffmpeg -i "YDXJ0085.MP4" -c:v libx265 -preset medium -map 0
-reserve_index_space 50k -crf 22 -s 3840x2160 -b:v 10M -ac 2 -c:a aac -b:a
128k -metadata title="Juliana - Disney 8-12-2018"
Disney_Vac_1.mkv
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-***@ffmpe
Kieran O Leary
2018-11-15 16:57:08 UTC
Permalink
Post by Kieran O Leary
Post by Ron Barnes
Hi Kieran,
I was able to compress the file from 80GB to 27GB but I'm still having
major buffering issues. Would the commands below be the same for an MP4
output? I have had better luck using MP4 instead of MKV.
You could replace the reserve_index_space 50k command with
-movflags +fast start
If using MP4 or mov.
Best,
Kieran
Meant to say -movflags +faststart
Sorry :(

Best,

Kieran
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-***@ffmpeg.org with
Ron Barnes
2018-11-15 18:42:37 UTC
Permalink
Thank you Kieran!

-----Original Message-----
From: ffmpeg-user <ffmpeg-user-***@ffmpeg.org> On Behalf Of Kieran O Leary
Sent: Thursday, November 15, 2018 11:57 AM
To: FFmpeg user questions <ffmpeg-***@ffmpeg.org>
Subject: Re: [FFmpeg-user] 4K Compression using x.265 issues
Post by Ron Barnes
Hi Kieran,
I was able to compress the file from 80GB to 27GB but I'm still
having major buffering issues. Would the commands below be the same
for an MP4 output? I have had better luck using MP4 instead of MKV.
You could replace the reserve_index_space 50k command with -movflags
+fast start
If using MP4 or mov.
Best,
Kieran
Meant to say -movflags +faststart
Sorry :(

Best,

Kieran
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email ffmpeg-user-***@ffmpeg.org with subject "unsubscribe".

_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-reque
Carl Eugen Hoyos
2018-11-16 22:20:58 UTC
Permalink
Post by Kieran O Leary
Post by Kieran O Leary
Post by Ron Barnes
I was able to compress the file from 80GB to 27GB but I'm still having
major buffering issues. Would the commands below be the same for an MP4
output? I have had better luck using MP4 instead of MKV.
You could replace the reserve_index_space 50k command with
Meant to say -movflags +faststart
Or use qt-faststart from the tools directory if you have
already created the mov/mp4 file without faststart.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpe

Ron Barnes
2018-11-15 14:07:24 UTC
Permalink
Thank you Kieran!

I will try the below command and thank you so much!

-Ron

-----Original Message-----
From: ffmpeg-user <ffmpeg-user-***@ffmpeg.org> On Behalf Of Kieran O Leary
Sent: Thursday, November 15, 2018 8:31 AM
To: FFmpeg user questions <ffmpeg-***@ffmpeg.org>
Subject: Re: [FFmpeg-user] 4K Compression using x.265 issues

Hi,
Post by Ron Barnes
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.
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.
Post by Ron Barnes
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.
Post by Ron Barnes
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
Post by Ron Barnes
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
Post by Ron Barnes
Thanks,
-Ron
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email ffmpeg-user-***@ffmpeg.org with subject "unsubscribe".

_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-***@ffmpeg.org
Ron Barnes
2018-11-16 12:00:24 UTC
Permalink
All,

For some reason the below command is not working right. I am unable to compress my movie by an significant amount.
The input movie (MYMOVIE.Mkv) is just over 55GB and the resulting output is just over 53GB.

I thought (and I am probably wrong) that by raising or lowering the -crf value would increase or decrease the size of my output file. No matter what value I use, be it 18 or 28, the output file size is always the same.

Can anyone determine where I'm going south in order to decrease the files's footprint (size) yet still preserve the movie quality?

I want to take all the audio streams (only audio) and I am converting them to mp3 because I do not have a very good sound system and the actual 7.1 audio stream sounds awful.

ffmpeg -i "MYMOVIE.Mkv" -c:v libx265 -preset medium -map 0 -c:a:0 libmp3lame -b:a:0 128k -c copy -reserve_index_space 1000k -crf 28 -s 3840x2160 -b:v 10M -ac 2 -c:a aac -b:a 128k -metadata title="MYMOVIE" COMPRESSED_MYMOVIE.mkv

Thank you,

-Ron

_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-request
Kieran O Leary
2018-11-16 13:56:17 UTC
Permalink
Post by Ron Barnes
All,
For some reason the below command is not working right. I am unable to
compress my movie by an significant amount.
The input movie (MYMOVIE.Mkv) is just over 55GB and the resulting output is just over 53GB.
I thought (and I am probably wrong) that by raising or lowering the -crf
value would increase or decrease the size of my output file. No matter
what value I use, be it 18 or 28, the output file size is always the same.
Can anyone determine where I'm going south in order to decrease the
files's footprint (size) yet still preserve the movie quality
Yes,you are manually setting the bitrate with your -b:v 10M command.
Remove that and try again.

Best,

Kieran
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user
Paul B Mahol
2018-11-16 14:01:43 UTC
Permalink
Post by Ron Barnes
All,
For some reason the below command is not working right. I am unable to
compress my movie by an significant amount.
The input movie (MYMOVIE.Mkv) is just over 55GB and the resulting output is just over 53GB.
I thought (and I am probably wrong) that by raising or lowering the -crf
value would increase or decrease the size of my output file. No matter what
value I use, be it 18 or 28, the output file size is always the same.
Can anyone determine where I'm going south in order to decrease the files's
footprint (size) yet still preserve the movie quality?
I want to take all the audio streams (only audio) and I am converting them
to mp3 because I do not have a very good sound system and the actual 7.1
audio stream sounds awful.
ffmpeg -i "MYMOVIE.Mkv" -c:v libx265 -preset medium -map 0 -c:a:0 libmp3lame
-b:a:0 128k -c copy -reserve_index_space 1000k -crf 28 -s 3840x2160 -b:v 10M
-ac 2 -c:a aac -b:a 128k -metadata title="MYMOVIE" COMPRESSED_MYMOVIE.mkv
Remove: -c copy.
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-***@ffmpeg.org with subject
Ron Barnes
2018-11-16 17:02:56 UTC
Permalink
Hi,

When I remove the -c copy - get an error.. subtitle encoding currently only possible from text to text or bitmap to bitmap.. then it just ends.

Any way to preserve the subtitles?

-Ron

-----Original Message-----
From: ffmpeg-user <ffmpeg-user-***@ffmpeg.org> On Behalf Of Paul B Mahol
Sent: Friday, November 16, 2018 9:02 AM
To: FFmpeg user questions <ffmpeg-***@ffmpeg.org>
Subject: Re: [FFmpeg-user] 4K Compression using x.265 issues
Post by Ron Barnes
All,
For some reason the below command is not working right. I am unable
to compress my movie by an significant amount.
The input movie (MYMOVIE.Mkv) is just over 55GB and the resulting output is just over 53GB.
I thought (and I am probably wrong) that by raising or lowering the
-crf value would increase or decrease the size of my output file. No
matter what value I use, be it 18 or 28, the output file size is always the same.
Can anyone determine where I'm going south in order to decrease the
files's footprint (size) yet still preserve the movie quality?
I want to take all the audio streams (only audio) and I am converting
them to mp3 because I do not have a very good sound system and the
actual 7.1 audio stream sounds awful.
ffmpeg -i "MYMOVIE.Mkv" -c:v libx265 -preset medium -map 0 -c:a:0 libmp3lame
-b:a:0 128k -c copy -reserve_index_space 1000k -crf 28 -s 3840x2160
-b:v 10M -ac 2 -c:a aac -b:a 128k -metadata title="MYMOVIE"
COMPRESSED_MYMOVIE.mkv
Remove: -c copy.
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email ffmpeg-user-***@ffmpeg.org with subject "unsubscribe".

_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-reque
Paul B Mahol
2018-11-16 17:04:40 UTC
Permalink
Post by Ron Barnes
Hi,
When I remove the -c copy - get an error.. subtitle encoding currently only
possible from text to text or bitmap to bitmap.. then it just ends.
Any way to preserve the subtitles?
Yes, use -c:s copy
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-***@ffmpeg.org with subject "unsubscrib
Ron Barnes
2018-11-16 17:22:27 UTC
Permalink
Thank you!

-----Original Message-----
From: ffmpeg-user <ffmpeg-user-***@ffmpeg.org> On Behalf Of Paul B Mahol
Sent: Friday, November 16, 2018 12:05 PM
To: FFmpeg user questions <ffmpeg-***@ffmpeg.org>
Subject: Re: [FFmpeg-user] 4K Compression using x.265 issues
Post by Ron Barnes
Hi,
When I remove the -c copy - get an error.. subtitle encoding currently
only possible from text to text or bitmap to bitmap.. then it just ends.
Any way to preserve the subtitles?
Yes, use -c:s copy
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email ffmpeg-user-***@ffmpeg.org with subject "unsubscribe".

_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-***@ffmpeg.org with subject "unsub
Continue reading on narkive:
Loading...