Re: [FFmpeg-user] Fwd: OBS and OBS Portable Recording Into Same File Simultaneously
> showinfo operates upon decoded frames. This inspection will have to be > done at the container level using a forensic tool which can identify > start and end of block structures in Matroska. Can you suggest a forensic tool or even a company/person that could help me recover this? I’d be willing to pay for this service/tool. On Fri, Jun 26, 2020 at 5:23 AM Gyan Doshi wrote: > > > On 26-06-2020 02:08 pm, Moritz Barsnick wrote: > > You could try to observe at which point ffmpeg detects the first errors > > (the showinfo filter will indicate the byte position ffmpeg is > > operating on), and from there remove blocks of 512, 1024, 2048 bytes, > > hoping that after removal of some of them, you hit a proper block > > again, and ffmpeg will no longer "lose sync" at that point, until again > > a later point in the file. > > showinfo operates upon decoded frames. This inspection will have to be > done at the container level using a forensic tool which can identify > start and end of block structures in Matroska. This assumes that the two > write operations didn't write on top of each other. One saving grace > could be that OBS, like ffmpeg, flushes data to files in blocks of 256 > kB, although I don't know if this is the case. > > Gyan > > > ___ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-user > > To unsubscribe, visit link above, or email > ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Fwd: OBS and OBS Portable Recording Into Same File Simultaneously
Perhaps another question: if I extract each and every frame as an image file, then go through one by one and there is no still image resembling what I filmed (i.e. every frame/picture is just solid green), does that mean that the video is definitely unrecoverable? Or might there be another way to recover the video? On Fri, Jun 26, 2020 at 12:32 AM David Bayles wrote: > I tried this: > C:\Users\David>ffmpeg -i "C:\Users\David\Downloads\2020-06-23 09-02-44 > corrupt.mkv" -vf select='eq(pict_type\,I)' > "C:\Users\David\Downloads\2020-06-23 09-02-44 corrupt SELECT I-FRAMES.mkv" > 2> "C:\Users\David\Downloads\2020-06-23 09-02-44 corrupt SELECT > I-FRAMES.txt" > > And got this (video and log file): > > https://drive.google.com/drive/folders/1OMf6oeLIkYU1d05dPqO1tfOxI1_KnYGK?usp=sharing > > Is that what you meant to do? Any other ideas? > > Thanks! > > On Thu, Jun 25, 2020 at 11:43 PM David Bayles > wrote: > >> Trying this now! Thanks! >> >> On Thu, Jun 25, 2020 at 11:03 PM Leo Butler via ffmpeg-user < >> ffmpeg-user@ffmpeg.org> wrote: >> >>> David Bayles writes: >>> >>> > Corrupted video file, FFprobe output text file, and FFmpeg output text >>> file >>> > are all available to download here: >>> > >>> https://drive.google.com/drive/folders/1R0Y5plgkhTWWFNNKgSNJ5yitpKQbIKgg?usp=sharing >>> > >>> > I'm hoping there is a way to extract good video and audio from this >>> video >>> > file, this was for a very important job that is impossible to do >>> again. The >>> > video linked is a 1 minute recreation of the exact same problem... the >>> > actual video file is confidential (for a legal court case) and is much >>> > longer/larger. I used the exact same settings, the only difference was >>> the >>> > window OBS was capturing (I used a YouTube video as opposed to the >>> > videoconference software window used for the deposition). >>> >>> I am no expert, but for the video, I would try using the select filter >>> to capture the I-frames. >>> >>> https://ffmpeg.org/ffmpeg-all.html#toc-select_002c-aselect >>> >>> See the 4th example in the examples section. >>> >>> Leo >>> ___ >>> ffmpeg-user mailing list >>> ffmpeg-user@ffmpeg.org >>> https://ffmpeg.org/mailman/listinfo/ffmpeg-user >>> >>> To unsubscribe, visit link above, or email >>> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". >> >> ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Fwd: OBS and OBS Portable Recording Into Same File Simultaneously
I tried this: C:\Users\David>ffmpeg -i "C:\Users\David\Downloads\2020-06-23 09-02-44 corrupt.mkv" -vf select='eq(pict_type\,I)' "C:\Users\David\Downloads\2020-06-23 09-02-44 corrupt SELECT I-FRAMES.mkv" 2> "C:\Users\David\Downloads\2020-06-23 09-02-44 corrupt SELECT I-FRAMES.txt" And got this (video and log file): https://drive.google.com/drive/folders/1OMf6oeLIkYU1d05dPqO1tfOxI1_KnYGK?usp=sharing Is that what you meant to do? Any other ideas? Thanks! On Thu, Jun 25, 2020 at 11:43 PM David Bayles wrote: > Trying this now! Thanks! > > On Thu, Jun 25, 2020 at 11:03 PM Leo Butler via ffmpeg-user < > ffmpeg-user@ffmpeg.org> wrote: > >> David Bayles writes: >> >> > Corrupted video file, FFprobe output text file, and FFmpeg output text >> file >> > are all available to download here: >> > >> https://drive.google.com/drive/folders/1R0Y5plgkhTWWFNNKgSNJ5yitpKQbIKgg?usp=sharing >> > >> > I'm hoping there is a way to extract good video and audio from this >> video >> > file, this was for a very important job that is impossible to do again. >> The >> > video linked is a 1 minute recreation of the exact same problem... the >> > actual video file is confidential (for a legal court case) and is much >> > longer/larger. I used the exact same settings, the only difference was >> the >> > window OBS was capturing (I used a YouTube video as opposed to the >> > videoconference software window used for the deposition). >> >> I am no expert, but for the video, I would try using the select filter >> to capture the I-frames. >> >> https://ffmpeg.org/ffmpeg-all.html#toc-select_002c-aselect >> >> See the 4th example in the examples section. >> >> Leo >> ___ >> ffmpeg-user mailing list >> ffmpeg-user@ffmpeg.org >> https://ffmpeg.org/mailman/listinfo/ffmpeg-user >> >> To unsubscribe, visit link above, or email >> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". > > ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Fwd: OBS and OBS Portable Recording Into Same File Simultaneously
Trying this now! Thanks! On Thu, Jun 25, 2020 at 11:03 PM Leo Butler via ffmpeg-user < ffmpeg-user@ffmpeg.org> wrote: > David Bayles writes: > > > Corrupted video file, FFprobe output text file, and FFmpeg output text > file > > are all available to download here: > > > https://drive.google.com/drive/folders/1R0Y5plgkhTWWFNNKgSNJ5yitpKQbIKgg?usp=sharing > > > > I'm hoping there is a way to extract good video and audio from this video > > file, this was for a very important job that is impossible to do again. > The > > video linked is a 1 minute recreation of the exact same problem... the > > actual video file is confidential (for a legal court case) and is much > > longer/larger. I used the exact same settings, the only difference was > the > > window OBS was capturing (I used a YouTube video as opposed to the > > videoconference software window used for the deposition). > > I am no expert, but for the video, I would try using the select filter > to capture the I-frames. > > https://ffmpeg.org/ffmpeg-all.html#toc-select_002c-aselect > > See the 4th example in the examples section. > > Leo > ___ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-user > > To unsubscribe, visit link above, or email > ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-user] Fwd: OBS and OBS Portable Recording Into Same File Simultaneously
Corrupted video file, FFprobe output text file, and FFmpeg output text file are all available to download here: https://drive.google.com/drive/folders/1R0Y5plgkhTWWFNNKgSNJ5yitpKQbIKgg?usp=sharing I'm hoping there is a way to extract good video and audio from this video file, this was for a very important job that is impossible to do again. The video linked is a 1 minute recreation of the exact same problem... the actual video file is confidential (for a legal court case) and is much longer/larger. I used the exact same settings, the only difference was the window OBS was capturing (I used a YouTube video as opposed to the videoconference software window used for the deposition). Here's what happened: In OBS and OBS Portable, my video technician had the save location set to the same exact folder (this was not how I intended it to be, but he made a last minute change to accomadate what he suspected was a faulty hard drive). We also had a hotkey to start recording on both apps simultaneously. We left the auto naming scheme in place for both instances of OBS since they were supposed to be saving to two totally different external hard drives (we have since changed this). This perfect storm resulted in both recordings being written into a single file (see link above), instead of two files as intended. It is unplayabe in VLC. I ran an FFprobe (available via link above), and found that there are 8 streams in the file. Each file should have had 4 streams (1 video and 3 audio streams per my setup in OBS), so at first glance it looks like all the data is there in some form/arrangement. I tried to map the 0:0 stream to a new file and tried the same thing with the 0:4 stream (these are the video streams), but did not have any luck extracting good video. Here are the two things I ran (again see link above for text files with full FFmpeg ouput of each): ffmpeg -i C:\Users\David\Videos\2020-06-23_17-39-32_corrupted.mkv -map 0:0 -c copy C:\Users\David\Videos\2020-06-23_17-39-32_corrupted_map0-0.mkv ffmpeg -i C:\Users\David\Videos\2020-06-23_17-39-32_corrupted.mkv -map 0:4 -c copy C:\Users\David\Videos\2020-06-23_17-39-32_corrupted_map0-4.mkv It seems the audio is intact, as I was able to map one of the audio streams into a wav file... although there seemed to be extra/repeated audio tacked onto where the video/audio should have ended... It looks to me like both video streams got written into stream 0:0, while stream 0:4 looks empty (because this map results in a very small file). However the thing that's weird (and maybe promising) is that when I play the corrupted file in VLC, it mostly looks like smeared digital colors, but if I click around to different times in the video, it sometimes shows good video. My life would saved if there is a way to extract good video/audio from this corrupted file. Any help would be greatly appreciated, thanks in advance! ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-user] How to calculate difference between wall clock start time of audio input and wall clock start time of video input from inside the asetpts filter?
Here is my code: Lapaki:~ Lapaki$ /Users/Lapaki/Desktop/ffmpeg -f avfoundation -video_size 960x540 -pixel_format uyvy422 -framerate ntsc -thread_queue_size 8B -i "XI:none" -f avfoundation -thread_queue_size 8B -i "none:XI" -vf 'crop=iw-240:ih:120:0' -af 'asetpts=PTS+.58735/TB' -pix_fmt yuv420p -aspect 4:3 -s 720x480 -q:v 3 -maxrate 5000k -bufsize 2000k -acodec ac3 -ac 2 -ab 256k -ar 48000 -f dvd /Users/Lapaki/Desktop/FF\ Test/`date +%F`\ `date +%H_%M_%S`.mpg ffmpeg version 3.2.3-tessus Copyright (c) 2000-2017 the FFmpeg developers built with Apple LLVM version 8.0.0 (clang-800.0.42.1) configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libass --enable-libbluray --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzmq --enable-version3 --disable-ffplay --disable-indev=qtkit --disable-indev=x11grab_xcb libavutil 55. 34.101 / 55. 34.101 libavcodec 57. 64.101 / 57. 64.101 libavformat57. 56.101 / 57. 56.101 libavdevice57. 1.100 / 57. 1.100 libavfilter 6. 65.100 / 6. 65.100 libswscale 4. 2.100 / 4. 2.100 libswresample 2. 3.100 / 2. 3.100 libpostproc54. 1.100 / 54. 1.100 Input #0, avfoundation, from 'XI:none': Duration: N/A, start: 648413.295900, bitrate: N/A Stream #0:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 960x540, 29.97 fps, 29.97 tbr, 1000k tbn, 1000k tbc Input #1, avfoundation, from 'none:XI': Duration: N/A, start: 648413.884042, bitrate: 3072 kb/s Stream #1:0: Audio: pcm_f32le, 48000 Hz, stereo, flt, 3072 kb/s Output #0, dvd, to '/Users/Lapaki/Desktop/FF Test/2017-02-16 04_16_33.mpg': Metadata: encoder : Lavf57.56.101 Stream #0:0: Video: mpeg2video (Main), yuv420p, 720x480 [SAR 8:9 DAR 4:3], q=2-31, 200 kb/s, 29.97 fps, 90k tbn, 29.97 tbc Metadata: encoder : Lavc57.64.101 mpeg2video Side data: cpb: bitrate max/min/avg: 500/0/20 buffer size: 200 vbv_delay: -1 Stream #0:1: Audio: ac3, 48000 Hz, stereo, fltp, 256 kb/s Metadata: encoder : Lavc57.64.101 ac3 Stream mapping: Stream #0:0 -> #0:0 (rawvideo (native) -> mpeg2video (native)) Stream #1:0 -> #0:1 (pcm_f32le (native) -> ac3 (native)) Press [q] to stop, [?] for help [swscaler @ 0x7f8e0c8ab400] Warning: data is not aligned! This can lead to a speedloss frame= 33 fps=0.0 q=3.0 size= 266kB time=00:00:01.06 bitrate=2051.9kbits/sframe= 49 fps= 48 q=3.0 size= 444kB time=00:00:01.54 bitrate=2358.8kbits/sframe= 64 fps= 42 q=3.0 size= 652kB time=00:00:02.08 bitrate=2560.5kbits/sframe= 79 fps= 39 q=3.0 size= 838kB time=00:00:02.59 bitrate=2642.4kbits/sframe= 94 fps= 37 q=3.0 size=1022kB time=00:00:03.07 bitrate=2720.0kbits/sframe= 109 fps= 36 q=3.0 size=1208kB time=00:00:03.59 bitrate=2756.5kbits/sframe= 124 fps= 35 q=3.0 size=1406kB time=00:00:04.07 bitrate=2830.0kbits/sframe= 127 fps= 35 q=3.0 Lsize=1474kB time=00:00:04.19 bitrate=2876.4kbits/s dup=12 drop=0 speed=1.15x video:1310kB audio:113kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 3.604597% I'm currently doing a quick capture, just to manually calculate the difference between the start times of the two streams, then using that value inside the asetpts filter to offset the audio stream by that amount. This roughly works, but the difference between the input start times changes slightly every time, so I'd like to be able to calculate this difference inside the asetpts filter, using I something like -af 'asetpts=PTS+([stream 1 start time]-[stream 2 start time])/TB'. Is there a way to do this? What is the proper syntax? Thanks!! ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".