You are not logged in.
Pages: 1
I am trying convert 1080p video to 720p with Handbrake it produces a file with no sound. I tried fix it with gstreamer plugins ugly bad good it did not help. Tried to install libavcodec-extra58 which says newer depedency packages are installed so it wont install. Tried to remove libavcodec but it want to uninstall everything which have to do anything with multimedia.
Anyone have an idea how to convert videos without loosing audio on Debian 11?
Last edited by nandi (2022-11-27 12:12:56)
Offline
I have not tried this myself but I imagine ffmpeg should be capable of doing this.
https://swisscows.com/en/web?query=ffmp … eo+to+720p
/Martin
"Problems worthy of attack
prove their worth by hitting back."
Piet Hein
Offline
This is very intresting Martin.
So if i run ffmpeg -i <source video> -vf scale=<width>:<height> <output video> that would create a smaller file with sound?
I will check it soon i got home.
Offline
@Nandi; Depending on the desired output format and input file properties in question, audio can be pass-through in certain cases (-c:a copy), similar switch should be in handbrake as well irc. As a general rule, I always start with
mediainfo myinputfile.mp4
to get an idea about whatsup. p.s. Post the output of mediainfo here to get additional hints on how to go on.
Last edited by brontosaurusrex (2022-11-27 18:29:00)
Online
Thank you here is the output:
Format : Matroska
Format version : Version 2
File size : 1.70 GiB
Duration : 1 h 36 min
Overall bit rate : 2 529 kb/s
Encoded date : UTC 2016-03-08 07:06:04
Writing application : mkvmerge v4.0.0 ('The Stars
were mine') built on Jun 5 2010 17:44:09
Writing library : libebml v1.0.0 + libmatroska v1.0.0
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4
Format settings : CABAC / 4 Ref Frames
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 1 h 36 min
Nominal bit rate : 2 341 kb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.047
Writing library : x264 core 133 r2334 a3ac64b
Encoding settings : cabac=1 / ref=4 /
deblock=1:-1:-1 / analyse=0x3:0x113 / me=umh / subme=8 / psy=1 /
psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=2
/ 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 /
chroma_qp_offset=-2 / threads=48 / lookahead_threads=8 /
sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0
/ constrained_intra=0 / bframes=3 / b_pyramid=0 / b_adapt=1 / b_bias=0
/ direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=240 /
keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 /
rc=2pass / mbtree=1 / bitrate=2341 / ratetol=1.0 / qcomp=0.60 /
qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 /
vbv_maxrate=20000 / vbv_bufsize=25000 / nal_hrd=none / ip_ratio=1.40 /
aq=1:1.00
Default : No
Forced : No
Statistics Tags Issue : mkvmerge v7.8.0 ('River
Man') 32bit built on Mar 27 2015 16:18:02 2016-03-08 05:50:53 /
mkvmerge v4.0.0 ('The Stars were mine') built on Jun 5 2010 17:44:09
2016-03-08 07:06:04
FromStats_BitRate : 2338937
FromStats_Duration : 01:36:01.881000000
FromStats_FrameCount : 138147
FromStats_StreamSize : 1684584840
Audio
ID : 2
Format : AAC LC SBR
Format/Info : Advanced Audio Codec Low
Complexity with Spectral Band Replication
Commercial name : HE-AAC
Format settings : Explicit
Codec ID : A_AAC-2
Duration : 1 h 36 min
Channel(s) : 6 channels
Channel layout : C L R Ls Rs LFE
Sampling rate : 48.0 kHz
Frame rate : 23.438 FPS (2048 SPF)
Compression mode : Lossy
Delay relative to video : 31 ms
Language : English
Default : No
Forced : No
Statistics Tags Issue : mkvmerge v7.8.0 ('River
Man') 32bit built on Mar 27 2015 16:18:02 2016-03-08 05:50:53 /
mkvmerge v4.0.0 ('The Stars were mine') built on Jun 5 2010 17:44:09
2016-03-08 07:06:04
FromStats_BitRate : 187797
FromStats_Duration : 01:36:01.920000000
FromStats_FrameCount : 135045
FromStats_StreamSize : 135258961
Text
ID : 3
Format : UTF-8
Codec ID : S_TEXT/UTF8
Codec ID/Info : UTF-8 Plain Text
Default : Yes
Forced : No
Offline
Something like this
ffmpeg -t 10 -i input.mkv -c:a copy -c:s copy -vf scale=1280:720 -vcodec libx264 -preset medium -crf 23 -threads 0 output.mkv
should work. This will encode first 10 seconds, when you are sure that output is behaving, remove the '-t 10' part of the command line. This should copy audio and subtitle stream and scaledown, reencode video. p.s. Similar thing can be constructed in handbrake I imagine.
edit: What is crf: http://jaewon.hwang.info/jaewon/wp-cont … n-x264.pdf
Last edited by brontosaurusrex (2022-11-27 20:04:09)
Online
Thank you for the comments
Its very strange the only way to get sound to the converted file
In Handbrake select passthrough with aac or passthrough with mp3 manualy at audio option at every single file. This option not saving into the presets because depending from the audio type of every file the passthrough option changes. Its weird feels like it is some kind of copy protection maybe the nvidia driver causes it?
Offline
There might be something revealing in the logs.
https://handbrake.fr/docs/en/latest/hel … on%20Linux
Pretty sure it's not nvidias fault.
Last edited by brontosaurusrex (2022-12-01 07:54:16)
Online
Yes i looked in the logfile the only thing i could see abnormal is a hundred lines of the following message
encavcodecaudio: avcodec_send_frame failed
Do you know what could be the problem?
Offline
No idea, did you try the flatpak version provided by handbrake team (for comparision)?
https://handbrake.fr/downloads.php
Online
Thank you the flatpak version works it is two version higher then the bullseye version. I read in a Fedora forum the Ffmpeg is not compatible with the version of Handbrake which is included in Bullseye.
Offline
Pages: 1