I've been trying to join two specific MP4 files but for some reason the audio on the second part of the two files goes completely mute. There are some inconsistencies between the two files, but i've tried my best to have them be compatible with each other. The first file is a HD source of a recorded tv show, but my PVR cut off the end credits because it's stupid, so i sourced those from a video sharing site, only they were of lower SD resolution, so i upscaled it to 1080p in AvsPmod and sharpened it up a little to make the two match more, oh and the frame rate was 25fps (whereas the other is deinterlaced to 50 frames) so i doubled the frame rate of the second file in ffmpeg to match (I would have done so in AvsPmod but it caused the sound to go way out of sync, most likely because it's a progressive source) No matter what i do, i just can't seem to get any sound on the credits once i join them up. I can join other videos together and not have this problem.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 18 of 18
Thread
-
-
To join two files together, both must have identical specs AND that includes the sound.
-
Code:
Format : MPEG-4 Format profile : Base Media Codec ID : isom (isom/iso2/avc1/mp41) File size : 2.21 GiB Duration : 45 min 39 s Overall bit rate : 6 917 kb/s Writing application : Lavf58.35.102 Video ID : 1 Format : AVC Format/Info : Advanced Video Codec Format profile : High@L5 Format settings : CABAC / 5 Ref Frames Format settings, CABAC : Yes Format settings, Reference frames : 5 frames Codec ID : avc1 Codec ID/Info : Advanced Video Coding Duration : 45 min 39 s Bit rate : 6 779 kb/s Width : 1 920 pixels Height : 1 080 pixels Display aspect ratio : 16:9 Frame rate mode : Constant Frame rate : 50.000 FPS Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Bits/(Pixel*Frame) : 0.065 Stream size : 2.16 GiB (98%) Writing library : x264 core 159 Encoding settings : cabac=1 / ref=5 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / 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=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=2 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=50 / rc=crf / mbtree=1 / crf=16.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00 Codec configuration box : avcC Audio ID : 2 Format : AAC LC Format/Info : Advanced Audio Codec Low Complexity Codec ID : mp4a-40-2 Duration : 45 min 39 s Duration_LastFrame : -9 ms Bit rate mode : Constant Bit rate : 129 kb/s Channel(s) : 2 channels Channel layout : L R Sampling rate : 48.0 kHz Frame rate : 46.875 FPS (1024 SPF) Compression mode : Lossy Stream size : 42.0 MiB (2%) Default : Yes Alternate group : 1
Code:Format : MPEG-4 Format profile : Base Media Codec ID : isom (isom/iso2/avc1/mp41) File size : 760 KiB Duration : 26 s 224 ms Overall bit rate : 238 kb/s Writing application : Lavf58.35.102 Video ID : 1 Format : AVC Format/Info : Advanced Video Codec Format profile : High@L5 Format settings : CABAC / 5 Ref Frames Format settings, CABAC : Yes Format settings, Reference frames : 5 frames Codec ID : avc1 Codec ID/Info : Advanced Video Coding Duration : 26 s 200 ms Bit rate : 100 kb/s Width : 1 920 pixels Height : 1 080 pixels Display aspect ratio : 16:9 Frame rate mode : Constant Frame rate : 50.000 FPS Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Bits/(Pixel*Frame) : 0.001 Stream size : 320 KiB (42%) Writing library : x264 core 159 Encoding settings : cabac=1 / ref=5 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / 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=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=2 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=50 / rc=crf / mbtree=1 / crf=16.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00 Codec configuration box : avcC Audio ID : 2 Format : AAC LC Format/Info : Advanced Audio Codec Low Complexity Codec ID : mp4a-40-2 Duration : 26 s 224 ms Duration_LastFrame : -15 ms Bit rate mode : Constant Bit rate : 128 kb/s Channel(s) : 2 channels Channel layout : L R Sampling rate : 44.1 kHz Frame rate : 43.066 FPS (1024 SPF) Compression mode : Lossy Stream size : 409 KiB (54%) Default : Yes Alternate group : 1
-
Did you account for the audio sampling rate difference? 48Khz vs. 44.1Khz ?
-
-
Rather than making another thread, i also want to know how you can trim two or more video files in the same .avs document. I must be doing something wrong as the second video doesn't trim correctly.
Code:SetFilterMTMode("DEFAULT_MT_MODE", 2) SetFilterMTMode("QTGMC", 2) vid=AVISource("F:\Video Files\Clip 1.avi").AssumeTFF().AssumeFPS(25).QTGMC(preset="slow", matchpreset="slow", matchpreset2="slow", sourcematch=3, Lossless=2, TR2=2, EdiThreads=2, border=true).Spline36Resize(1280,720).Trim(350,6300) vid2=AVISource("F:\Video Files\Clip 2.avi").AssumeTFF().AssumeFPS(25).QTGMC(preset="slow", matchpreset="slow", matchpreset2="slow", sourcematch=3, Lossless=2, TR2=2, EdiThreads=2, border=true).Spline36Resize(1280,720).Trim(6350,13580) vid ++ vid2 Prefetch(5)
-
-
-
Does "vid" or the 1st part display correctly?
what does vid2 alone return ? Disable multithreading , everything else. Just check if this works
Code:AVISource("F:\Video Files\Clip 2.avi").AssumeTFF().AssumeFPS(25).QTGMC(preset="slow", matchpreset="slow", matchpreset2="slow", sourcematch=3, Lossless=2, TR2=2, EdiThreads=2, border=true).Spline36Resize(1280,720).Trim(6350,13580)
-
Yes the first part is working fine, though it cuts off at frame 5950 rather than 6300, then just crashes into the final frame of the second clip and stays there. Though i trim it at frame 350 at the start and 6300 minus 350 is 5950 interestingly.
Getting the same result when the second clip is on it's own, though i should note i'm working with decoded avi files that were decompressed from mp4's to get it to work properly in AvsPmod, so when using QTGMC, once the video ends in AvsPmod, it's only halfway through the timeline then for the second half just displays the last frame of the video continuously, so i always have to trim that section out before rendering.Last edited by Master Tape; 10th Aug 2020 at 16:38.
-
Why couldn't you get mp4's to work ?
Check each clip alone without any filters
Code:AVISource("F:\Video Files\Clip 1.avi")
Code:AVISource("F:\Video Files\Clip 2.avi")
-
The reason i use avi's is because the mp4's give me nothing but problems and i couldn't get them to play correctly after rendering.
Yes the mp4's play fine in the media players with no issue. Right now i can't get them to load using LSMASHVideoSource.
[Attachment 54491 - Click to enlarge]
As for the avi's, i previewed them on their own without any of the filters added and they just play like they do in vlc, ect, twice as fast to the end halfway through then just displays the last frame for the second half. Though it's fine for editing single clips, and just trimming out the dead space and the rendered file plays perfectly. -
Are you using a current version ?
https://github.com/HolyWu/L-SMASH-Works/releases
What does mediainfo (view=>text) say about one of the mp4's (copy/paste the text back here)
Try LWLibavVideoSource("video.mp4")
Or try ffms2. Use a current version such as this
https://forum.doom9.org/showthread.php?p=1906345#post1906345
FFVideoSource("video.mp4")
As for the avi's, i previewed them on their own without any of the filters added and they just play like they do in vlc, ect, twice as fast to the end halfway through then just displays the last frame for the second half. Though it's fine for editing single clips, and just trimming out the dead space and the rendered file plays perfectly.
If the original MP4's play fine in media players, everything should just work -
[QUOTE=poisondeathray;2591882] No, but downloaded the latest version and still had issues with the sound being in sync on the second clip.
What does mediainfo (view=>text) say about one of the mp4's (copy/paste the text back here)Code:Format : MPEG-4 Format profile : Base Media Codec ID : isom (isom/iso2/avc1/mp41) File size : 238 MiB Duration : 2 min 13 s Overall bit rate mode : Variable Overall bit rate : 15.0 Mb/s Description : AverMedia_er130_001.001.003 Encoded date : UTC 1970-01-01 00:00:00 Tagged date : UTC 1970-01-01 00:00:00 Writing application : Lavf53.3.0 Comment : Quality_BEST Video ID : 1 Format : AVC Format/Info : Advanced Video Codec Format profile : High@L4.1 Format settings : CABAC / 2 Ref Frames Format settings, CABAC : Yes Format settings, Reference frames : 2 frames Codec ID : avc1 Codec ID/Info : Advanced Video Coding Duration : 2 min 13 s Bit rate : 14.9 Mb/s Width : 1 920 pixels Height : 1 080 pixels Display aspect ratio : 16:9 Frame rate mode : Constant Frame rate : 50.000 FPS Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Interlaced Scan type, store method : Separated fields Scan order : Top Field First Bits/(Pixel*Frame) : 0.144 Stream size : 236 MiB (99%) Encoded date : UTC 1970-01-01 00:00:00 Tagged date : UTC 1970-01-01 00:00:00 Codec configuration box : avcC Audio ID : 2 Format : AAC LC Format/Info : Advanced Audio Codec Low Complexity Codec ID : mp4a-40-2 Duration : 2 min 12 s Bit rate mode : Variable Bit rate : 128 kb/s Channel(s) : 2 channels Channel layout : L R Sampling rate : 48.0 kHz Frame rate : 46.875 FPS (1024 SPF) Compression mode : Lossy Stream size : 2.03 MiB (1%) Default : Yes Alternate group : 1 Encoded date : UTC 1970-01-01 00:00:00 Tagged date : UTC 1970-01-01 00:00:00
Try LWLibavVideoSource("video.mp4")
Or try ffms2. Use a current version such as this
https://forum.doom9.org/showthread.php?p=1906345#post1906345
FFVideoSource("video.mp4")
Code:SetFilterMTMode("DEFAULT_MT_MODE", 2) SetFilterMTMode("QTGMC", 2) vid = FFVideoSource("F:\A Video Files\Clip 1.mp4").AssumeTFF().AssumeFPS(25).QTGMC(preset="slow", matchpreset="slow", matchpreset2="slow", sourcematch=3, Lossless=2, TR2=2, EdiThreads=2, border=true).Spline36Resize(1280,720).Trim(350,6300) aud = FFAudioSource("F:\A Video Files\Clip 1") vid2 = FFVideoSource("F:\A Video Files\Clip 2.mp4").AssumeTFF().AssumeFPS(25).QTGMC(preset="slow", matchpreset="slow", matchpreset2="slow", sourcematch=3, Lossless=2, TR2=2, EdiThreads=2, border=true).Spline36Resize(1280,720).Trim(380,6400) aud2 = FFAudioSource("F:\A Video Files\Clip 2.mp4") vid ++ vid2 AudioDub(vid,aud) ++ AudioDub(vid2,aud2) Prefetch(5)
-
What was the fps returned for the video only ? It says 50fps in mediainfo
Does using fpsnum=25, fpsden=1 help ?
LSmashVideoSource("video.mp4", fpsnum=25, fpsden=1)
Getting great results with FFVideo. Just remembered how to return a value, in this case "vid2" to work on it separately. The trims were all wrong because the two videos were being joined, and so was declaring the wrong frames on clip2. Very pleased with the outcome of the video, but having problems with the audio. Whilst the video plays fine, the audio plays as it would unedited, so everything is all out of sync. How do i get the trims to apply to the audio aswell?
Code:SetFilterMTMode("DEFAULT_MT_MODE", 2) SetFilterMTMode("QTGMC", 2) vid = FFVideoSource("F:\A Video Files\Clip 1.mp4").AssumeTFF().AssumeFPS(25).QTGMC(preset="slow", matchpreset="slow", matchpreset2="slow", sourcematch=3, Lossless=2, TR2=2, EdiThreads=2, border=true).Spline36Resize(1280,720).Trim(350,6300) aud = FFAudioSource("F:\A Video Files\Clip 1") vid2 = FFVideoSource("F:\A Video Files\Clip 2.mp4").AssumeTFF().AssumeFPS(25).QTGMC(preset="slow", matchpreset="slow", matchpreset2="slow", sourcematch=3, Lossless=2, TR2=2, EdiThreads=2, border=true).Spline36Resize(1280,720).Trim(380,6400) aud2 = FFAudioSource("F:\A Video Files\Clip 2.mp4") vid ++ vid2 AudioDub(vid,aud) ++ AudioDub(vid2,aud2) Prefetch(5)
ffms2 has a helper function FFMpegSource2() which returns video and audio, so you can trim the video and audio together. It's a shortcut for applying AudioDub before applying Trim
Code:SetFilterMTMode("DEFAULT_MT_MODE", 2) SetFilterMTMode("QTGMC", 2) vid = FFMpegSource2("F:\A Video Files\Clip 1.mp4", atrack=-1).AssumeTFF().AssumeFPS(25).QTGMC(preset="slow", matchpreset="slow", matchpreset2="slow", sourcematch=3, Lossless=2, TR2=2, EdiThreads=2, border=true).Spline36Resize(1280,720).Trim(350,6300) vid2 = FFMpegSource2("F:\A Video Files\Clip 2.mp4", atrack=-1).AssumeTFF().AssumeFPS(25).QTGMC(preset="slow", matchpreset="slow", matchpreset2="slow", sourcematch=3, Lossless=2, TR2=2, EdiThreads=2, border=true).Spline36Resize(1280,720).Trim(380,6400) vid ++ vid2 Prefetch(5)
-
I think MediaInfo is declaring the fields as frames. It's 25fps, so 50i PAL.
Does using fpsnum=25, fpsden=1 help ?
LSmashVideoSource("video.mp4", fpsnum=25, fpsden=1)
ffms2 has a helper function FFMpegSource2() which returns video and audio, so you can trim the video and audio together. It's a shortcut for applying AudioDub before applying Trim
Code:SetFilterMTMode("DEFAULT_MT_MODE", 2) SetFilterMTMode("QTGMC", 2) vid = FFMpegSource2("F:\A Video Files\Clip 1.mp4", atrack=-1).AssumeTFF().AssumeFPS(25).QTGMC(preset="slow", matchpreset="slow", matchpreset2="slow", sourcematch=3, Lossless=2, TR2=2, EdiThreads=2, border=true).Spline36Resize(1280,720).Trim(350,6300) vid2 = FFMpegSource2("F:\A Video Files\Clip 2.mp4", atrack=-1).AssumeTFF().AssumeFPS(25).QTGMC(preset="slow", matchpreset="slow", matchpreset2="slow", sourcematch=3, Lossless=2, TR2=2, EdiThreads=2, border=true).Spline36Resize(1280,720).Trim(380,6400) vid ++ vid2 Prefetch(5)
-
Back to joining files and it has happened again. Only this time i can see no differences between the three files (basically i cut out segments from one long video clip and want to rejoin them) so they are essentially from the one file so should all have identical specs.
Code:Video ID : 1 Format : AVC Format/Info : Advanced Video Codec Format profile : High@L3.1 Format settings : CABAC / 6 Ref Frames Format settings, CABAC : Yes Format settings, Reference frames : 6 frames Codec ID : avc1 Codec ID/Info : Advanced Video Coding Duration : 9 min 0 s Bit rate : 1 485 kb/s Width : 896 pixels Height : 504 pixels Display aspect ratio : 16:9 Frame rate mode : Variable Frame rate : 25.000 FPS Minimum frame rate : 12.500 FPS Maximum frame rate : 25 000.000 FPS Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Bits/(Pixel*Frame) : 0.132 Stream size : 95.6 MiB (93%) Codec configuration box : avcC Audio ID : 2 Format : AAC LC Format/Info : Advanced Audio Codec Low Complexity Codec ID : mp4a-40-2 Duration : 9 min 0 s Bit rate mode : Variable Bit rate : 96.0 kb/s Channel(s) : 2 channels Channel layout : L R Sampling rate : 48.0 kHz Frame rate : 46.875 FPS (1024 SPF) Compression mode : Lossy Stream size : 6.11 MiB (6%) Default : Yes Alternate group : 1
Code:Video ID : 1 Format : AVC Format/Info : Advanced Video Codec Format profile : High@L3.1 Format settings : CABAC / 6 Ref Frames Format settings, CABAC : Yes Format settings, Reference frames : 6 frames Codec ID : avc1 Codec ID/Info : Advanced Video Coding Duration : 29 min 24 s Bit rate : 1 493 kb/s Width : 896 pixels Height : 504 pixels Display aspect ratio : 16:9 Frame rate mode : Variable Frame rate : 25.000 FPS Minimum frame rate : 12.500 FPS Maximum frame rate : 25 000.000 FPS Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Bits/(Pixel*Frame) : 0.132 Stream size : 314 MiB (93%) Codec configuration box : avcC Audio ID : 2 Format : AAC LC Format/Info : Advanced Audio Codec Low Complexity Codec ID : mp4a-40-2 Duration : 29 min 24 s Bit rate mode : Constant Bit rate : 96.0 kb/s Channel(s) : 2 channels Channel layout : L R Sampling rate : 48.0 kHz Frame rate : 46.875 FPS (1024 SPF) Compression mode : Lossy Stream size : 20.1 MiB (6%) Default : Yes Alternate group : 1
Code:Video ID : 1 Format : AVC Format/Info : Advanced Video Codec Format profile : High@L3.1 Format settings : CABAC / 6 Ref Frames Format settings, CABAC : Yes Format settings, Reference frames : 6 frames Codec ID : avc1 Codec ID/Info : Advanced Video Coding Duration : 8 min 54 s Bit rate : 1 466 kb/s Width : 896 pixels Height : 504 pixels Display aspect ratio : 16:9 Frame rate mode : Variable Frame rate : 25.000 FPS Minimum frame rate : 12.500 FPS Maximum frame rate : 25 000.000 FPS Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Bits/(Pixel*Frame) : 0.130 Stream size : 93.3 MiB (93%) Codec configuration box : avcC Audio ID : 2 Format : AAC LC Format/Info : Advanced Audio Codec Low Complexity Codec ID : mp4a-40-2 Duration : 8 min 54 s Bit rate mode : Constant Bit rate : 96.0 kb/s Channel(s) : 2 channels Channel layout : L R Sampling rate : 48.0 kHz Frame rate : 46.875 FPS (1024 SPF) Compression mode : Lossy Stream size : 6.14 MiB (6%) Default : Yes Alternate group : 1
Similar Threads
-
Joining files with MKVToolnix failed
By raulpuro in forum Video ConversionReplies: 4Last Post: 11th Jul 2020, 07:08 -
joining mp3 files
By David Banner in forum EditingReplies: 6Last Post: 30th Jan 2020, 04:59 -
Joining files
By ForumID in forum EditingReplies: 1Last Post: 1st Jun 2018, 20:05 -
Joining m2ts files
By cheerful in forum Newbie / General discussionsReplies: 70Last Post: 6th Aug 2016, 17:40 -
Help Joining Two .srt Files As One
By bigb_y2g in forum EditingReplies: 18Last Post: 6th Nov 2015, 10:07