The following warnings occurred: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Trying to access array offset on null - Line: 14 - File: inc/plugins/cookielaw.php(272) : eval()'d code PHP 8.3.12-nmm1 (Linux)
|
How to run this ffmpeg command lines in hybrid? - Printable Version +- Selur's Little Message Board (https://forum.selur.net) +-- Forum: Hybrid - Support (https://forum.selur.net/forum-1.html) +--- Forum: Problems & Questions (https://forum.selur.net/forum-3.html) +--- Thread: How to run this ffmpeg command lines in hybrid? (/thread-3078.html) |
How to run this ffmpeg command lines in hybrid? - i990049 - 06.02.2023 filename="*.mp4" for i in $filename; do echo $i if [[ ! -d ./out_mp4 ]];then mkdir ./out_mp4 fi pwd echo ffmpeg.exe -i "$i" -map 0:v -c:v copy -bsf:v h264_mp4toannexb raw.h264 -y ffmpeg.exe -fflags +genpts -r 24 -i raw.h264 -i "$i" -map 0:v -c:v copy -map 1:a -af atempo=0.8 -movflags faststart ./out_mp4/"$i" -y rm raw.h264 done RE: How to run this ffmpeg command lines in hybrid? - Selur - 06.02.2023 Hybrid will not use ffmpeg for audio filtering. Hybrid will not create a 'out_mp4' folder. That said, it looks like you want to reencode and slow down the first audio stream and pass-through the video while changing its frame rate to 24fps and then create a .mp4-file with faststart enabled. Passing through the video and setting the fps to 24 can be done by:
When using MP4Box, adding faststart requires you to enable 'Config->Containers->Mp4Settings->Interleave'. Cu Selur RE: How to run this ffmpeg command lines in hybrid? - i990049 - 06.02.2023 I tried,the output video is slow to 24 FPS,but the audio is still the same. where is the problem?FFmpeg didn't need to reencode,why hybrid needed? RE: How to run this ffmpeg command lines in hybrid? - Selur - 06.02.2023 Quote:FFmpeg didn't need to reencode,why hybrid needed?Your FFmpeg command line call does reencode the audio to the default audio format for mp4 which should be aac. (FFmpeg audio filters can only be applied when reencoding.) About the audio speed: My guess is that your audio queue entry does not contain the filter settings. Since you didn't share a debug output, I have no clue what you actually did. Cu Selur RE: How to run this ffmpeg command lines in hybrid? - i990049 - 06.02.2023 How to speed up / slow down a video – FFmpeg FFmpeg can do this without reencode. I tried the menthod you gave me again,it works. Here is the debugoutput,click anyone of the red button to download it.Is it possible that hybrid speed up / slow down a video without reencode?Other containers without FFmpeg encode can be accepted. Why video doesn't need to reencode but audio does? https://wwi.lanzoup.com/iX03h0msu1da RE: How to run this ffmpeg command lines in hybrid? - Selur - 06.02.2023 The audio is reencoded, not the video. 'Base->Processing->Video' to 'passhtrough' makes sure there is no reencoding of the video. None of the examples on the linked page does audio speedup without reencoding. Quote:Why video doesn't need to reencode but audio does?Video only needs time code adjustment, which is a container info. For audio the timing is part of the format, additionally you usually want to modify the audio to not change the pitch. (to not get chipmunk or low voices) Looking at the debug output, the audio queue entry: D:\download\115download\1.mp4;0;aac;2;bitrate;4;FDK;low complexity;44100;0.00;en;-41;1354.025;aac;0;1;don't change;2;false;;false;1;true;1.0000;0.8000;false;false;false;;;true;48000;unknown;aac;;false;true;false;2/0/0;1/1;;0;0;;None;54:_:15;10;20;0;1000;;false;;pcm;false;1;;;;Stereo;2.77;16;-n;4;GPU;NVIDIA CUDA;;2;false;D:\download\115download\1.mp4;true;false;;;false;2;;LC;-1; Looking at the audio encoding calls: "D:\Program Files\Hybrid\64bit\ffmpeg.exe" -y -threads 8 -loglevel fatal -nostdin -i "C:\Users\Administrator\AppData\Local\Temp\iId_1_aid_0_lang_en_DELAY_-41ms_2023-02-07@01_33_24_8210_01.aac" -ac 2 -ar 44100 -f sox - | D:\Program Files\Hybrid\64bit\sox.exe" --multi-threaded --temp "C:\Users\Administrator\AppData\Local\Temp\2023-02-07@01_33_24_821001" --buffer 524288 -S -t sox - -t wav - rate -v 48000 tempo 0.80000000 | "D:\Program Files\Hybrid\64bit\fdkaac.exe" --bitrate-mode 4 --profile 2 --transport-format 0 --gapless-mode 2 --ignorelength -o "C:\Users\Administrator\AppData\Local\Temp\iId_1_aid_0_lang_en_DELAY_-41ms_2023-02-07@01_33_24_8210_02.aac" - -> Accodring to the debug output Hybrid is doing what it should. Cu Selur RE: How to run this ffmpeg command lines in hybrid? - i990049 - 06.02.2023 Here are audios extracted from slow video and the original audio, and the time picture is displayed by Potplayer. All slowdown audios don't show the right time exactly compared to the slowdown video time 28 min 12 s. Why? The FFmpeg output slowdown audio file is almost the same size as the original file, so I thought it didn't reencode but just changed time like slowdown video. ffmpeg didn't change the audio bitrate. https://wwi.lanzoup.com/ioKCK0mswq6f Whether Hybrid has the same filter like atempo audio filter in FFmpeg?Can it speed up/slow down any kind of audio with any kind of containers? https://trac.ffmpeg.org/wiki/How%20to%20speed%20up%20/%20slow%20down%20a%20video RE: How to run this ffmpeg command lines in hybrid? - Selur - 07.02.2023 Sorry, got no time to read up on how ffmpegs filters work. (busy few next days, not much time to do anything aside from work) Hybrid uses sox for filtering. Maybe instead of 1:0.8 one needs to use 0.8:1. (you can read up on how both filters work if you want to know) SpeedUp/SlowDown is independent of format and container as long as Hybrid can convert to the format. Cu Selur RE: How to run this ffmpeg command lines in hybrid? - i990049 - 07.02.2023 I got some sox command lines to slow down audio, and it didn't need to change the bitrate. sox slow.aiff fixed.aiff speed 1.027 Can hybrid SpeedUp/SlowDown audio passthough without changing bitrate just like sox? Since you are busy, I can wait for the answer until you're free. RE: How to run this ffmpeg command lines in hybrid? - Selur - 07.02.2023 That line also does reencode from pcm to pcm,.... Hybrid by default uses 'tempo' instead of 'speed', if you want it to use 'speed', simply enabled 'Adjust pitch' in the audio 'Speed change' settings. The only way I can think of to change the speed of an audio stream without having to reencode and let the decoder on playback do the job would be to use mkv as container and use mkvs stretch option. In general, I would not recommend doing that since letting the player on playback so the speed change: a. will require additional ressources (on playback) b. will usually be less quality (since it has to be done fast enough for realtime playback) Also not all players support this, so on some players your video will be broken one way or the other. Hybrid can do that, but you will have to figure out how to do it on your own, since I won't explain it since it's really not something I would recommend. Cu Selur |